Has anybody been able to build a statically linked binary that shows a Vulkan surface? I’ve put some context around this problem in the video. I understand that the vulkan driver has to be loaded dynamically - so it’s more of a question whether a statically built app can reliably load and talk with it. I think it should be possible but haven’t actually seen anyone make it work. I’m aware of “static-window9” by Andrew Kelley but sadly it doesn’t work any more (at least on my Gentoo machine T_T).

(I’m also aware of AppImages but I don’t think they’re the “proper” solution to this problem - more like a temporary bandaid - better than Docker but still far from perfect)

  • ReversalHatchery@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    39 minutes ago

    rewrite it in Rust ™, and then it’ll work everywhere.

    joking of course. you still need different builds for glibc and musl

  • corsicanguppy@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 hour ago

    Has anybody been able to build a statically linked binary

    The question should by why you’d want to. Careful if your reply is something about ‘one binary to work on a very diverse arrangement of library pinnings’ because the next question would be ‘why would you think that’s either achievable or valuable as a goal’; and toss in a ‘why try to ship the same binary in several different repos anyway’ bonus question.

    In short, if your biggest problem is how to build a binary that works everywhere, you have a lot of questions about responsible build/release processes to answer, and they will be embarrassing for you.

    • merthyr1831@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 hours ago

      You know it’s bad when Linux YouTubers are arguing against Linux ports because Proton is just so much more functional for Linux gamers.

      • UnfortunateShort@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        I mean, why support another API if you have already implemented one, right? Pretty sure there is a Flatpak Version of Proton, wo you can somehow bundle it as well

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    17 hours ago

    I have no experience with this, but I figured a Rust library might have tried to solve it (static linking is very much the norm here) and I found that ash can statically link the “Vulkan loader”. I don’t know, what that actually means, for example whether it would still load libxcb at runtime. Might be worth looking into what they do…

    See the “Optional linking” section here for their description: https://crates.io/crates/ash#optional-linking

  • 𝖒𝖆𝖋@szmer.infoOP
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    1 day ago

    I’ll also add that I’m aware of glibc’s stance on dynamic linking from static binaries. I don’t buy the whole NSS argument. It’s easily solvable by a basic request/response protocol through some local socket. IMO that argument is just a cheap excuse to justify status quo.