Licensing issue

5 views
Skip to first unread message

Ulf Lorenz

unread,
Jun 2, 2020, 6:16:20 PM6/2/20
to libt...@googlegroups.com
Hi,

at work someone recently pointed out a potential problem with the LGPL
that I thought I would share here.

In short, LGPL version 2 can be a bit tricky with C++ templates. The
problem is in section 5 of the license, which allows only
instantiations from header files of up to 10 lines of code. I have not
checked thoroughly how much this applies to the tensor library (since
the main classes CTensor and RTensor are already explicitly instantiated
in the library itself, presumably with a lot of other template code).

However, to be on the safe side, if you build and distribute something
binary with the tensor library as component, you should license the
tensor library under the LGPL version 3 which has a special section 3
for templates/header files. This is fine and allowed by the tensor
library's license.

Might be a somewhat esoteric topic for most of the users, I guess, but
maybe it does matter to someone.


Regards,
Ulf Lorenz

Juan José García-Ripoll

unread,
Jun 9, 2020, 8:21:11 AM6/9/20
to Ulf Lorenz, libt...@googlegroups.com
Ulf Lorenz <u...@wavepacket.org> writes:
> However, to be on the safe side, if you build and distribute something
> binary with the tensor library as component, you should license the
> tensor library under the LGPL version 3 which has a special section 3
> for templates/header files. This is fine and allowed by the tensor
> library's license.

Hmm, would upgrading LGPL to version 3 in the repository fix this issue?
I did not know there were different iterations and have no problem with
it.

Cheers,

--
Juan José García Ripoll

Quantum Information and Foundations Group
Institute of Fundamental Physics IFF-CSIC
Calle Serrano 113b, Madrid 28006 Spain
http://quinfog.hbar.es - http://juanjose.garcia.ripoll

Ulf Lorenz

unread,
Jun 9, 2020, 3:35:59 PM6/9/20
to Juan José García-Ripoll, libt...@googlegroups.com
On Tue, 09 Jun 2020 14:21:08 +0200
Juan José García-Ripoll <juanjose.g...@gmail.com> wrote:

> Ulf Lorenz <u...@wavepacket.org> writes:
> > However, to be on the safe side, if you build and distribute
> > something binary with the tensor library as component, you should
> > license the tensor library under the LGPL version 3 which has a
> > special section 3 for templates/header files. This is fine and
> > allowed by the tensor library's license.
>
> Hmm, would upgrading LGPL to version 3 in the repository fix this
> issue? I did not know there were different iterations and have no
> problem with it.

Originally I wanted to say "no, just add some docs", but after actually
_reading_ the LGPL, I would say the answer is "yes".

The only drawback is that the LGPL v3 is based on the GPL v3, which
imposes additional restrictions compared to v2. So noone can, say, copy
parts of the tensor library source code and make a DRM system out of it
any more. However, these use-cases are probably pretty exotic, while the
correct handling of the license by default seems a useful property, so
I would strongly lean towards LGPL v3.


Regards,
Ulf
Reply all
Reply to author
Forward
0 new messages