views:

119

answers:

3

http://directory.fsf.org/project/libgcrypt/

I am coding and application in C++, the application uses libgcrypt, so -lgcryptoption is passed to GCC C++.

my source code includes "#include "

i am using the library as "SHARED" meaning its not distributet with the executable of my application.

the library is licensed under GPLv3/LGPL, do i have the rights to SELL/Distribute my EXECUTABLE? do i have the rights to sell/redistribute the source code?

must i include the GPLv3/LGPL license in my application source code, or only in the EXECTUABLE folder?

my application uses pthreads also.

it might seem a stupid question, but this GPL licenses are really confusing :(

A: 

For the GPL: If the original library is licensed under this, you must license your derived work under the same license. This means you MUST distribute your source code with the original, with all original license declarations in tact. (you can't remove the license definition from any code file etc). You can sell your code under the GPL, but there's nothing to stop someone else from grabbing your work and reselling it either - so it's not particularly worth trying to sell. Instead, you might be better off with donations.

LGPL: You can license your work under any compatible license - this includes proprietary licenses. You are not required to distribute your code, but you can do so. If you make any modifications to the library you're using - you must redistribute the code for those changes too. (But a derived work can stay closed-source).

The two licenses are mostly incompatible. If an application is licensed under both licenses, you can chose which one to use - but you can't mix the two.

Mark H
@Mark H Not so true about "mixing". For example, GPL3 is part of LGPL3, meaning that LGPL3 gives user all freedom of GPL and additional freedom given by LGPL.@tenev make sure you check under which version of LGPL is the library published. As for license, often the license is indicated in comment at the beginning of source file. Full text is available in a file in source directory. You also need license text shipped with executable and explanation which parts are under gpl/lgpl, and who made them.
AndrejaKo
my application must be closed-source, it is a socket-server, i have moved to linux not long ago, i have been using windows and selling my software (source code) to different companies, now i am really confused with linux and its open-source licenses...just 2 more questions:is there any problem if my Compiler-IDE is licensed under GPL (http://en.wikipedia.org/wiki/Dev-C%2B%2B) And is there a problem if i'm using Eclipse (EPL-Eclipse Public License - http://en.wikipedia.org/wiki/Eclipse_Public_License)
Tenev
HMM it looks like i cannot redistribute application under my own license if its compiled with C++IDE-Compiler which is licensed with GPL..
Tenev
@Andreaja: If you wish to release an application under the GPL, any LGPL libraries it may use must be re-licensed under the GPL. (There's a clause in the LGPL which states this may be done.) The re-licensed version of the library will not have the additional freedoms given by the LGPL - it will be GPL only.
Mark H
@tenev: The compiler/IDE you use does not matter to your license, however, the code libraries provided by compilers have their own licenses which must be followed. In the case of DevC++, the default compiler is MingW - which uses libraries licensed under the Library GPL - giving you the freedom to do what you want. Most compilers will have non-restrictive licenses for the libraries, so I wouldn't worry about that.
Mark H
The Eclipse Public License gives you the same (or more) freedoms as the LGPL, and you can combine works under these two licenses without releasing your source, but your application must include a copy of both licenses aswell as your own - and you still have the restriction on modifying LGPL parts of code - the modifications must also be distributed.
Mark H
Thank You All! you all were so clear :)special thanks to Mark H!!!
Tenev
+2  A: 

If you're using the GPL licence you must yourself distribute your application using the same licence. In your case this means releasing also the source code, and I guess this is not what you want.

If you're going to use the older Libgcrypt library, which is LGPL, my advice is to use dynamic linking, so that users are able to replace the library with a different version. You must also attach the LGPL licence in your application's packet and state that you've used the Libgcrypt library, but you aren't obligated to release also the source code of your application.

Note that with LGPL it's also possible to link statically with Libgcrypt, but there is a catch. You must be able to provide a way for your users to rebuild your application with a different Libgcrypt library. A way to do this is to provide object files to your closed-source code and instructions on how to build your application. I think this is more complicated, so I would link dynamically.

EDIT:

You might find this chart from the KDE documentation useful: Open Source Licenses

the_void
Releasing source is usually not the problem. The problem is obligatory releasing sources *under GPL*.
el.pescado
Yes, you're right, I stated that in the first sentence of my answer ;)
the_void
A: 

the library is licensed under GPLv3/LGPL, do i have the rights to SELL/Distribute my EXECUTABLE? do i have the rights to sell/redistribute the source code?

You have always right to sell your executables. GPL makes it a bit complicated and practically infeasible, but you can still sell your code. You have the right to distribute sources. Moreover, you have obligation to distribute source code of your program (in case of GPL) or libraries (LGPL). In case of GPL, you can distribute your program only under the terms of GPL. In case of LGPL you can use whatever license you want.

See GPL FAQ for more details.

If you need cryptographic routines in your apllication, I'd suggest switch to NSS (for which you can choose GPL, LGPL or MPL license) or libcrypto, which is part of OpenSSL released under Apache style license.

el.pescado