On Fri, 25 Feb 2022 12:21:22 +0200 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > > The comment from the bug: > > perf can link against libbfd if available, but the result is > > undistributable as they are licenced under GPL v2 and v3+ > > respectively. > > > > Hi Ian, thank you for this note. Trace-cruncher is a library licensed > under LGPLv2.1, so it should not be a problem to use libbfd. Is my > understanding correct, as I'm not an expert in all these licences ? trace-cruncher can link with libbfd as LGPLv2.1 is compatible with GPLv3. But note, this will limit what can link with trace-cruncher if it is distributed and provides a library. That is, if you have a trace-cruncher library, even though it is LGPLv2.1, because it links to a GPLv3 library, then anything that links to the trace-cruncher library must be GPLv3 compatible. This is why I separated some code out of trace-cmd (although that code has since been removed). I took GPL code, and used it in the binary of trace-cmd. But I kept the libtracecmd code separate, where as, the distributed libtracecmd code (that is LGPLv2.1) never contained any GPL code, nor did it depend on any. And now thinking about this more, and that we are starting to include libraries into libtracecmd (for compression and other things), we need to look carefully at the licenses for those libraries to make sure they do not impose any more restrictions than what LGPL has. The general rule of thumb is that you are constrained by the strictest rules of everything provided by a library. If any part of the library imposes a restriction, whatever links to that library must follow that restriction. -- Steve