![]() |
![]() |
#1 | ||
Aug 2003
Europe
2×97 Posts |
![]()
I am trying to compile the ECM 5.0.3 package on a windows system to create a windows binary. I am currently using OpenWatcom but for one reason it won't go with the supplied make file. Besides that it also looks to me that the makefile is desinged for Linux systems instead of Windows systems.
I would like to build some binaries for testing and working. Can anybody give me a help/guide or a push in the right direction. Would it matter to use Cygwin for compiling instead of OpenWatcom? Or does someone have experience in compiling the 5.0.3 as a windows binary. Source at http://webloria.loria.fr/~zimmerma/r...ecm-5.0.3.html This is the message i get when compiling: Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#2 | |
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
2·3·29·67 Posts |
![]() Quote:
Paul Last fiddled with by xilman on 2008-10-25 at 11:26 |
|
![]() |
![]() |
![]() |
#3 |
Aug 2003
Europe
2×97 Posts |
![]()
Paul, thank you. I see that you compiled it with Cygwin. I will have a go with that. In the mean time i will use your compiled version.
|
![]() |
![]() |
![]() |
#4 |
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
![]()
Paul,
can you give us hints on what it takes to get gmp-ecm to compile under Windows? Neither PaulZ or I can do much in this regards as neither of us has Windows running anywhere. It'd be great if we could include instructions in future gmp-ecm releases. Alex |
![]() |
![]() |
![]() |
#5 | |
Apr 2004
Copenhagen, Denmark
22×29 Posts |
![]() Quote:
The only thing you have to make sure, is that you manually select the gcc tools and the make tool during installation of cygwin. Jes |
|
![]() |
![]() |
![]() |
#6 |
Mar 2003
7910 Posts |
![]()
Both GMP and GMP-ECM 5.0.3 compile easily using Mingw which gives you a Windows binary without the dependency on the Cygwin DLL.
Don Leclair |
![]() |
![]() |
![]() |
#7 | |||
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
2·3·29·67 Posts |
![]() Quote:
The first is to install some sort of Unix emulator. By far the best, IMAO, is SFU (Services for Unix) which is a free download from microsoft.com. As well as lots of Unix goodies, it comes with a gcc and associated tool set. The site http://www.interopsystems.com/tools/warehouse.htm has lots and lots of add-ons for SFU and some replacements for the utilities shipped. I no longer run a Windows system without SFU installed. Related is to use Cygwin and/or MIngw. Either of these work, after a fashion, but are clunky (again, IMAO). The free (as in beer) version of Cygwin has a seriously restrictive license condition attached. Any binary distributed that uses the cygwin1.dll must also distribute the corresponding source under the GPL. In the case of gmp-ecm that's not a problem so I pushed out the binary. I could not redistribute a binary built from a BSD, Artistic, Public Domain, etc, source in this way. The other approach is to acquire (possibly by building from source) a VS-compatible gmp library and then build gmp-ecm from source. If you have such a library it is then very easy to build the executable. Unfortunately, the GMP people seem to go out of their way to make it hard for people to build GMP under Visual Studio. For instance, on the gmp-developers' mailing list this offer appeared two weeks ago: Quote:
Quote:
Technically GMP is a superb library. I wish I could say the same about other aspects of it. ![]() Perhaps sometime when I'm feeling less thoroughly disillusioned I may build some native Windows 5.0.3 binaries for various machine architectures. Paul |
|||
![]() |
![]() |
![]() |
#8 |
Aug 2003
Europe
2×97 Posts |
![]()
I had a go with MinGW but encountered some problems. Maybe one can help me in solving the problem.
- Installed MinGW + MSYS. - Copied GMP414 dir to home dir in MSYS. - Copied ECM503 dir to home dir in MSYS. - started MSYS and browsed to GMP414 dir. - Typed ./configure - Typed make - Typed make install - Typed make check - Found no erros in the check. - Browsed to ECM503 dir. - Typed make GMP=/local - Got the following error: $ make GMP=/local gcc -O2 -g -W -Wall -Wmissing-prototypes -I/local/include -c auxi.c auxi.c:94:26: sys/resource.h: No such file or directory auxi.c: In function `cputime': auxi.c:99: error: storage size of `rus' isn't known auxi.c:101: warning: implicit declaration of function `getrusage' auxi.c:101: error: `RUSAGE_SELF' undeclared (first use in this function) auxi.c:101: error: (Each undeclared identifier is reported only once auxi.c:101: error: for each function it appears in.) auxi.c:99: warning: unused variable `rus' auxi.c: In function `get_random_ui': auxi.c:129: warning: implicit declaration of function `gettimeofday' make: *** [auxi.o] Error 1 Appears that resource.h is not in MinGW. How can i include this file? Which package is it connected to? |
![]() |
![]() |
![]() |
#9 |
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
![]()
On my SuSE system, sys/resource.h is in glibc-devel. A quick google revealed that this header apparantly is not available under Mingw. There are a bunch of other systems where getrusage() is not available and we fall back to clock() in that case, see auxi.c, lines 84ff. I guess all we need to do is add a test for Mingw to the #if. Please try the attached replacement auxi.c. I also #ifdef'd out gettimeofday if no sys/time.h was included.
Let me know if that works. Alex Last fiddled with by akruppa on 2004-09-28 at 11:48 |
![]() |
![]() |
![]() |
#10 |
Aug 2003
Europe
2·97 Posts |
![]()
I Changed the defined to the following:
#if defined (ANSIONLY) || defined (USG) || defined (__SVR4) || defined (_UNICOS) || defined(__hpux) || defined(__MINGW32__) Since it is in the windows version of MinGW called __MINGW32__ But now there is an other error. $ make GMP=/local gcc -O2 -g -W -Wall -Wmissing-prototypes -I/local/include -c auxi.c auxi.c: In function `get_random_ui': auxi.c:111: error: storage size of `tv' isn't known auxi.c:111: warning: unused variable `tv' make: *** [auxi.o] Error 1 |
![]() |
![]() |
![]() |
#11 |
"Nancy"
Aug 2002
Alexandria
2,467 Posts |
![]()
Oops, the
struct timeval tv; needs to be #ifdef'd, too. #ifdef _SYS_TIME_H struct timeval tv; #endif Alex |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling YAFU for Windows using mingw | bsquared | YAFU | 87 | 2022-11-21 22:31 |
compiling svn 427 for Windows 64 bit. | skan | NFSNET Discussion | 7 | 2012-04-18 10:30 |
Windows 7 Windows Update & Prime95 issue!!! | Unregistered | Information & Answers | 14 | 2010-04-10 21:47 |
Compiling Msieve 1.39 on Windows | Jeff Gilchrist | Msieve | 20 | 2009-02-21 22:43 |
Compiling GMP-ECM in Windows using MSVC | jbristow | GMP-ECM | 4 | 2008-04-17 14:42 |