Licencing Issue.


paxl13

Member
Joined
Jul 16, 2006
Messages
279
Hi everyone.

I didn't program a lot for '2X but it'll come. I was asking the other day
at my job to somone who knew correctly the GPL and the LGPL licence
what the heck was the TRUE meaning of those licence. So after reading
it in and out for the fun of it. We found this :

http://www.libsdl.org/license-lgpl.php

SDL is under Lesser GPL. What do it mean is that we can't distribuite staticly
linked binary of our hacked HW surface SDL. But we can distribute the .so of
the lib and links against it by ldconfig it before starting the game.

So.. Is this true or not.

I'm a fanatic of the Open Source. so I'll release my game [ if there are :p ] in
open source.. but I still want to know.

Thank for you tough
paxl13
 
Yes, the LGPL only asks for the files needed to recompile the application/library. Some people like to release the source but the object files are enough to satisfy the LGPL.
 
Basically, you have to give people the freedom to alter the SDL used by the program, so this is usually easiest if it's dynamically linked, but as yaustar said, you could distribute the .o files needed to link the program instead. I don't think the HW SDL functions as a dynamic library, so that's about the only option.
 
This post is coming from someone with no knowledge of makefiles or linking whatsoever. Here it goes:

The GP2X wiki article on setting up CodeBlocks tells me this:

Code:
-static -lSDL_gfx -lSDL_ttf -lfreetype -lSDL_image -ljpeg -lpng12 -lz -lSDL_mixer -lvorbisidec -lmikmod -lsmpeg -lSDL -lgcc -lm -lc -lexpat -lpthread

How would I make that dynamically linked so that I may for example release comercial or closed-source software?

- Alex
 
AFAIK as BradN says, the HW accelerated SDL cannot function as a dynamic library so you can't dynamically link the libraries. I am not sure about the licenses for the other non-SDL libs.

Side question: Can you get the direct C/C++ source just from the Object files?
 
Alex. posted on Aug 16 2006 at 09:01 PM said:
This post is coming from someone with no knowledge of makefiles or linking whatsoever. Here it goes:

The GP2X wiki article on setting up CodeBlocks tells me this:

Code:
-static -lSDL_gfx -lSDL_ttf -lfreetype -lSDL_image -ljpeg -lpng12 -lz -lSDL_mixer -lvorbisidec -lmikmod -lsmpeg -lSDL -lgcc -lm -lc -lexpat -lpthread

How would I make that dynamically linked so that I may for example release comercial or closed-source software?

- Alex

I believe you can just pull out the -static and put the library .so files in the directory where your binary resides.
 
Last edited by a moderator:
I don't know if you can mix and match but some of those libraries are okay to statically link (if you can figure out how to do it) without distributing source. For example, the freetype library only requires that you acknowledge in your documentation that you used their code, but they don't care whether you provide source or how you link it (most things that claim a 'BSD-style' license are this way). See http://freetype.sourceforge.net/FTL.TXT for details in this case.

I'm pretty sure that the jpeg, png, z, and vorbis libraries are similar, but don't know about the others (except for gcc, m, c, pthread which are all standard).
 
yaustar posted on Aug 17 2006 at 05:25 AM said:
Side question: Can you get the direct C/C++ source just from the Object files?


If I got your question correctly, you are asking if it's possible to DECOMPILE c/c++ object files, right?
If that was your question, the answer is no:

A C\C++ decompiler is an animal that doesn't exist (well known quote among people interested in reverse engineering )
 
Last edited by a moderator:
The best you can do with a decompiler is getting back some code that may or may not do the same thing (if the thing doesn't crash in the process), and you're missing all the internal identifiers and comments. I'd imagine that decompilers get less accurate if the optimization settings were higher when it was compiled, so by that point, you might as well just disassemble it and go from there instead.

Anyway, it's not a big deal to include the object files, and in some cases might allow porting the program to a "gp2x successor" without recompiling - just linking in a new SDL instead. And let's be honest, a lot of developers probably wouldn't stick around long enough to port things; such is the nature of hobby projects.
 
sehs33 posted on Aug 16 2006 at 06:35 PM said:
If I got your question correctly, you are asking if it's possible to DECOMPILE c/c++ object files, right?
If that was your question, the answer is no:

A C\C++ decompiler is an animal that doesn't exist (well known quote among people interested in reverse engineering )
Ahh.. that's what I wanted to know, cheers.
 
Last edited by a moderator:
Awesome, so would it be legal/ethical to release commercial software with the GPH SDL libs linked statically, and provide the .O files?

- Alex
 
BradN posted on Aug 17 2006 at 02:10 AM said:
Basically, you have to give people the freedom to alter the SDL used by the program, so this is usually easiest if it's dynamically linked, but as yaustar said, you could distribute the .o files needed to link the program instead. I don't think the HW SDL functions as a dynamic library, so that's about the only option.

I'm not sure if there has been a misunderstanding or not of what BradN said, but just to make it totally clear...

To use an LGPL library and not be required to release your source you must either:
a) Link with the library dynamically
B) Link with it static but provide the unlinked object files for your program such that someone can relink them with (a potentially never version of) the GPH SDL libraries.

That's probably what you meant by 'and provide the .O files', Alex, but it's important to get things right :)

Andrew
 
Last edited by a moderator:
Are you legally required to make these available at release time or just upon request? It'd be a little awkward to sell someone a commercial game and have to mail them a CD with .o files they won't know what the fuck to do with otherwise.
 
Well then I guess you could make a sub-folder somewhere in the game folder called 'obj' or something, and put the generated .o files there. Thanks for clearing it up for me Andrew!

- Alex
 
Epicenter posted on Aug 17 2006 at 09:59 AM said:
Are you legally required to make these available at release time or just upon request? It'd be a little awkward to sell someone a commercial game and have to mail them a CD with .o files they won't know what the fuck to do with otherwise.
The requirements seem pretty clear from the license:

To comply with this license, you must give prominent notice that you use the Simple DirectMedia Layer library, and that it is included under the terms of the LGPL license. You must provide a copy of the LGPL license.
You must also do one of the following:

1. Link with the library as a shared object (e.g. SDL.dll or libSDL.so)

2. Provide the object or source code to your application along with any libraries and custom tools not available with a standard platform development kit. You may also simply provide a written offer, valid for three years, to provide these materials upon request to anyone with a legal copy of your application.
If you include the SDL library in object form, you should also make available the source code to the version you provide, including any customizations you have made. If you link to a standard version of the library, simply referring to the SDL website is sufficient.
No gp2x version is a "standard" version (because they can't get the code from the SDL web site).
 
Last edited by a moderator:
Can I just clarify this,

From another thread:-

If you static linked the SDL libs, you might have to at least provide the .o object files (ie, what would be necessary to re-link it with a different version of SDL), and the source for the SDL you used. You don't have to provide your program source.

So if I release a game that's statically linked, and I provide the two object files my game uses (C5Sprite.o and shell.o), as well as a copy of the GPL, then this should be sufficient to cover me legally?

EDIT: Here is the actual thread:- http://www.gp32x.de/board/lofiversion/index.php/t29851.html
 
Last edited by a moderator:
Gadget posted on Aug 17 2006 at 03:26 PM said:
So if I release a game that's statically linked, and I provide the two object files my game uses (C5Sprite.o and shell.o), as well as a copy of the GPL, then this should be sufficient to cover me legally?

That should do it. If you've got any non-standard libraries (I guess the meaning of that is open to some interpretation) statically linked in, you may want to provide the .so or .a or whatever is used for them too. Things like libpng and such that haven't been customized for the gp2x probably aren't a concern though. BTW, make sure you include a copy of the LGPL (not GPL) :)
 
Last edited by a moderator:
Back
Top