9 ms·
> Michał Sidor suggests building against libbfd, something that the Debian maintainers don’t want to do. "don't want to" isn't quite correct - they can't. Per
by faho 5y ago
> Michał Sidor suggests building against libbfd, something that the Debian maintainers don’t want to do.
"don't want to" isn't quite correct - they can't.
Perf is licensed under the GPLv2, libbfd under the GPLv3. The licenses are incompatible, which makes the combination unredistributable - which is what Debian would be doing with it.
Debian is legally not allowed to do this.
- AstralStorm 5y agoUnless perf has the standard clause allowing use of later versions of GPL. That would make it GPLv3 if linked against libbfd. Unfortunately it does not.
- xxpor 5y agoThat's pretty typical for things in the kernel ecosystem.
- compsciphd 5y agoits arguable when it comes to dynamic shared libraries (i.e. the ZFS argument).
- tonyg 5y agoYou're right. I should clarify. Thank you!
- varajelle 5y agoIs there not an exception in the license for "system libraries" which libbfd kind of is?
- faho 5y agoIs it? On my system the only things depending on binutils (which libbfd is part of) are gcc, clang and perf (seems archlinux doesn't care). That makes it arguably not a system library, so it's fair that Debian would want to steer clear of that interpretation.
- saagarjha 5y agoWhat is Clang using it for? I thought it had its own suite of that.
- faho 5y agoThis... is some weirdness in Arch's clang package. It depends on gcc, for some reason, and that depends on binutils? (and I have no idea if anything here uses libbfd, since it's just a part of the binutils package and not split out)
- thayne 5y agoMaybe it depends on gcc so it can use gcc's assebler for inline assembly?
- marcthe12 5y agono its for linking. basically clang unless configured in the source it does not know what link options to give. Actually even rust uses gcc or clang to do same thing.
- account42 5y agoClang will also use libgcc by default under Linux to allow e.g. stack unwinding to work in mixed Clang + GCC applications.
- dharmab 5y agoClang uses part of the host compiler toolchain; gcc is the default compiler on Arch included in the base package. https://stackoverflow.com/a/38291698/4179075 https://stackoverflow.com/a/38291698/4179075
- captainmuon 5y agoIf we are nitpicking, they can, there is nothing material stopping them. It is "just" at odds with copyright law. In a society with different laws, there would be no problem. I wonder what would be greater - the productivity gain when we would not have to make workarounds due to licensing, and when we could just legally access the source code of everything. Or the loss, because people might have less incentive to innovate, or they would just keep the source hidden.
- pphysch 5y agoIf only we were permitted to view the digital IP rights tyranny as another disruptable industry with latent energy that could be unlocked by a savvy founder... The economic activity & value directly suppressed by IPR is unbelievable. Hard to even mentally scratch the surface. It's extremely economical (for society) to digitally copy and distribute useful information. Most Western IP laws are draconic in the purest sense of the word. Unfortunately their is a very influential sect of "corporate-law fearing" IP fanatics at the heart of many FOSS tech traditions (RMS, et al). Not all of it is pragmatic.
- account42 5y ago> Most Western IP laws are draconic in the purest sense of the word. IP laws in most countries are also not decided by a democratic process but rather pushed in by trade deals, which also make it almost impossible to change those laws.
- ziml77 5y agoIs it just me or is the incompatibility especially absurd given that perf is currently using libbfd, just 1 step removed via addr2line? I wonder if a patch to addr2line would be accepted which allows the executable to stay running to accept multiple requests through stdin.
- tonyg 5y agoaddr2line already does this, and it's exactly what TFA is making use of to get the speedup.
- ziml77 5y agoOops. Literally the only line that I didn't read. I thought the author was providing a patch to link against libbfd for users to manually apply (which afaik wouldn't violate the licenses as long as no one redistributes the patched binary).
- lathiat 5y agoThis is kind of the crux of a long history of these licensing arguments. That dynamic linking is problematic because it potentially creates a derived work. And then you might distribute that derived work. But shelling out to something or in some cases having an automated script create or download the derived work automatically is sometimes acceptable. It’s a bit of a silly line in some ways. But it’s a long story.
- TillE 5y agoI'm skeptical that there's a coherent legal distinction to be drawn between using a dynamic library with dlopen etc and running a similar executable with arguments. It's functionally identical usage of some public interface.
- nightpool 5y agoThis has always been my perspective as well, but it goes against long-established norms—for example, it's for exactly this reason that the LGPL was created. I don't think either theory has been thoroughly tested in court, though. See https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/ https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/ for a countervailing position from the SFC and FSF.
- deleted 5y ago[deleted]
- tverbeure 5y agoI’ve wondered about similar situations. Take Yosys, an open source synthesis platform that allows external commands by adding shred libraries. It’s MIT licensed. There is the Yosys-GHDL plug-in that allows using VHDL instead of Verilog compilation. It’s an independent open source project that can’t be merged into the main Yosys tree because GHDL itself is GPL 2.0. Is the author of that plug-in violating the GHDL license? The plug-in glue code is GPL2 as well. Can the GHDL authors ask the plug-in authors to take down their code (which has been forked many times on GitHub, of course.)
- fiddlerwoaroof 5y agoMy understanding is that there’s only a problem if the distributor combines the two things: if the main application is one license and the plug-in a different one, it’s not a license violation for the end-user to combine the two (unless they turn around and become a distributor in some way).
- saagarjha 5y agoI am pretty sure that depends on the intent of your distribution. If your software is useless with the plugin and you go "wink wink nudge nudge use this plugin to make this work" this would probably be infringement. If your software is functional without this, and you just happen to have the ability to load plugins of which this is one of them, then it's much better.
- geofft 5y agoThe plugin is potentially a derivative work of both Yosys and GHDL, but that's fine - it's possible to comply with the requirements of both the MIT license and the GPLv2 at the same time. The resulting work is GPLv2-licensed. (To be precise, you also need to preserve any copyright notices from the MIT-licensed project and the text of the MIT license. The MIT license has only one condition, but you do need to follow it, same as if you were building proprietary software with an MIT-licensed component.) If anyone distributes Yosys with the plugin, the combined work must also be distributed under GPLv2, which is also fine. In this case, perf is (like the Linux kernel, in whose git tree it lives) GPLv2-only, and modern versions of libbfd are GPLv3-or-later, and it's not possible to comply with both at the same time. The GPLv2 has a "no additional restrictions" clause, and the GPLv3 asks for things the GPLv2 does not. So a distributor of a combined system including perf built against libbfd (like a Linux distro) cannot comply with the licenses. (I suppose perf was written against the libbfd API back when libbfd was GPLv2, avoiding the question of whether perf is an illegal derivative work of libbfd. Or the backtracing API is de minimis, which means the source is fine but a compiled binary as par of a distro that also includes a modern libbfd is not.) One possible answer here is to ask the perf authors to relicense under GPLv2 or later. Many years ago, at a startup that no longer exists, I wanted to reuse code from the Linux kernel "dm-verity" module in GRUB, which had moved to GPLv3, and I got a pretty quick answer from Red Hat (who was the only copyright holder for those files) saying that would be fine.
- anticristi 5y agoKind of ironic that RMS campained against proprietary software to allow reuse of code. Now we have two islands of open source code ... .
- josefx 5y agoTwo? Are the AGPL licenses compatible? How about GPL licenses with exceptions for some APIs as used by OpenJDK?
- saurik 5y agoThe AGPL licenses are explicitly compatible with the GPL ones. FWIW, this issue is essentially entirely caused by Linus, who refuses to use or accept GPL3.
- tyree731 5y ago> FWIW, this issue is essentially entirely caused by Linus, who refuses to use or accept GPL3. That's a bit disingenuous. Linus has said no to the GPLv3, yes, but his reasons for doing so have merit.
- bombcar 5y agoThe very fact that the GPL v3 is incompatible with v2 indicates that v2 has something the v3 takes away, no matter how well-meaning that was.
- account42 5y agoWhat the GPL3 takes a way is a loophole to violate the spirit of the GPL without violating the letter of the GPL2.
- saurik 5y agoLinus's reasons for causing this issue having merit does not mean he wasn't entirely the cause of the issue: those are unrelated axes.
- deleted 5y ago[deleted]
- LeoPanthera 5y agoDebian could provide a tool which builds it for you, on your system, right? The resulting binary would not be redistributable but you could use it. I've often wondered why more linux distros don't provide a similar tool to build ZFS into the kernel for you.
- mappu 5y agoDebian nicely offers this with the zfs-dkms package. Ubuntu just bundles ZFS into the kernel statically - not even as a loadable module - and damn the licensing implications(!).
- spockz 5y agoSo this means the distributor can fix this by building this package locally and use the result to link other binaries to? This isn’t uncommon right?
- rossmohax 5y agoDKMS style linking at install time might be an option, but I've never seen it used in practice
- deleted 5y ago[deleted]
- roelschroeven 5y agoHow do other distributions handle this? Do they also have a slow perf? Or do they just link perf with libbfd regardless of the incompatible licenses?