LGPL and the requirement to provide source code

Discussion in 'Indie Business' started by Adrian Lopez, Dec 4, 2010.

  1. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    To those of you who use LGPL libraries (either statically linked or in DLL form) and include them in your downloadable installer: how do each of you satisfy the LGPL's requirement to provide sources for these libraries when so distributed? Do you distribute your sources with your installer, offer access to the sources as part of the original download, or (for versions prior to LGPL v3) provide a written offer for the source code?
     
  2. Dri

    Dri New Member

    Joined:
    Oct 21, 2010
    Messages:
    48
    Likes Received:
    0
    I thought you only had to redistribute their sources if you changed them?
    Otherwise a simple link to SourceForge (or whatever) in the license.txt file should be Ok.

    That being said, I always do everything I can to avoid LGPL (and of course GPL) libs.
    zlib/libpng, BSD/MIT licenses and public domain are the way to go :)
     
  3. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    Provide a link to the library's source (or whatever the library may want - SDL for example wants a README_SDL.TXT file which points to the project's page).

    You just need to provide the source. You don't have to distribute it with the program. Although strictly speaking you have to provide it from "the same place" as your program, in practice nobody will complain if you link to the project's page or your place. Personally i never heard of anybody getting into trouble from that.

    If nobody forces Apple to distribute the code of the hundreds of GPL programs they distribute with Mac OS X, what is the possibility to try and force you? :p
     
  4. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    You have to distribute the sources unless you link dynamically against the library and you don't include the DLL with your program. If you link statically against the library or otherwise include it with your program, you do have to provide sources.
     
  5. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    No, this isn't how LGPL works.

    If you use a LGPL'd library the only thing you *have* to do is permit disassembling and reverse engineering of the code and either use a dynamic linking mechanism (using the library as a DLL, so or dynlib - depending on the OS - is the most common method) or statically link against the library and provide object code (.o or .obj files) so that someone can recreate the executable by linking the object code with a modified (or the original) library.

    This is section 6 of the LGPLv2 and section 4 of the LGPLv3 with the second option in both versions (6b and 4d1 - ie. the use of a shared library mechanism) being the most common use of LGPL libraries.

    Note that there is a small detail in the wording of the shared code part which can be a bit confusing. A suitable mechanism for a shared library is expected to be "one that (1) uses at run time a copy of the library already present on the user's computer system".

    This means that the DLL must already exist in the user's system when the dynamic linking is performed, however it does not mean that the DLL must be part of the system or exist in the system at any other time except at dynamic linking time (LGPL simply doesn't cover that). You can distribute and install the DLL with your program (no, simply distributing the DLL does not make it part of your program).
     
  6. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    The need to provide object code is only the second part of what's required. The first part requires you distribute the source code to the library itself. From LGPL v2, section 6:

    Notice only the second part of option 6a is conditioned upon linking against the library, while the requirement to provide source code for the library is not so conditioned. Keeping this in mind, why would option 6b not require that source code and modifications to the library be included except because the library is "already present on the user's computer system"? Looking at section 6 as a whole and considering its intent, it seems to me the requirement to provide source code cannot be avoided by linking dynamically against the library when you also distribute the library with your game.
     
    #6 Adrian Lopez, Dec 4, 2010
    Last edited: Dec 4, 2010
  7. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    You keep nothing in mind, you only have to choose one of the subsections and choosing "b" has nothing to do with source :).

    Of course you can always distibute the source if you like. It just isn't required.

    If in doubt you can always ask licensing@fsf.org...
     
  8. Aldacron

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    116
    Likes Received:
    0
    It's an either or scenario. Either you distribute the source and, if linking statically, provide the means for the user to relink your entire executable, or you link dynamically and don't provide the source. That's it.

    SDL is LGPL. Ogre was LGPL for much of it's history, only recently having switched to a different license. Several games have been shipped with both (particularly Ogre) and do not provide the source because they link dynamically. This is a widely understood practice. If linking dynamically, you do not need to distribute the source.
     
  9. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    I'll ask the FSF about the proper interpretation of 6b.
     
  10. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    Here is the FSF's reply to my email:

    So, there you have it. Whenever you include an LGPL'd DLL with your game's installer you must also provide the sources to the DLL according to the terms outlined in the LGPL for distributing the library itself.
     
  11. Bad Sector

    Original Member

    Joined:
    May 28, 2005
    Messages:
    2,742
    Likes Received:
    5
    Yes, but you don't have to *distribute* the sources (notice that he also makes the distinction between distributing the library and providing the sources). Of course distributing the sources is the easiest method, but you can also put them somewhere in your site or give them when asked.
     
  12. Adrian Lopez

    Original Member

    Joined:
    Sep 7, 2004
    Messages:
    489
    Likes Received:
    0
    You have the same responsibility to provide sources for the library as you would with the regular GPL. LGPL v2.1 allows you to include a written offer for the sources instead of the sources themselves, but LGPL v3.0 does not unless it's part of a physical product. Otherwise, you do have to distribute sources either as part of your program's installer or, "if distribution of object code is made by offering access to copy from a designated place", by "offering equivalent access to copy the source code from the same place". GPL v3 is even more explicit, saying you must "maintain clear directions next to the object code saying where to find the Corresponding Source". Hence why I asked what others were doing to satisfy these requirements.

    The idea of including a link to the sources wherever you have a link to the demo or fullversion of your program doesn't seem very pretty, hence my original question.
     
  13. ggambett

    Moderator Original Member Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    1,982
    Likes Received:
    6
    Adrian, just distribute the DLLs and put a "uses XXXX under the terms of the LGPL" in your credits. I've been doing this since 2002 with exactly zero problems.
     
  14. speeder

    speeder New Member

    Joined:
    Aug 22, 2010
    Messages:
    237
    Likes Received:
    0
    Adrian is right, but LGPL people usually won't bother you if you just credit them...

    UNLESS YOU MODIFY THE SOURCE.

    Then they want it. The purpose of the GPL and LGPL is force anyone that modify the thing to release the changes they made, so that the "payment" for using LGPL software is your own work on it.

    That is how those software improve, if you take a GPL software and read the code and the author, you will notice that most of the improvements were made by someone that needed a certain feature (for example, probably the person that made the sculpting mode in Blender is someone that needed it, and don't wanted to buy ZBrush).
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer