Jump to content
  • Advertisement
Sign in to follow this  
Shael

LGPL

This topic is 2691 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just need some clarification on LGPL.

Can I statically link an un-modified library/source that is under LGPL and NOT release my source code that uses it?

I'm writing a library that uses another library but I'd prefer to link statically rather than dynamically to avoid having an extra DLL laying around and thus keeping my library self contained. The problem is this library I'm writing could become commercial so I don't want to be forced to release the source with the binaries.

Share this post


Link to post
Share on other sites
Advertisement
AFAIK, no. The user of the binary must be able to recompile the binary themselves (which would require your source).

Share this post


Link to post
Share on other sites
If you merely statically link to LGPL code, you have to release your source as well.

However, if you can provide a way for users to relink the LGPL library to your program, then you can statically link to the library without releasing your source. The user must be able to recompile the LGPL library themselves and be able to use it with your program. This is the obvious reason dynamic linking is preferable, since you can easily comply with this license condition.

Share this post


Link to post
Share on other sites
Thanks for the clarification. Looks like I'll just have to go with Dynamic Linking and have the extra DLLs sitting alongside.

EDIT: What is the main difference between GPL and LGPL?

If I write code that wraps a library but doesn't modify the actual library I'm wrapping can I get away with using dynamic linking and not provide the source to the wrapper? (in both GPL and LGPL)

Share this post


Link to post
Share on other sites

Thanks for the clarification. Looks like I'll just have to go with Dynamic Linking and have the extra DLLs sitting alongside.

EDIT: What is the main difference between GPL and LGPL?

If I write code that wraps a library but doesn't modify the actual library I'm wrapping can I get away with using dynamic linking and not provide the source to the wrapper? (in both GPL and LGPL)


The main difference between GPL and LGPL is that you can use LGPL in a non-GPL program.

A prime example of that is the GNU implementation of the language standard library. It is licensed under the LGPL. That means you can use the GNU compiler link to their implementation of the standard library, but that doesn't turn your program into a GPL-covered work. You can use any implementation of the language's standard library that you want. If they had not used the LGPL, simply using the GNU Compiler Collection could be enough to infect the program with the GPL.


The problem is this library I'm writing could become commercial so I don't want to be forced to release the source with the binaries[/quote]

It seems you are struggling against the fundamental goals of GPL.

The entire purpose of the GPL (and the LGPL) is to encourage freedom of software. An intended and very clear side effect is that this makes it harder to commercialize and profit from software itself. Limiting software to those who pay an arbitrary licensing cost is contrary to the freedoms. Many businesses are quite profitable for providing support and custom development on GPL software, but not from the software itself.

The main reason to choose the GPL instead of other F/OSS licenses is that it must be made available for everyone, and that those who use it in released products must also make those available for everyone.


If you do not wish your product to be made available for everyone then don't touch the GPL. Don't touch any libraries that are licensed under the GPL. In that situation the license is directly contrary to your goal of a commercially-restricted product.

Share this post


Link to post
Share on other sites

Thanks for the clarification. Looks like I'll just have to go with Dynamic Linking and have the extra DLLs sitting alongside.

EDIT: What is the main difference between GPL and LGPL?

If I write code that wraps a library but doesn't modify the actual library I'm wrapping can I get away with using dynamic linking and not provide the source to the wrapper? (in both GPL and LGPL)


No, in the case of GPL any linking (wrapped or not) will most likely require releasing all code under the GPL, (There are a few exceptions, you can for example have GPL licensed plugins to proprietary applications(Through the system library exception in the GPL you're allowed to link with proprietary software or libraries that the end user can be expected to have on his machine (This basically allows you to link against win32, direct3d, or the host software in case of third party plugins)) or in a few specific cases GPL licensed software that can use proprietary plugins (This is effectivly only allowed if the plugins use a standard format that isn't specifically tied to the GPL licensed software, a GPL licensed 3dsmax plugin loader for blender wouldn't require 3dsmax plugins to be GPL:ed for example).

With the LGPL you don't have to release any code except modifications/additions you make to the LGPL module itself, you do however need to provide users with the tools needed to replace or modify the LGPL portion of the software which effectivly leaves you with 3 options:

1) use dynamic linking (your wrapper loads a LGPL:ed dll file, the user can then replace this dll file with their own modified version)
2) release your own sourcecode
3) provide compiled object files. (This allows you to do static linking against LGPL code in a proprietary project, but its quite a bit of a hassle compared to dynamic linking).

Share this post


Link to post
Share on other sites

The entire purpose of the GPL (and the LGPL) is to encourage freedom of software. An intended and very clear side effect is that this makes it harder to commercialize and profit from software itself. Limiting software to those who pay an arbitrary licensing cost is contrary to the freedoms. Many businesses are quite profitable for providing support and custom development on GPL software, but not from the software itself.
[/quote]

This is a reasonable business model for business software and libraries, tools, etc. But I don't see how that works as a business model for a game. Maybe some online games where the gamer is paying for access to the server and game environment. But for other games?

Share this post


Link to post
Share on other sites


The entire purpose of the GPL (and the LGPL) is to encourage freedom of software. An intended and very clear side effect is that this makes it harder to commercialize and profit from software itself. Limiting software to those who pay an arbitrary licensing cost is contrary to the freedoms. Many businesses are quite profitable for providing support and custom development on GPL software, but not from the software itself.


This is a reasonable business model for business software and libraries, tools, etc. But I don't see how that works as a business model for a game. Maybe some online games where the gamer is paying for access to the server and game environment. But for other games?
[/quote]

Seems like another misunderstanding of the GPL.

The GPL is designed only for code. It explicitly mentions source code and executable code. The FSF has a brief statement where they list the goals and freedoms the GPL is expected to provide. They include the ability to re-distribute the code for any cost or no cost, and the ability for anybody to tinker with it. There are many successful business models that can evolve from it, but paying for the source or executable code is not one of them.

The GPL was not designed for documents, images, sounds, or other non-code materials. There are other licenses you should use for stuff that isn't code, like the GNU Free Documentation License (GFDL).

Attempting to apply the GPL to a full game including its non-code assets is generally not proper.


The GPL does not affect most web games because the game provider never releases either the source or executable code; they never distribute it, instead only showing the results after being processed. There have been many web-based games that rely on GPL code on the back end that do not need to release their source. (Note that if they were using software released under the AGPL then things would be different. Several GPL projects have moved to the AGPL license. )

There are many companies that rely on GPL systems within their tools and private build chain; these are not subject to the GPL's requirements because they never distribute or release them.

Several games have used a dual-license release, but it requires a skilled lawyer who understands the GPL and IP law. It is not something I recommend unless you are very sure of your company's future.

A few games have successfully released a GPL engine with non-GPL assets, and offered to support others to expand and improve the engine. You will want to discuss this carefully with your own lawyer first; there is legal nuance involved, and it is very difficult to "put the genie back in the bottle" if you make a mistake, especially since the Internet remembers everything.

Share this post


Link to post
Share on other sites
Pretty confusing stuff but I think I've found a solution. The library I'm using (ffmpeg) actually comes in LGPL and GPL. I simply have to compile with a couple flags to strip out any GPL related code/plugins. I should then be able to use dynamic linking and not have to release my source.

I still find it odd that with GPL you are forced to release your source even if you don't modify the original thirdparty library and you link dynamically. Essentially the code you have written is entirely yours apart from it using methods freely available in the unmodified thirdparty library.

Ah well.. the LGPL version should suffice. Thanks for the help guys.

Share this post


Link to post
Share on other sites

I still find it odd that with GPL you are forced to release your source even if you don't modify the original thirdparty library and you link dynamically. Essentially the code you have written is entirely yours apart from it using methods freely available in the unmodified thirdparty library.


What do you find odd about it? Yes it is unconventional, but the FSF is very clear about the expectations of the GPL.

Go read the GPL Philosophy. Among them is that software should not have owners; that all users of software should be free to use it for anything and in turn contribute their own software back to the community.

Note that the GPL Philosophy page also includes links to articles where the FSF and its founders give examples of where Free Software is unnecessary or not practical. Even though they push the concepts of Free Software, they recognize the realities that this is not always practical.


Nearly all companies understand this. Don't touch GPL if you have commercial interests in selling the software. It is very simple.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!