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!”
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”
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.
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.
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.
as long as you run it from the command line. On my system at least if there’s a library missing it will just silently fail to launch. I love linux but it does not make it easy
.so files are distro dependent. (This is theoretially a good thing. Means debian can distribute a stable version and Arch can distribute a so fresh the hen doesn’t know its missing yet version). If you’re a command line guru you can run a pacman or deb query to find out what package you have to install to add that library at a system level. But oftentimes you can’t just use a different .so because the .so was built to depend on another .so and you basically have to solve a dependency chain by hand. Its a big mess that apt or pacman or even gentoo’s famously obtuse emerge solves for you invisibly.
as to where to find the ancient version that binary was built for? well My goto is archive.archlinux.org but its an asshole of a process and not for the faint of heart. sometimes you just need to build the library from scratch which is BULLSHIT and I’m not unaware of that fact.
can you just go to a website and download the .so? yes actually. But it might just decide not to work. This is a problem that individual distros are meant to be solving and do so when distributing open source software. As for with steam games, I think valve solves this problem with the soldier runtime environment which I mentioned above.
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?
It wouldn’t; glibc is LGPL not GPL. The person you’re replying to was mistaken.
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!”
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”
They missed the first character because they took the L
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.Not so much but that’s easily fixed with an
export LD_LIBRARY_PATH=.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.
Oh, so bundling it and adding that env will work.
From a technical standpoint, yes. From a legal standpoint:
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.
Also, your OS will tell you which library it can’t find.
as long as you run it from the command line. On my system at least if there’s a library missing it will just silently fail to launch. I love linux but it does not make it easy
Is there a site to download various .so files?
.so files are distro dependent. (This is theoretially a good thing. Means debian can distribute a stable version and Arch can distribute a so fresh the hen doesn’t know its missing yet version). If you’re a command line guru you can run a pacman or deb query to find out what package you have to install to add that library at a system level. But oftentimes you can’t just use a different .so because the .so was built to depend on another .so and you basically have to solve a dependency chain by hand. Its a big mess that apt or pacman or even gentoo’s famously obtuse emerge solves for you invisibly.
as to where to find the ancient version that binary was built for? well My goto is archive.archlinux.org but its an asshole of a process and not for the faint of heart. sometimes you just need to build the library from scratch which is BULLSHIT and I’m not unaware of that fact.
can you just go to a website and download the .so? yes actually. But it might just decide not to work. This is a problem that individual distros are meant to be solving and do so when distributing open source software. As for with steam games, I think valve solves this problem with the soldier runtime environment which I mentioned above.