Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I thought LGPL was a permissive license, just like MIT, BSD or Apache. But today I read, that only linking to LGPL (libraries etc) is allowed from closed-source code - other than that, it's copyleft - so I have to publish code that is based on an LGPL program.

I created a program for my employer that is based on an LGPL program, but has considerable modifications to it. Of course, I am not allowed to put that modified source code out there. At the same time, I have to, if I distribute it (right?).

So I wonder whether there is a workaround to this, so I can keep this closed-source (I wish I could publish the source) - any suggestions?

My idea: can I put most functions of the original LGPL app into an external library, write the core executable from scratch, but refer back to the library for all functions that I haven't modified?

Currently, everything is in a .jar file (it's Java/Swing). if you think my idea is legally/technically feasible - how much effort would it be to seperate what I wrote and what the original is? I'm not the most java savvy.

share|improve this question
    
In this post, the guy says "Additionally the LGPL can be circumvented by just putting it in a new dll and use delegates or interfaces to call it from the LGPLed sourcecode." - can somebody elaborate a bit more how I do this with the original Java app? –  Dave May 17 '11 at 20:38
15  
this isn't a legal website, I wouldn't take any advice on legal matters from anyone here, except the advice to go get real legal advice of course. –  Jarrod Roberson May 17 '11 at 20:45
5  
The LGPL is mostly concerned with distribution and you haven't given us any information about the way you plan to distribute this code. The question is unlikely to get accurate answers until you do so. In any event, I will reiterate that you should not take legal advice from the internet. –  Rein Henrichs May 18 '11 at 0:29
    
I believe that I now understand LGPL fairly well in terms of legality. So I'm really asking you guys about how to make it work technically - though you're right of course - in case of doubt I'll consult a lawyer. –  Esuus May 18 '11 at 15:17
    
You don't say what software you are using, but some providers of GPL/LGPL (and other) software provide commercial licenses for people in your situation. –  Jaydee Apr 2 '12 at 9:42
add comment

migrated from stackoverflow.com May 17 '11 at 20:38

This question came from our site for professional and enthusiast programmers.

8 Answers

First of all, taking legal advice here (as in: the internets) is not a good idea.

Secondly, and this is just me speaking, not a lawyer, you should've thought of that before you took a LGPL'ed program and modified it for your employer.

If the license was something you could disregard just because you didn't like it, there wouldn't be much point in having one now would there?

If you and/or your employer is not willing to publish the source code with your modifications, you need to stop using that LGPL'ed code and get rid of it.

Again, that's just me speaking.

Get advice from a real lawyer.


In response to your question about circumventing the license by adding the code to a DLL, I would assume that would work in the following fashion.

What you would do would be to change the original program enough to make it able to call functions in external libraries. You would have to do so without making that piece of code specific to your needs, libraries, names of functions, etc.

Those changes you then publish, as per the license requirements.

Then you make your own external library with your own proprietary code and ask that program to load and execute it, using those modifications you made to it.

Not knowing the full extent of the LGPL license, I can't say if that is enough to avoid having to publish your library though I suspect it will.

However, again...

Get advice from a lawyer

share|improve this answer
4  
Note that the FSF, who wrote the GPL license family, consider dynamic linking to create a derived work, so that may not work. (Other people think the FSF is wrong.) I don't think there is a legal determination, although I may well be wrong. –  David Thornley May 17 '11 at 22:09
    
Really? I'm convinced you know more about this than me, David, but wikipedia says that you can even dynamically link to GPL-licensed libraries without having to publish under GPL: "For example, the GPL linking exception allows programs which do not license themselves under GPL to link to libraries licensed under GPL without thereby becoming subject to GPL requirements." So that makes me wonder now what the difference between GPL and LGPL is: I thought only LGPL allowed that. –  Esuus May 18 '11 at 15:24
2  
@Dave: My employer's large Legal team would disagree. They are very aggressive about protecting their intellectual property, and we are explicitly forbidden from linking GPLed code to our own unless we're distributing the code under the GPL. Where did you find that exception? I don't see it in GPLv2 or v3. It sounds like you're referring to a linking exception that is not part of the vanilla GPL. Copyright owners may add a linking exception to their GPLed code at their discretion, however. Consulting one's Legal team is really the best thing to do. –  Void May 18 '11 at 16:19
4  
I wouldn't trust Wikipedia on this. For all you know, the entry is written by a 14-year old who read about licensing the previous weekend. Get real advice. Or, you could bet the farm and hope your company doesn't get in trouble. Whatever works. –  Lasse V. Karlsen May 18 '11 at 18:41
    
@Dave linking to the GPL is a problem. As far as I know, this was one of the major reasons for FreeBSD to drop GCC in favour of Clang/LLVM. –  Legolas Apr 2 '12 at 6:42
add comment

Most open source libraries published under LGPL or comparable license, at least ones good enough to use in your projects, are built using open/closed principle: http://en.wikipedia.org/wiki/Open/closed_principle .

You should be able to refactor your code so that your application is linked to the LGPL library and all extensions are contained in your closed application code.

share|improve this answer
    
Well, the LGPL code I used is an application, not a library.. so the question is whether I can turn it into a library or - like Lasse suggested - turn my code into a library and keep the rest LGPL/open –  Esuus May 17 '11 at 20:47
1  
@Dave: LGPL used to be known as Library GPL. I really haven't seen any applications using this license. What were you using, if it is not a secret? –  Olaf May 17 '11 at 20:55
    
The FSF now calls it the Lesser GPL. The only use I can think of right now for apps is being able to link in proprietary libraries and the like. –  David Thornley May 18 '11 at 13:42
    
Interestingly, both Mozilla and OpenOffice.org are licensed under LGPL. –  Esuus May 18 '11 at 15:17
    
@Dave: Then I'm with @David Thornley. Mozilla provides means to create custom plug-ins which can be closed code. I'm not that familiar with OpenOffice, but I bet they do it to. Does the LGPL application that you use provide some sort of extending functionality, like adding plug-ins or having a script language? Can you use that mechanism for your code? –  Olaf May 18 '11 at 15:21
show 1 more comment

Same disclaimer: IANAL.

Something nobody else has mentioned so far is that even if you do separate the code, you still have to distribute the source code to the LGPL parts, or at least give information about where they can be downloaded.

The only way to get around that is to not distribute them in the first place.

share|improve this answer
add comment

I don't think that you need a lawyer to understand that trying to circumvent a license is not a good thing. Common sense is enough.

Instead, you can contact the original author of the LGPL program and ask/buy for a different and proprietary license.

The only other alternatives are to release the source or to rewrite it completely.

share|improve this answer
add comment

IANAL, TINLA, etc.

I thought LGPL was a permissive license, just like MIT, BSD or Apache. But today I read, that only linking to LGPL (libraries etc) is allowed from closed-source code - other than that, it's copyleft - so I have to publish code that is based on an LGPL program.

Yes, the LGPL requires that either you make available the source code to anyone who receives a copy of the work, or you must distribute your work in a form where recipients of the software can replace your version of the LGPL'd work with a new version. In either case, all modifications to the LGPL portion of the work must be available to all recipients of the work.

I created a program for my employer that is based on an LGPL program, but has considerable modifications to it. Of course, I am not allowed to put that modified source code out there. At the same time, I have to, if I distribute it (right?).

Correct. The license mandates that all recipients of the software are to be given access to the source code.

My idea: can I put most functions of the original LGPL app into an external library, write the core executable from scratch, but refer back to the library for all functions that I haven't modified?

That may constitute a derived work, and you'll still be required to distribute all build scripts that strip down the program to a library.

Currently, everything is in a .jar file (it's Java/Swing). if you think my idea is legally/technically feasible - how much effort would it be to seperate what I wrote and what the original is? I'm not the most java savvy.

Java adds a whole slew of new problems to the LGPL, since it's not clear what constitutes "static" and "dynamic" linking. Since the LGPL's exceptions over the GPL rely on that concept, the LGPL is really equivalent to the GPL in most cases. You will need to consult the company's legal team to answer any questions that will raise.

My advice is that if anyone outside your company will have access to the program, scrap it and start over. If you cannot meet the requirements of the license, then you are not permitted to distribute it, at all.

If the program will only be available within the company, then you are only required to make source available to company employees. I'd suggest adding it to your existing company source control. This will satisfy the requirements of the LGPL, so long as no one outside the company will have access.

share|improve this answer
add comment

you may use adapter pattern and don't touch the original code. Also LGPL allows you to inherit classes and override functionality of it's classes in your own project.

share|improve this answer
add comment

This is my understanding, IANAL.

Check the text of the LGPL version that covers the code you are using. I believe that the requirement is that any LGPL'd code needs to be swap-out-able -- usually by using a shared library/jar file. If you can separate the code you use that is LGPL'd into a library, you can release that under the LGPL, while releasing your application under whatever license you like.

share|improve this answer
add comment

You can't circumvent the license. Even if you find a loophole, it's still unethical (though that's a different question for some people). What you CAN do is contact the author of said software, explain the situation, and ask for a separate license. If he is willing to give you a special license for a price, you can compare this to the cost of rewriting your software without using the component in question. And simply go with the cheaper one.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.