Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to allow private modifications when using Qt in a commercial product under the LGPL

I'm considering building a closed-source application that dynamically links against the Qt libraries. The target platforms would be Linux and Windows. In order to fulfill the obligations of the LGPL:

"The user of your application has to be able to re-link your application against a different or modified version of the Qt library" (Qt faq).

I'm struggling to understand what is technically necessary to make this possible. Especially without releasing the source code.

  1. Under which conditions would a user be able to just replace the .so/.dll files that ship with the application with her own, modified versions?

  2. Is this possible at all? Because on the same matter the libstdc++ faq states:

    The LGPL requires that users be able to replace the LGPL code with a modified version; this is trivial if the library in question is a C shared library. But there's no way to make that work with C++, where much of the library consists of inline functions and templates, which are expanded inside the code that uses the library. So to allow people to replace the library code, someone using the library would have to distribute their own source, rendering the LGPL equivalent to the GPL.

Thank you!

Edit: The second issue is clarified by LGPL version 3, section 3. Useful reference: an old version of the Eigen FAQ discussing this issue and their correspondence with the FSF about it.

like image 347
user5092864 Avatar asked Nov 10 '22 09:11

user5092864


1 Answers

In practice, people usually are linking to a shared library Qt; so slightly upgrading Qt -as long as some common API remains, is possible. An advanced user could in principle adapt the Qt library (starting from the source code of the version you are using) to fit his needs (e.g. correct a naughty bug, in particular without touching any Qt header file). Of course give all the details to help him (at least, mention exactly the version of Qt you are linking against).

In principle, as you noticed, this might perhaps not be enough. Only a trial and a judge could really decide, so ask your lawyer.

Of course I am not a lawyer.

BTW, did you consider asking your manager or client (or the legally responsible person) to release your code as free software and publish it (e.g. under GPLv3+ on github)? In my biased opinion, this would be the best solution!

like image 101
Basile Starynkevitch Avatar answered Nov 15 '22 05:11

Basile Starynkevitch