Mac Converting GPL code to new language, can I change the license?

foidulus

macrumors 6502a
Original poster
Jan 15, 2007
906
1
There is a (relatively) simple library that I would like to convert from C++ to C, and then incorporate into a BSD licensed project I am working on.

Am I allowed to look at the GPL code, convert it, then release the result as BSD? Or do I have to go more "clean room" and totally re-implement the algorithm without looking at the GPL code.

Yes I know the standard "get a lawyer" answer, but I was wondering if anyone had any experience with this.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,597
60
Harrogate
do I have to go more "clean room" and totally re-implement the algorithm without looking at the GPL code.
I am not a lawyer but I'd say this: if you read their code and just re-type it/convert it to another language you are "tainted" by the GPL licensed implementation.
 

firewood

macrumors 604
Jul 29, 2003
7,757
872
Silicon Valley
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

The way big corporations do this is to look at the code and write a detailed spec that itself contains none of the copyrighted material. The give the spec to someone else who has never seen the code (perhaps they can't even read the code's original language), only your spec.
 

foidulus

macrumors 6502a
Original poster
Jan 15, 2007
906
1
Unfortunately I'm not a big corp, I'm just a lowly grad student, I don't own the rights to change the license of the code I want to integrate the GPL code with.

Well, if I cannot change the language, is creating a separate iPhone library, releasing the code to said library under GPL, then statically linking it to an iPhone application considered a violation?
 

robbieduncan

Moderator emeritus
Jul 24, 2002
24,597
60
Harrogate
Well, if I cannot change the language, is creating a separate iPhone library, releasing the code to said library under GPL, then statically linking it to an iPhone application considered a violation?
You are still creating a derivative work so your derivative work has to be GPL (and you cannot give yourself a different license to your derivative work). If you statically link to said derivative work (the library) you must release your iPhone app code as GPL as well.

This is what Balmer meant when he said "Linux is a cancer". He was really referring to the GPL and the way that anything that is linked against it turns GPL as well.
 

balamw

Moderator
Staff member
Aug 16, 2005
19,095
963
New England
Which library is it anyway? Most libraries use LGPL precisely for this reason. Maybe someone here can point you to an alternative with a more compatible license.

B
 

crackpip

macrumors regular
Jul 23, 2002
210
0
I am also not a lawyer, but in general algorithms are not subject copyright only the source code itself. Now it is possible that a process is patented; however, FOSS resistance to software patents would make me think this is not an issue.

The reason you need to follow the GPL license is because the source code is under copyright protection. As long as you don't copy significant portions of the source code (which includes simply renaming variables), rewriting in a different language is simply reimplementing the algorithm and would not be subject to that clause in the GPL, i.e. you could license the code under BSD.

crackpip
 
Last edited:

firewood

macrumors 604
Jul 29, 2003
7,757
872
Silicon Valley
Translations of books into other languages are usually considered to be covered under the copyright of the work in its original language. The usual thinking is that specifications of the algorithms used are not. (But IANAL.)
 

Mac_Max

macrumors 6502
Mar 8, 2004
404
0
If you're worried about licensing, a clean room approach (or at least something that looks like that) is probably the best way to go. Or do some googling to find something licensed under a less restrictive license for your purposes. Or contact the author and ask him to do a secondary license (the author can license it in more than one flavor even if the licenses conflict) in LGPL or BSD license.
 

foidulus

macrumors 6502a
Original poster
Jan 15, 2007
906
1
Thanks for all the advice. I ultimately wound up doing what everyone here suggested, just re-implementing the algorithm in C. Just did my first commit to Google code with a BSD license, I personally don't like GPL. Still a little rough around the edges, but it works. Thanks for all your help!:D
 

firewood

macrumors 604
Jul 29, 2003
7,757
872
Silicon Valley
Congratulations. BSD is a great license with a long history.

Rough around the edges is fine for a start. And a new different set of bugs is probably great evidence that the code isn't just a copy.