PDA

View Full Version : Qt LGPL unclear



giowck
19th May 2010, 06:59
Hi,

If I want to develop a proprietary software by using Qt LGPL version...

I must make sure these things:

1) Dynamic linking only (when no changes to Qt itself)

2) Say somewhere in my software that i am using Qt (for example under the Help menu->About Qt)


Then here: http://blog.qt.nokia.com/2009/11/30/qt-making-the-right-licensing-decision/


If you are shipping an executable, you must include any data and utility programs needed for reproducing the executable (i.e. must provide components needed to recompile with a new version of the library) unless such data and utility programs are normally distributed with the major components of the operating system on which the executable runs

So
3) i have to include anything to reproduce the executable? What does this concretely mean? I ship the object files?? *.o? or how do you achive this? (perhaps theuser could just replace the dlls)

The Nokia Exception says that you can include up to 5% of the entire Library? Does it mean i can't create infinite amount of Buttons derivated from QButton class?


Thanks!

SixDegrees
19th May 2010, 07:41
This clause means that, if your program requires special tools in order to build, you must include those tools in your distribution. A trivial example would be a compiler, although that particular requirement is already met by the exception for tools that are "normally distributed" with ordinary configurations. A more robust example would be a specialized pre-compiler (like Objective CAML, for instance) or an external toolkit your program requires for normal operation, like a specialized FFT package. The idea here is to escape several "proprietary" exemptions that various organizations applied under the last version of the GPL that effectively left anyone downstream unable to make use of their otherwise license-covered obligations. See "Tivoization" for more information.

No idea what the Nokia exception says; consult a lawyer, or contact Nokia for clarification.

Or, just pony up for a commercial license. They're not expensive, and give you unlimited rights.

Or choose an alternative. Like Java. Or Motif.

squidge
19th May 2010, 09:24
If your using the DLL, people can simply replace the DLL to use a newer (binary compatible) version of the Qt library (which is the intent in the license), you don't need to distribute object code and building tools as you are not statically linking (thats when it gets complicated).

The nokia exception means you can include things required to use the Qt library (such as header files) in your own code, thus some of the Nokia licensed code appears in your code, but they don't require your code to be under the same license. What it prevents is you using a significant portion of the Nokia code in your code and still claiming you are exempt, or making a derivative of the library under the exemption.

giowck
19th May 2010, 09:32
If your using the DLL, people can simply replace the DLL to use a newer (binary compatible) version of the Qt library (which is the intent in the license), you don't need to distribute object code and building tools as you are not statically linking (thats when it gets complicated).

The nokia exception means you can include things required to use the Qt library (such as header files) in your own code, thus some of the Nokia licensed code appears in your code, but they don't require your code to be under the same license. What it prevents is you using a significant portion of the Nokia code in your code and still claiming you are exempt, or making a derivative of the library under the exemption.

ok now it seems more clear. But do i have to be afraid that i am using too much from the library during normal use (QButtons inheritance), or is it very improbable to use 5% of the lib when i am not modifying it... Because i don't know how much % i use...

wysota
19th May 2010, 09:56
ok now it seems more clear. But do i have to be afraid that i am using too much from the library during normal use (QButtons inheritance), or is it very improbable to use 5% of the lib when i am not modifying it... Because i don't know how much % i use...

It doesn't apply to buttons and stuff because you are not including their code in your program but rather link to the code from the dll. The clause is meant for template classes mostly as if you use them (like QList) in your code, then you fall under the "derived work" (or similar) clause (as the whole code of QList is included in your own code because of the nature of templates). Same goes probably for moc and uic generated files.

squidge
19th May 2010, 10:03
It only depends on the source you directly include into your project (eg. by #include). Once you have include'd it once, you can create an infinite amount of buttons using it, subclassed or otherwise.

Basically, If you just #include normal Qt header files, your fine. If you modify the library, header files, or start copying chunks from header files directly into your code, things start getting tricky.

EDIT: wysota makes a good point about templates.

giowck
19th May 2010, 10:10
thanks to all!

giowck
22nd May 2010, 12:30
i tried to substitude dlls of an app, made using Qt 4.5.2, with dlls from version 6.2 but i get some errors...

so it is not enough just to replace the dlls with the new one...

So what have i to do, in order to allow users to upgrade the library (as LGPL says)? Do i need to provide the object files now?

Talei
22nd May 2010, 13:30
I had same problem in the past, and "solved" it by shipping my app with correct version of Qt libs. I (please correct me if I'm wrong) think that You are allowed to do that.
Also I have one question that I'm not so sure about:
Can I redistribute my program (dynamic linking) under LGPL (Qt libs) and Freeware (close source of my code)? And if I can do that, how 5% limitation, for templates, apply to my code in that situation (how can someone verify that I use less then 5%? - I assume that it is My obligation to prove that I use less then 5% to the authorities )?

wysota
22nd May 2010, 14:02
You don't have to prove anything. I'm sure all the code that might get included into your application from Qt is less than those 5%. Qt is over 700 public classes (+probably another ~700 private ones) now so it's probably around million lines of code in total give or take.

squidge
22nd May 2010, 14:22
i tried to substitude dlls of an app, made using Qt 4.5.2, with dlls from version 6.2 but i get some errors...6.2? Are you sure? Latest Qt beta is 4.7.

SixDegrees
22nd May 2010, 16:22
I'm going to interject here, simply to point out that discussions like these, though interesting, are pointless. At the end of the day, when you're facing legal action over your deployment decisions, "I read it on th' Internet" doesn't give you any protection at all. None.

If this issue is really of concern, you MUST consult an attorney, preferably one with experience in software intellectual property rights. Or, buy a Qt commercial license. There are really no other options. This thread could extend to hundresd of pages with thousands of comments (in fact, you can easily find such lengthy discussions on this exact topic scattered across the Internet) but none of it will amount to a hill of beans when you're standing in front of a judge.

Talei
22nd May 2010, 16:33
I would disagree with last post, at least in i.e. my case, when I create work based on Qt for free. Of course If anyone think seriously about selling product so consulting that mater with lawyer is only natural, but I don't want to spend x$ when I develop FREE programs. So I think these threads are not pointless, and they gave people like me somewhat of overview about licensing mater concerning Qt at least.
And to bump my previous question:
Can I go with LGLP for Qt libs and Freeware (closesource) for my main program (dynamic linking)?

SixDegrees
22nd May 2010, 16:43
Can I go with LGLP for Qt libs and Freeware (closesource) for my main program (dynamic linking)?

Again - you can find thousands of endless discussions on exactly this point all over the Internet. Here's the definitive answer: there isn't an answer.

You can distribute whatever you like. But if you care about retaining your intellectual property rights and control over your source code, then you need to consult with an attorney with expertise in such matters, or you stand a high risk of losing such rights and control if your code brushes up against the LGPL or GPL, especially the latest versions of these. Dick Stallman and the FSF are aggressively pursuing lawsuits with the purpose of establishing precedent, and even the smallest developer runs a substantial risk of finding themselves made an example of as the FSF pursues its ideological goals through the court system. And they have very deep pockets; if you think the cost of a Qt license or a legal consultation are high, wait 'til you have to answer a summons from such a group which is actively looking for trouble.

Again: feel free to discuss this 'til the cows come home, but none of the opinions expressed here are going to be of any help if you're staring down a lawsuit. Basing such potentially costly, important decisions on forum chatter is foolish.

squidge
22nd May 2010, 17:00
He has a point. Although we can offer advice and tell you what WE THINK our interpretation of the license means, if you want to ensure you abide by it, you need to seek legal advice from someone who, if they tell you wrong, you can sue them.

Talei
22nd May 2010, 17:24
I know that You both have right, but from developer point of view, and probably You guys wrote some free applications to, this is nonsense. Why? Because what You are suggesting is SPEND the MONEY to make FREE Software! (I know that money are not for app but for the knowledge) I seek help here, maybe this is not the right place for that kind of "help", so I agree what You wrote is correct about this kind of topics, but either way someone of You did publish application that, like in my case is free-ware but You want keep the source code close (well it's really not a big of a deal, just academical debate, especially taking into acount that software itself is not some advance AI that will gave birth to sky-net or something :) ).
My point here is, and that's why I ask, that someone did the same in the past (I doubt that I'm the first person in the world, who thought about sharing using LGPL and freeware (closesource) ), and if so, did he get sued or not :), or maybe a information like: on xxx_dot_com web page is all what You ask for. Although maybe in this community and at this point in space and time person who know answer at my question actually sleep :D.

giowck
22nd May 2010, 20:04
Sorry with 6.2 i mean 4.6.2

i think the LGPL sucks, because it is unclear, why have I to contact a lawyer for a license from the FSF, they have to make it clear and usable...

Why should developers use such licenses that are crap...

i will go with Java or buy a commercial license... But Qt Nokia says that you can use their lib for commercaĆ­al use.. but without "real" information

squidge
22nd May 2010, 21:08
The license is a legal document. When was the last time you read a legal document that was clear and concise? Thats how lawyers make there money.

If you want a less restrictive license, and support from Nokia over any licensing issues you have, you need to buy commercial license. Thats really all there is to it.

Lykurg
22nd May 2010, 21:57
When was the last time you read a legal document that was clear and concise?;) And also be aware that the LGPL is treated differently in each country. That is because the LGPL is mainly from the American law system, which is compared to the German one (as an example) totally different. So it had to be interpreted by the german law and so on...

wysota
23rd May 2010, 08:13
Because what You are suggesting is SPEND the MONEY to make FREE Software!
There is a misunderstanding here. There is a difference between "Free Software" (as in freedom of speech) and "free software" as in "free beer". LGPL is about the former, not the latter.


;) And also be aware that the LGPL is treated differently in each country. That is because the LGPL is mainly from the American law system, which is compared to the German one (as an example) totally different. So it had to be interpreted by the german law and so on...

That's exactly the main problem with (L)GPL - it tends to be interpreted differently in different places. Especially GPL.

The rest of this discussion is just a big fuzz over nothing. Whether we are talking about LGPL or any other kind of licence - if you want to be sure you are not violating it, you have to consult a lawyer who will stand by his word in the court of law. "Free" and "free" has nothing to do with that. Try interpreting the licence of Visual Studio Express.

giowck
23rd May 2010, 09:01
Regarding Visual Studio Express: http://www.microsoft.com/express/support/support-faq.aspx


Can I use Express Editions for commercial use?

Yes, there are no licensing restrictions for applications built using Visual Studio Express Editions.

something like that is clear! If they say no license restrictions i can use it without pain

wysota
23rd May 2010, 10:23
Regarding Visual Studio Express: http://www.microsoft.com/express/support/support-faq.aspx



something like that is clear! If they say no license restrictions i can use it without pain

Can I use MSVC Express Edition for LGPL applications? Can I distribute the MSVC runtime dlls with my application? Can I licence my application with the same licence as used for MSVC Express Edition? Are users of my software compiled using EE also bound by the licence and if so then on what ground? There are always questions that can be asked and only lawyers are entitled to answer them. I'm sure one of the first arguments after bringing up the statement you quoted in court would be this was not a legal counsel writing that FAQ and it has no value in court because the licence itself is the only document both sides agreed to follow and the passage from the Internet website is just a free interpretation having nothing to do with the document itself.

BTW. For me it is clear you can use LGPL components in commercial applications - this yields no doubts. Only that sometimes some person arrives somewhere and asks that question again bringing another pointless discussion about it.


5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

And the next paragraph covers the executable linking situation:

However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.

Section 6 covers your obligations when distributing your linked application. Please note it is explicitely said that if you link (even statically) against LGPL component, your program can still be closed-source and doesn't have to be distributed under LGPL compatible licence. You only need to provide means for the end user to relink the final software (see section 6a) or to replace the LGPL component with an equivalent (i.e. by dynamic linking - see section 6b). In both situations you have to make sure the end-user has or is able to gain access to the complete source code of the LGPL component (a preferred solution is to provide a verbatim copy of the component along the binary of your application). It is worth noting it is your responsibility to provide means for the user to get that source code - i.e. if Nokia ftp servers fail and the user of your application wants Qt source-code, for three years from sending/distributing your software you have to be prepared to supply the user with a rigid (i.e. on CD) and verbatim copy of Qt's source-code in version which was distributed with your software and you can charge the user for it up to an amount of money equivalent to your expenses of packaging and sending the code.

Section 9 is also interesting. It says that you (i.e. as the end user) do not have to accept this licence as you didn't sign it and it only prevents you from distributing the software. This also implies (although not explicitely) you can use LGPL components in any form you wish for your inhouse private software which you don't distribute to anyone else. You are only not permitted to modify it without accepting the licence.

giowck
25th May 2010, 18:07
Thanks to all!

So i understood that if i want to create some free apps without relaesing the sources i need to contact a lawyer.

I mean is there really no way to release my apps?? I'm a student and i can't contact a lawyer just for a free app...

Do you think I can get in trouble?

squidge
25th May 2010, 18:16
We don't THINK you will get into trouble, but we are not a legal team, so you need to consider that risk for yourself.

The only ways to GUARANTEE you will not get into trouble:
a) Buy a commercial license (and thus the license is more relaxed, plus you can contact Nokia support for any questions)
b) Release the source code of your application (and so, again, the license is much more relaxed)
c) Contact an approved lawyer
d) Not release your app

Considering the fact that your application is free, Is there a particular reason you don't want to release the source code?

giowck
25th May 2010, 18:49
ok i will release the sources...

In the future i will buy a commercial license in order to sell software!

Thanks again!

wysota
25th May 2010, 19:12
So i understood that if i want to create some free apps without relaesing the sources i need to contact a lawyer.
No, you don't. Just don't violate the licence in any obvious way. If there is some fragile situation, I'm sure you'll be asked to correct it before Nokia (or owners of other protected components) submits a lawsuit against you ;)

giowck
25th May 2010, 19:43
No, you don't. Just don't violate the licence in any obvious way. If there is some fragile situation, I'm sure you'll be asked to correct it before Nokia (or owners of other protected components) submits a lawsuit against you ;)

so only nokia can submit a lawsuit against me? Ok, then if i do something wrong i think i can fix everything by a request!

thanks

wysota
25th May 2010, 20:37
so only nokia can submit a lawsuit against me?
If you violate a licence for their product, then yes.