0

I want to use LGPL for my project, can I use some source code which is apache licensed ?

If I only use the apache licensed component as library in my project, how should I make the clarification in my project ? Do I need to put some information about apache license at the beginning of source code which uses the library?

closed as off-topic by Robert Harvey, gnat, 8bittree, Simon B, user949300 Feb 15 '18 at 17:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking for legal advice or aid are off-topic here. You may be able to get help with understanding, applying, and complying with free and open licenses on Open Source. You may be able to get help with legal terms, concepts, language, and procedures on Law." – Robert Harvey, gnat, 8bittree, Simon B, user949300
If this question can be reworded to fit the rules in the help center, please edit the question.

2

As the Apache license is deemed compatible with the (L)GPL v3, you can use Apache licensed code in your LGPL project.

If you use the Apache licensed code only in the form of a library, the conventional way is

  • keep the Apache licensed library in a separate directory/sub-tree of the project
  • mention in your documentation (readme) that you use such-and-such library and under which license it is being distributed.

In your source code, you don't need to mention that a function/class comes from a separate library. The fact that it has a different license should be obvious from the copyright statements in the respective source files.

  • I need to copy some functions from the apache licensed source code into my project, and make some changes to them. In this case, should I declare in the top area of my file that some functions are from apache licensed code ? – crypto__ Dec 5 '13 at 8:18
  • @crypto__: If possible, I would keep those functions in a separate file from the rest of your code and make it clear in that file where you got the code from. If a separate file is not feasible, I would state at the top of the file that different licenses apply to different functions and which license applies to which function. – Bart van Ingen Schenau Dec 5 '13 at 9:27
  • The linked page doesn't mention LGPL imho. It means LGPL and Apache are both compatible with GPL, so if you publish your project under GPL it would be no problem. But I don't know when it comes to LGPL. – Felix Yan Jul 14 '14 at 22:48
  • @FelixYan: The only difference between the GPL and the LGPL is that the LGPL allows a covered library to be dynamically linked to a closed-source application, which the GPL doesn't. As the LGPL is more permissive than the GPL, licenses compatible with the GPL are also compatible with the LGPL. – Bart van Ingen Schenau Jul 15 '14 at 6:12
1

GPLv3 and LGPLv3 licenses are be compatible with the Apache v2 license, meaning you can incorporate Apache v2-licensed code into an LGPLv3 library. (Note that the reverse is not true, see https://www.apache.org/licenses/GPL-compatibility.html).

As for the way in which you used the Apache v2 licensed code, the Apache v2 does not apply too many restrictions. If you were to copy a handful of functions (or even lines from a function) into your LGPLv3-licensed code, you'd need to do the following:

  1. Ensure the applicable copyright, patent, trademark, and attribution notices are reproduced in your source (e.g. placed prominently in a comment block near the top of your header file).
  2. Note which code that license applies to. If you've copied functions, you could e.g. place a notice that identifies the functions by name. If you copied a block of code from within a function, you might delimit it with comments.
  3. Include a copy of the Apache License v2 in your code. Typically, I put these in a "Third-party licenses" folder in my documentation folder.
  4. If the code comes with a NOTICE file, reproduce this in its entirety.

Note that the other requirements of the Apache License are adequately covered by the LGPLv3 license itself.

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