Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What happens when you want to mix two libraries with different licences?


If you own one of them, mix in LGPL code, and publish it, the result is entirely LGPL.

If you don’t own it and cannot legally relicense part as LGPL, you’re not allowed to publish it.

Just because you can merge someone else’s code does not mean you’re legally allowed to do so.


This is not correct; you're simply required to follow all applicable licenses at the same time. This may or may not be possible, but is in practice quite commonly done.


> Just because you can merge someone else’s code does not mean you’re legally allowed to do so.

> This may or may not be possible

I am not sure what you are saying, that is different from the comment you replied to.


Completely depends on how much you've "mixed in", and facts specific to that individual work.

Fair use doesn't get thrown out the window because GPL authors have a certain worldview.

Second, there are a lot of non-copyrightable components to source code - if you can't copyright it - you certainly can't GPL it. These can be copied freely by anyone at any time.


You determine if the licenses are compatible first. If they are, you're fine, as long as you fulfill the terms of both licenses.

If they aren't compatible, then you can't use them together, so you have to find something else, or build the functionality yourself.


Some licenses, like LGPL, have provisions for this, some just forbid it.

In the specific ffmpeg case, you are allowed to dynamically link against it from a project with an incompatible license.


You should keep them in different directories and have the appropriate license for each directory. You can have a top-level LICENSE file explaining the situation.


This depends on the licenses.

Copyleft licenses are designed to prevent you mixing code as the licenses are generally incompatible with mixing.

More permissive license will generally allow you to mix licenses. This is why you can ship permissive code in a proprietary code base.

As for linking, “weak copyleft” license allow you to link but not to “mix” code. This is essentially the point of the LGPL.


You dynamicly link against it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: