Does extending GPL code make the new code GPL too?

  softwareengineering

I am currently adding some functionality to a popular open source project. It written in C and in Every file GPL license text is embedded. The functionality I am adding is not supported by the project. So you can say its some sort of extending.

My code gets compiled when the main project is compiled. My code is inside the main project and its integrated heavily.

Let me explain more thoroughly. Basically I know of two types of linking.

  1. My program uses mysql c api. so I link my c code with libmysqlclient. Here I am using libmysqlclient

  2. My code adds hash-table functionality on libmysqlclient so user can access fields by column name.

My project is of second type. Should it be GPL? What about the first scenario (I am curious)?

6

Yes. The GPL is a viral license; anything you extend the project with, or even link to it with shared libraries, must either be GPL or a compatible license, which includes many but not all other open-source licenses.

What you want to do is to create a derived work. To do that you need permission of the copyright holder. If the work you want to modify is GPL licensed, then the license gives you this permission. You can use the derived work privately or within your company without any obligation.

If you want to distribute the derived work (or just the original) you need the permission of the copyright holder. The GPL license gives you permission to distribute the work but only if you distribute it under the GPL license. (And promise to provide the complete source code).

Nothing makes your code GPL licensed. But there are situation where you have the choice between GPL – licensing your code or committing copyright infringement.

In case (2), where you have actually added code to an existing GPL’ed project, the GPL is very clear that you are creating a derived work, which is subject to the GPL.

In the case of (1), there is some disagreement about whether or not linking to a GPL library obligates you to license your product under the GPL. Personally, I am of the mind that you can do whatever you want by linking to a GPL library. It seems to me that in this case, you are simply making use of the library, not creating a derived work.

However, it is also good to know that there is another license called the “LGPL” which specifically states that you are not obligated to license a product under the GPL as a result of linking to an LGLP library.

4

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT