open source licenses issue

Por santiontanon

Paragon (1362)

Imagen del santiontanon

11-04-2021, 23:56

Hi! As part of my MDL project, I was interested in using code from another project with is licensed under a GPL3.0 open source license. However, (due to some stupid legal reasons of my employer) my GitHub projects use an Apache license. I know I cannot use GPL code in an Apache licensed project. But do you guys know if I can, for example, include compiled code from the GPL project (just the jar files), and then just create classes that extend those inside of my project to modify whatever I want to modify? So, basically I will not be including code, just the compiled classes from those projects. Would that be problematic as well?

(I just want to make sure I respect the licenses hehe)

Login sesión o register para postear comentarios

Por Grauw

Ascended (9762)

Imagen del Grauw

12-04-2021, 00:32

I can’t really properly answer your question, because GPL is a quagmire to me. It’s why I never use or include GPL, even though my employer does not have any business with my personal projects Smile.

The most likely answer though is no you can’t do it and your code will automatically become GPL licensed as well. That’s what GPL usually ends up doing, it’s infective. The exceptions under which it would not do that are very rare and software must be really separate, barely integrated entities for them to apply. As-in one program invoking another through a process fork. Extending classes is almost certainly not among those exceptions, probably not even for LGPL.

Por santiontanon

Paragon (1362)

Imagen del santiontanon

12-04-2021, 01:35

Hmmm, I see. I think you are right. I really don't care if my project becomes GPL automatically (and my employed will probably never find out), but I just want to have my back covered just in case.

I basically wanted to use the Z80core project ( https://github.com/jsanchezv/Z80Core ), which provides a z80 emulator, that I wanted to use for a "super-optimizer"-style optimizer. I do not think I want to build a z80 simulator from scratch given there are so many already existing! But oh well, I'll look at options and in the worst case, building my own simulator might be a fun exercise anyway :)

Por geijoenr

Master (237)

Imagen del geijoenr

12-04-2021, 08:50

Quote:

But do you guys know if I can, for example, include compiled code from the GPL project (just the jar files), and then just create classes that extend those inside of my project to modify whatever I want to modify? So, basically I will not be including code, just the compiled classes from those projects. Would that be problematic as well?

I think what you are proposing would be equivalent to "linking". And there appears to be some lack clarity regarding under which circumstances "linking" produces a derivative work. Not a lawyer, but to be safe, I would better avoid it.

EDIT
I confirm the licenses are incompatible, including linking as explained here.
https://www.apache.org/licenses/GPL-compatibility.html

Por turbor

Champion (472)

Imagen del turbor

12-04-2021, 12:03

It is strange to me, how people can find GPL hard to understand...

It is (to me) a pretty straight forward license agreement. In short, if you accept the license the author gives you the permission to use/share/copy/study/modify the program and source code. If you build something upon this program/source code it becomes a derivative work and you agree that by doing so you will use the same license so that those rights of sharing/modifying/... remain in effect for the newly create program as well.

If you only distribute the binary then you must make it possible for other people to obtain the source. Heck most people don't even seem to know that the GPL even allows you to ask a reasonable compensation for getting the source code to the person asking for it (This stems from the time that you had to copy disks, buy stamps etc etc aka pre-internet-times)

It is an EULA like all the other programs use. Agreed, most commercial software will not install if you decline the EULA and will not allow you the freedom of copying (even for yourself as back-up!) or sharing with others.

So the GPL is all about freedom for the user and upholding those freedoms if you creating something based upon the free programs (aka derivative works).

@geijoenr: Yes, linking (both compile and/or run-time) is considered building upon the functionality of the program, so the GPL applies. the 'lack of clarity' stems from the fact that some authors (like Linus Torvalds) added an explicit linking allowance to their product(Linux kernel). Linus did this to allow proprietary kernel modules, otherwise all kernel modules should be made GPl'ed and he didn't find this a reasonable necessity. Since the Linux kernel is the most well known GPL'ed program this extra to the GPL has caused quite some problems with people misinterpreting the linking side of things. Stallman, the original author of the GPL is verry clear on this however, any linking is producing a derivative work since you use functionality of the GPl'ed program.

Sometimes an author chooses the LGPL (==lesser GPL ) as to make libraries possible, this way you can use the library in your non-GPL'ed software, but at least the freedoms for the library(code) have to be upheld. So allow access to the source of the library and any modifications you make to the library...

Now, an author can use multiple licenses on the some software they hold the copyright to.
A lot of software use dual (or more) licenses. For instance you can use a lot of framework and infrastructure software under the GPL license or a commercial license. So pay the fee for the commercial license and you do not have to GPL your software! (but have to folowo the EULA they present with the commercial offering of course)

In your case, you could ask if the jsanchezv is willing to dual license his Z80Core under an Apache license as well...
If he agrees that would solve your problem. Smile

Also writing a new Z80 is fun exercise indeed and there are plenty of Z80 test tools/libraries available to help you ironing out any bugs. Generic opcodes etc are relatively easy (although tedious). Implementing the undocumented opcodes and sometimes subtle/strange flag behaviour is the challenge in creating a new Z80 core. Tongue

Por santiontanon

Paragon (1362)

Imagen del santiontanon

12-04-2021, 17:57

Thanks a lot for the explanations!! That makes sense!

I just found this other project that has an Apache license and I might be able to use then. I'll play around with it to see if it also has what I need: https://github.com/codesqueak/Z80Processor