Login
You're viewing the social.afront.org public feed.
  • Apr 21, 2026, 2:34 AM

    let's say you want to build an application that uses Qt as a statically linked binary, and you want to avoid building two dozen dependencies yourself

    is there any existing cross-platform solution which will do that for me and also isn't vcpkg?

    💬 6🔄 0⭐ 0

Replies

  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:40 AM

    i think pkgsrc and gentoo would probably solve my problem for Linux (and maybe macOS) but neither of them will produce Windows binaries with MSVC. the search continues

    💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Apr 21, 2026, 2:51 AM

    @whitequark vcpkg sadly does not fix the 'avoid building' part. Our closest competitor is conan; I don't know if they have what you want though. (I'm trying to keep our ship afloat rather than admiring the other ship :) )

    💬 1🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:06 AM

    @whitequark I'm working on this thing because when I was a standard library maintainer, I saw that Networking was never going to meet `std::`'s ABI requirements, and decided that getting people to real ASIO if they wanted networking was a problem that needed solved.

    I care about this mission and hope to make it good regardless of ... my employer's reputation. But I understand for those philosophically opposed to touching LLM'd content that kind of categorically excludes us :(

    I'm curious on those qt patches; qt is unfortunately one of the most ... problematic ports we have that takes a lot of whacking over the head to behave.

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:11 AM

    @malwareminigun it's not just philosophical opposition here; I'm pretty concerned about having something malicious slip by for a security-sensitive application, and auditing vcpkg upgrades is basically impossible (both in general and because of the amount of patches)

    this is probably OK for the Windows build because if you run the Windows build you implicitly trust Microsoft anyways, but for the portable Linux build I'm really not sure that vcpkg is the right idea (macOS currently uses it too, no concrete thoughts on that yet)

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:15 AM

    @whitequark Do you mean upgrades of the vcpkg executable or upgrades of ports in the registry? If the former we do go out of our way to make it relatively easy to build because if we get run on a platform we don't know in advance we fall back to building ourselves from source.

    If the latter, we have some diff tools but nothing really turnkey right now. If you don't trust Microsoft then you probably don't want to trust our registry either.

    github.com/microsoft/vcpkg-too is very close (thanks autoantwort!)

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Apr 21, 2026, 3:01 AM

    @whitequark I mean, anything that touches the network is questionable with a static libc because DNS lives in libc and DNS has a lot of machine-dependent behavior.

    We do have LLM contributions; can't really separate out who pays the bills :/

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:11 AM

    @whitequark It's entirely possible I screwed up the muslc version. It's intended to be static but maybe I had glibc brain at the time? It's *intended* to work with a static muslc if you want.

    Should I just build on Alpine and check with ldd or is there something else I should confirm?

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:12 AM

    @malwareminigun sorry I feel like we're talking past each other a bit. I was responding to

    I mean, anything that touches the network is questionable with a static libc because DNS lives in libc and DNS has a lot of machine-dependent behavior.

    by saying that I don't think it's questionable if I use musl

    separately from that, I just discovered to my mild displeasure that vcpkg wouldn't build a musl sysroot for me (the -musl switch seems to do... nothing useful if you run it on Debian)

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:17 AM

    @whitequark If you mean the bootstrap script that just changes the copy of our binary that gets downloaded. `-musl` is intended as an escape hatch if we download the glibc copy on a musl system to whack the bootstrapper over the head and say "download the musl one damnit".

    We are not trying to setup an entire "linux sysroot" or that sort of thing; in particular we think binary deployment is better done by existing tools like apt/dnf/pacman/zypper/etc. and explicitly aren't packaging *applications* because we think our UX is bad for what apt customers want.

    EDIT: And sorry for potential talking past. I just want to make sure if there is stuff that you would want fixed that is within my power to fix that it is fixed.

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:19 AM

    @malwareminigun I don't think there's anything to fix! I just did not entirely understand the scope or design of vcpkg

    well, there's a packaging bug where dbus can't be built with staticcrt (presumably because it builds both the daemon and the library in the same package, with no feature flags?) but it's not an issue with the core package manager

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:28 AM

    @whitequark If that changes just poke. For now I'll just keep thinking of this image.

    dbus port has been no end of confusion for us because they do need that daemon but it really seems intended that "there can be only one" on a system and we REALLY don't want to step on systemwide package managers' toes

    The scene from Pirates of the Caribbean where an officer says "you are the worst pirate I've ever heard of" and Jack replies "but you have heard of me". Whitequark's avatar is pasted on the officer and Billy's on Jack. The captions read

is there any existing cross-platform solution which will do that for me and also isn't vcpkg?

so you have heard of vcpkg
    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:31 AM

    @malwareminigun I'm super confused re: dbus

    most packages just need libdbus-1 which is normally built as a static library (unless I misremember)

    the applications aren't expected to build the daemon. some of them will want to ship and run it, yeah, but only a small subset and only really on Windows?

    💬 0🔄 0⭐ 0
  • Apr 21, 2026, 2:53 AM

    @whitequark

    NetBSD's pkgsrc might do the trick for you. Supports practically every relevant (and irrelevant) OS.

    💬 0🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:33 AM

    @be0ba I looked at it but I think it's not a very good fit for specifically this: it seems to build Qt with basically every feature, while I need as few as possible (no Quick, for example)

    also no Windows, but that's more of a wish

    💬 1🔄 0⭐ 0
  • Apr 21, 2026, 3:34 AM

    @whitequark

    Ah, but that's the glory of pkgsrc. You should be able to configure the build options. It's not as smooth as Gentoo's ports system, but they both have a common ancestor. I haven't looked at the options set up for Qt specifically though.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Apr 21, 2026, 4:50 AM

    @whitequark I had success in the past cross-compiling for windows using mxe.cc. From recollection I was just using a pretty basic Makefile.

    (this would have been ~15 years ago on Qt5)

    💬 0🔄 0⭐ 0
  • Apr 21, 2026, 12:39 PM

    @whitequark could BuildStream help? idk if any of the existing recipes build qt for windoze but if you make one it will do an okay job for caching it and downloading from a remote cache next time in CI etc.

    💬 0🔄 0⭐ 0
  • Apr 21, 2026, 4:31 AM

    @whitequark I'm genuinely not sure if its Windows support is up to the task, but it's potentially worth at least tinkering with meson before going down the abomination path. (I've successfully built things for Windows with meson, but they were just some simple Python C extensions, nothing actually complicated)

    💬 0🔄 0⭐ 0
  • Apr 21, 2026, 11:12 AM

    @whitequark maybe look at spack? I don't know if it quite meets your needs for static builds, but it is good at managing and auto building complex dependency trees.

    💬 0🔄 0⭐ 0