mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2012-06-07, 03:07   #1
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

64538 Posts
Default gmp-ecm and licensing

Quote:
Originally Posted by Dubslow View Post
Both of those programs are actually not written by bsquared at all, but are separate programs (GMP-ECM and Msieve respectively) which are linked against the YAFU code the drives it at compile time. There's nothing much that bsquared can do about it.

(PS B2, since GMP-ECM is GPLed, doesn't that mean that the binaries you distribute are technically GPLed as well?)
I could still put a timer around the gmp-ecm calls and get an eta from that. I'll put it on the list for someday.

I admit I don't know the answer to the licensing question. I was under the impression that the license applied to source code, and I don't include any of the code within yafu. As you said, I just link into a static libraries when building yafu.
bsquared is offline   Reply With Quote
Old 2012-06-07, 16:32   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

5×13×163 Posts
Default

Quote:
Originally Posted by bsquared View Post
I admit I don't know the answer to the licensing question. I was under the impression that the license applied to source code, and I don't include any of the code within yafu. As you said, I just link into a static libraries when building yafu.
I don't know the answer to the licensing question but I can make a pretty good guess. My guess is that you are bound by the GPL.

To get a definitive answer you should ask akruppa or Paul (the other one) for their opinion. If you don't like their answer you always have the option of removing the ECM code from your binary and interfacing it through a call of an external binary.

FWIW, I never release any significant code under the GPL but, rather, a BSD-like license. If I want to give something away I give it away. A gift, in my view, should not impose obligations on the recipient.

Paul
xilman is online now   Reply With Quote
Old 2012-06-07, 16:45   #3
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

Quote:
Originally Posted by bsquared View Post
I admit I don't know the answer to the licensing question. I was under the impression that the license applied to source code, and I don't include any of the code within yafu. As you said, I just link into a static libraries when building yafu.
I think the main reason I mentioned something is because as I recall that's exactly what the LGPL was created for, so that you could statically link a "black box" library under the LGPL without the whole program reverting to the GPL. The GPL is a dangerous thing.
Dubslow is offline   Reply With Quote
Old 2012-06-09, 03:28   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2·3·19·31 Posts
Default

Correct, GMP-ECM is released under LGPL (latter-day versions are under LGPLv3). If Yafu added a patch to the 'stock' version of GMP-ECM then bsquared could not release YAFU as a closed-source application. At a minimum he'd have to release his patch, and if the patch changed the external interface to the library then he'd have to release his application code. Note: IANAL.

Last fiddled with by jasonp on 2012-06-09 at 03:30
jasonp is offline   Reply With Quote
Old 2012-06-09, 04:03   #5
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,371 Posts
Default

Quote:
Originally Posted by jasonp View Post
Correct, GMP-ECM is released under LGPL (latter-day versions are under LGPLv3). If Yafu added a patch to the 'stock' version of GMP-ECM then bsquared could not release YAFU as a closed-source application. At a minimum he'd have to release his patch, and if the patch changed the external interface to the library then he'd have to release his application code. Note: IANAL.
So since it is open source, and I'm just using the 'stock' interface to the code, that would be ok? IADNAL (Definately...)

I will contact Paul/Alex for advice...
bsquared is offline   Reply With Quote
Old 2012-06-09, 04:12   #6
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,371 Posts
Default

Come to think of it, if yafu is bound by the GPL because it uses the ecm_factor interface to libecm, then so is msieve; I copied nearly verbatim the gmp-ecm interface from msieve. And everything I added on top of that for multi-threading uses system calls to external gmp-ecm executables.
bsquared is offline   Reply With Quote
Old 2012-06-09, 07:01   #7
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3×29×83 Posts
Default

No, I don't think so; it's not clear which license applies to which code (just looked through most of the text files, COPYING* just contain the licenses and don't say which licenses apply to what), but I'm decently sure that as long as you only use ecm_factor() to directly interface to libecm without using (say) GMP-ECM's main() or expression parsing code, then it is LGPLd. The LGPL is agnostic to the license of the code that calls the interface, so you should be fine. (The reason I wasn't sure before is because I thought all of GMP-ECM was strictly GPL, not LGPL.)

(IANAL of course, but I think we're smart enough to figure it out.)
Dubslow is offline   Reply With Quote
Old 2012-06-09, 12:05   #8
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

We did the separation of front-end and library, and LGPL-ed the latter, precisely to allow that kinda thing - letting non-GPL applications link GMP-ECM without having to be GPL themselves. It's what Magma does, for example. So, as far as I can tell, you're fine by #include-ing ecm.h and linking ecmlib, statically or dynamically.
akruppa is offline   Reply With Quote
Old 2012-06-10, 01:15   #9
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2·3·19·31 Posts
Default

Quote:
Originally Posted by bsquared View Post
Come to think of it, if yafu is bound by the GPL because it uses the ecm_factor interface to libecm, then so is msieve; I copied nearly verbatim the gmp-ecm interface from msieve. And everything I added on top of that for multi-threading uses system calls to external gmp-ecm executables.
Originally the ecm_factor interface was GPLed and Msieve used a public-domain replacement that called the underlying library functions directly. More recently the ecm_factor interface itself was switched to LGPL so Msieve switched to using ecm_factor :)

Edit: it's not accurate to say that 'an application is GPL because it uses GPL code'. GPL doesn't override the license that's on consuming code, if the license is 'compatible'. Public domain is one such (lack of) license; you can take YAFU or Msieve and incorporate only the public-domain parts into other applications without issue. But if your application pulls in YAFU or Msieve (in library form) with LGPL parts, then your code has to use them in a way that's compatible with the LGPL.

Last fiddled with by jasonp on 2012-06-10 at 01:21
jasonp is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
wiki licensing? ixfd64 mersennewiki 6 2006-05-22 12:05

All times are UTC. The time now is 12:16.

Sun Mar 7 12:16:59 UTC 2021 up 94 days, 8:28, 0 users, load averages: 1.18, 1.44, 1.39

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.