Similar questions have been asked before, but I'm not satisfied with the answers.
In LGPL v2.1, Section 5 states that a binary may be derivative to an LGPL library if it was compiled with the library's headers, because its object code can be derivative to the library, and so it should follow the obligations from Section 6 of the license.
The following exception is given: using "numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length)" does not trigger the Section 6.
Now consider a simple program using the function strlen
and linking dynamically to glibc
which licensed under LGPL v2.1. The function clearly does not fall under any of the cases of the exception - it's not a macro, and it's not defined as inline
. Therefore for the compiled binary to be legally distributed, it should be accompanied with a copy of the glibc sources and with the program's object files - to comply with Section 6 of the license.
Right? Except that nobody does that. So what am I getting wrong about this?
strlen
really get copied from the glibc library into the test executable. Note that for functions likestrlen
the compiler itself may know about them and expand them without relying on glibc. In that case, the glibc license is irrelevant.