[Interest] Is it a LGPLv3 infringement to copy paste qFuzzyCompare implementation

Ch'Gans chgans at gna.org
Fri Jul 22 12:04:32 CEST 2016

On 22 July 2016 at 21:49, André Somers <andre at familiesomers.nl> wrote:
> Op 22/07/2016 om 11:41 schreef Ch'Gans:
>> On 22 July 2016 at 20:25, Jean-Michaël Celerier
>> <jeanmichael.celerier at gmail.com> wrote:
>>>> I was pointed out that there's a potential LGPLv3 license
>>> infringement, although I understand where the FUD is coming from, I
>>> think that it is OK to read LGPLv3 source code to get inspired as long
>>> as you don't blindly copy/paste code (In my case i checked out quite a
>>> few articles and forum threads before choosing the Qt way as the best
>>> way to do it for my application).
>>> There is no infrigement, you can even use directly qFuzzyCompare in your
>>> proprietary code :
>>>  From the LGPLv3.0
>>> The object code form of an Application may incorporate material from a
>>> header file that is part of the Library. You may convey such object code
>>> under terms of your choice, provided that, if the incorporated material
>>> is
>>> not limited to numerical parameters, data structure layouts and
>>> accessors,
>>> or small macros, inline functions and templates (ten or fewer lines in
>>> length), you do both of the following:
>>> a) Give prominent notice with each copy of the object code that the
>>> Library
>>> is used in it and that the Library and its use are covered by this
>>> License.
>>> b) Accompany the object code with a copy of the GNU GPL and this license
>>> document.
>> Interesting excerpt indeed. So you can use small inlines and templates
>> of a LGPLv3 header file "under terms of your choice"! What a surprise!
>> This is quite liberal for a so-called "viral" license.
>> I'm using "viral" here because this is quite often the term used to
>> spread FUD, I have personally always liked GNU licenses and have great
>> respect toward all the people behind them.
>> Thanks a lot for pointing that out.
> Please be careful there. It is about *object code*, not source code! The
> idea of this section is to deal with the reality of compilers and linkers:
> stuff from headers ends up in your own object files. So, the license allows
> that to happen. It is *not* a licence to copy sources into your own sources
> and compiling that.

I agree with you but the license states "The object code form of an
Application may incorporate material from a header file that is part
of the Library", IMHO copy/pasting an inline function into an
application source code falls under the meaning of this sentence since
you "incorporate material" into a source file that will end up as an
"object form of an Application".
Don't get me wrong, i'm not trying to say that it's OK to copy/paste
open source code into proprietary software.
Plus if you want to be picky, qFuzzyCompare relies on qAbs and qMin
which are both 1SLOC inlines/templates functions too, so the original
1 line is now actually 3 lines, 7 to go before this exception doesn't
apply anymore! ;)

> And yes: studying source code from GPL like-licenced projects is explicitly
> encouraged.

I can't agree more with that, I've learned so much this way. And
studying usually means understanding, and when you understand you
might as well discover bugs, report them and fix them.


> André
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list