🪿

  • Kairos@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    10 hours ago

    Okay so bundle glibc. As far as I know link systemcalls are set up to look in the working directory first

    Why would statically compiling it violate the GPL?

    • qqq@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 hours ago

      It wouldn’t; glibc is LGPL not GPL. The person you’re replying to was mistaken.

      • Delilah (She/Her)@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 hours ago

        You know what, that explains how they can exist on linux at all. Because from what I understand, if glibc was GPL and not LGPL, closed source software would basically be impossible to run on the platform. Which… maybe isn’t the best outcome when you think about it. As much as I hate the Zoom VDI bridge, I don’t want “using windows” to be the alternative.

        and yeah, from the source you provided, I can see why they don’t statically link. “If you dynamically link against an LGPLed library already present on the user’s computer, you need not convey the library’s source”. So basically if they bundle glibc then they need to provide the glibc source to users on request but if they just distribute a binary linked against the system one then that’s their obligations met.

        Welcome to “complying with the LGPL for the terminally lazy”, I’ll be your host “Every early linux port of a steam game!”

        • qqq@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          My understanding of the linking rules for the GPL is that they’re pretty much always broken and I’m not even sure if they’re believed to be enforceable? I’m far out of my element there. I personally use MPLv2 when I want my project to be “use as you please and, if you change this code, please give your contributions back to the main project”

        • qqq@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          7 hours ago

          It should be noted that statically linking against an LGPL library does still come with some constraints. https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic

          You have to provide the source code for the version of the library you’re linking somewhere. So basically if you ship a static linked glibc executable, you need to provide the source code for the glibc part that you included. I think the actual ideal way to distribute it would be to not statically link it and instead deliver a shared library bundled with your application.

          EDIT: Statically linking libc is also a big pain in general, for exampled you lose dlopen. It’s best not to statically link it if possible. All other libraries, go for it.

    • Delilah (She/Her)@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      As far as I know link systemcalls are set up to look in the working directory first

      Not so much but that’s easily fixed with an export LD_LIBRARY_PATH=.

      Why would statically compiling it violate the GPL?

      Because you’ve created something that contains compiled GPL code that can’t be untangled or swapped out. The licence for the Gnu C Compiler is basically designed so you can’t use it to build closed source software. Its a deal with a communist devil. If you want to build a binary that contains GPL code (which is what glibc is) then you have to make everything in that binary licensed under a GPL compatible license. That’s what the whole “Linux is a cancer that attaches itself in an intellectual property sense to everything it touches” quote from Steve Balmer was in aid of. And he was correct and this was literally the system operating as intended.

      Dynamic linking is some looney tunes ass “see, technically not violating the GPL” shit that corporations use to get around this.

        • Delilah (She/Her)@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 hours ago

          From a technical standpoint, yes. From a legal standpoint:

          If you dynamically link against an LGPLed library already present on the user’s computer, you need not convey the library’s source

          Welcome to “what did you think was going to happen if you told for profit corporations that if they want to distribute a library in a bundle they also have to provide the source code but if they just provide it linked against an ancient version that nobody will be using in 5 years and don’t even tell you which one they’re 100% in compliance”?

          Could they? yes. Will they? probably not, that takes too much work.

          This is why steam’s own linux soldier runtime environment (Which is availible from the same dropdown as proton) had to become a thing.