speaking of GPL

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

speaking of GPL

Post by jdart »

File nnue_training_data_formats.h, included in https://github.com/bmdanielsson/nnue-trainer and https://github.com/glinscott/nnue-pytorch, has a copyright notice from Tomasz Sobczyk and a MIT license at the head of the file. However, this file includes the "nodchip" namespace, which has this comment:
// This namespace contains modified code from https://github.com/nodchip/Stockfish
// which is released under GPL v3 license https://www.gnu.org/licenses/gpl-3.0.html
These two licenses (MIT and GPL) are incompatible.
dkappe
Posts: 1631
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: speaking of GPL

Post by dkappe »

jdart wrote: Sun Feb 28, 2021 4:47 am File nnue_training_data_formats.h, included in https://github.com/bmdanielsson/nnue-trainer and https://github.com/glinscott/nnue-pytorch, has a copyright notice from Tomasz Sobczyk and a MIT license at the head of the file. However, this file includes the "nodchip" namespace, which has this comment:
// This namespace contains modified code from https://github.com/nodchip/Stockfish
// which is released under GPL v3 license https://www.gnu.org/licenses/gpl-3.0.html
These two licenses (MIT and GPL) are incompatible.
Does that mean that the sf nets and therefore sf is under the MIT license? That’s the rule, right?
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: speaking of GPL

Post by jdart »

>Does that mean that the sf nets and therefore sf is under the MIT license? That’s the rule, right?
To be clear, it means that Tomasz can't place the whole file under the MIT license, IMO.
Sopel
Posts: 389
Joined: Tue Oct 08, 2019 11:39 pm
Full name: Tomasz Sobczyk

Re: speaking of GPL

Post by Sopel »

This thread could have been prevented by making just one google query and searching for GPL in the first result...
https://www.tawesoft.co.uk/kb/article/mit-license-faq
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.

Maybe you copied your stockfish commits from someone else too?
I will look into that.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: speaking of GPL

Post by syzygy »

Sopel wrote: Sun Feb 28, 2021 10:29 am This thread could have been prevented by making just one google query and searching for GPL in the first result...
https://www.tawesoft.co.uk/kb/article/mit-license-faq
Jon's point is that code released under the GPLv3 (only) cannot be relicensed under the MIT license, as confirmed by your link.

This is a problem if the file contains a contribution which was intended by its author to be released under the GPLv3.
If the author intended it to be released under the more liberal MIT license, then there is no problem.

If there is a problem, it can be solved by removing the MIT license clause.
Sopel
Posts: 389
Joined: Tue Oct 08, 2019 11:39 pm
Full name: Tomasz Sobczyk

Re: speaking of GPL

Post by Sopel »

Ok, so as I understand there is no way to license the file as MIT with some part of it as GPLv3 that is explicitely mentioned within the namespace containing the GPLv3 code? I guess it would be fine if the nodchip namespace was extracted to a separate file and included.

The purpose is that so people who want to use my .binpack "library" are not required to license their stuff as GPL (the code from nodchip namespace is not necessary).
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.

Maybe you copied your stockfish commits from someone else too?
I will look into that.
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: speaking of GPL

Post by jdart »

Extracting as a separate file is still a problem because the overall "work" cannot be licensed as MIT if a part of it is GPL. GPL is "viral:" if one part is GPL, the whole thing needs to be GPL, or a compatible ilcense.

However, this depends on the definition of a "derived work." Algorithms are not copyrightable. If you re-implemented the .binpack format without copying the GPL code verbatim, you could copyright that implementation and choose a non-GPL license for it.
Sopel
Posts: 389
Joined: Tue Oct 08, 2019 11:39 pm
Full name: Tomasz Sobczyk

Re: speaking of GPL

Post by Sopel »

jdart wrote: Sun Feb 28, 2021 12:24 pm Extracting as a separate file is still a problem because the overall "work" cannot be licensed as MIT if a part of it is GPL. GPL is "viral:" if one part is GPL, the whole thing needs to be GPL, or a compatible ilcense.
And MIT is compatibile with GPL.
However, this depends on the definition of a "derived work." Algorithms are not copyrightable. If you re-implemented the .binpack format without copying the GPL code verbatim, you could copyright that implementation and choose a non-GPL license for it.
The GPL licensed bits in the nodchip repo version of this file are there to allow interoperability with Stockfish. In the pytorch trainer repo to allow reading .bin files. It is possible to remove them and have a working library.
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.

Maybe you copied your stockfish commits from someone else too?
I will look into that.
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: speaking of GPL

Post by jdart »

And MIT is compatibile with GPL.
No, it's not, details earlier in this thread.
syzygy
Posts: 5566
Joined: Tue Feb 28, 2012 11:56 pm

Re: speaking of GPL

Post by syzygy »

Sopel wrote: Sun Feb 28, 2021 12:10 pm Ok, so as I understand there is no way to license the file as MIT with some part of it as GPLv3 that is explicitely mentioned within the namespace containing the GPLv3 code? I guess it would be fine if the nodchip namespace was extracted to a separate file and included.
At least everything has to be available under the terms of the GPLv3, but the MIT license allows that. The only potential problem I see is that someone's contribution might now be licensed under the MIT license against that someone's agreement. So this is something to be careful about when accepting patches to the MIT-licensed file.
The purpose is that so people who want to use my .binpack "library" are not required to license their stuff as GPL (the code from nodchip namespace is not necessary).
You could release that library separately under the MIT license and stamp it as GPLv3 in the SF repository (if you want to avoid potential problems or misunderstandings).

Anybody can use the TB probing code I have authored, but the copy of it in SF's repository is tagged with the GPLv3 license (and it now includes many modifications that were contributed under the GPLv3 license).