mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2007-06-15, 18:45   #1
MatWur-S530113
 
MatWur-S530113's Avatar
 
Apr 2007
Spessart/Germany

101000102 Posts
Question How I get a compiled version of GMP-ECM?

Hello,

I would like to try some factorizations with GMP-ECM, but I don't know how to get a compiled version of it. I use Windows XP 32-bit, I have an E6600 Dual Core and to write programs for myself I use Pascal (Borland Delphi 7). I can not programm with C++, but I got a copy of MS Visual C++ v6.0
I downloaded ecm-6.1.2.tar.gz and decompressed it to a folder.
I opened 'main.c' and tried to build it. I was asked from Visual C++ to create a standart workspace, I answered 'yes'... I got an error:

--------------------Configuration: main - Win32 Debug--------------------
Compiling...
main.c
d:\mathe\ecm-6.1.2\ecm-6.1.2\ecm-ecm.h(24) : fatal error C1083: Cannot open include file: 'config.h': No such file or directory
Error executing cl.exe.
main.obj - 1 error(s), 0 warning(s)


I found a file named 'config.h.in', I renamed it to 'config.h' and then I got this error:

--------------------Configuration: main - Win32 Debug--------------------
Compiling...
main.c
d:\mathe\ecm-6.1.2\ecm-6.1.2\ecm.h(25) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
Error executing cl.exe.
main.exe - 1 error(s), 0 warning(s)


but for 'gmp.h' I haven't found any file to rename . As I said, I don't understand the way of compiling with C++ and I don't want to learn it. I only want to create a running executable file of GMP-ECM for my computer. Is one out there who can explain it to a non-C++-programmer?

Thx for every help!

Matthias
MatWur-S530113 is offline   Reply With Quote
Old 2007-06-15, 19:24   #2
fetofs
 
fetofs's Avatar
 
Aug 2005
Brazil

2×181 Posts
Default

gmp.h is the header file for the GMP library: http://gmplib.org I have no experience with VS, so you'll have to install it yourself.

You can also take a look at whatever has been precompiled at this thread. However I don't think they have compiled binaries for the most recent version...

Last fiddled with by fetofs on 2007-06-15 at 19:25
fetofs is offline   Reply With Quote
Old 2007-06-15, 20:12   #3
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3×7×167 Posts
Default

Forget what Fetofs said(no offense, Fetofs). Go to the Information and Answers Forum, which is at the very top of the Mersenne Forum page. One of the Stickies there has a bunch of tutorials. Even if you're not interested in running ECMNet, click on that tutorial anyway. Around the beginning of those instructions will be a link to help you compile ecm.
jasong is offline   Reply With Quote
Old 2007-06-16, 10:50   #4
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

1100100000102 Posts
Default

Checkout this thread: http://www.mersenneforum.org/showthread.php?t=3766 particularly post #10 on how you install MinGW and Msys and compile GMP-ECM in that.
ATH is offline   Reply With Quote
Old 2007-06-16, 14:14   #5
bdodson
 
bdodson's Avatar
 
Jun 2005
lehigh.edu

210 Posts
Default

Quote:
Originally Posted by ATH View Post
Checkout this thread: http://www.mersenneforum.org/showthread.php?t=3766 particularly post #10 on how you install MinGW and Msys and compile GMP-ECM in that.
I'm still running one of ATH's binaries, linked some time ago --- under
ecm-gmp, links to compiled ..., from 25 July 06, Prescott without
asmredc. Custom compiling on each of 500 pcs doesn't seem like a
very plausible option, especially as they're windows-xps without
remote logins. An old slow binary that's producing factors is better
than the newest beta with any questions. The version "without"
since the numbers are all above 233-digits. Having stable generic
binaries available seems to me to be a useful service (which the
developers seem unwilling to provide). In this case, 22 Cunningham
factors that are Dodson/ECMNET/ATH. -bd
bdodson is offline   Reply With Quote
Old 2007-06-16, 14:19   #6
MatWur-S530113
 
MatWur-S530113's Avatar
 
Apr 2007
Spessart/Germany

2·34 Posts
Default

Hello again,

thx to all for your fast replies.
From the GMP-website I got gmp-4.2.1.tar.gz and I used ecm-6.1.2.tar.gz (still no 'gmp.h' anywhere). Then I tried MSYS as described in the pdf-file (or as described by Alex in post#10 of the other thread). First all worked well and I recognized that a 'gmp.h' was created. But at Step 11 of the pdf MSYS stopped again with an error. I typed:

./configure --with-gmp=/usr/local

and MSYS starts to check for many *.h-files, most of them were ok. But then I got these messages:

...
checking for sys/types.h... (cached) yes
checking sys/resource.h usability... no
checking sys/resource.h presence... no
checking for sys/resource.h... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
configure: error: required header file missing

in the folder '.../home/Mephi/gmp-4.2.1' is a file 'gmp.h' now, I don't know why this one is not used by MSYS?

I tried 'make'-order then but I got this:

$ make
make: *** No targets specified and no makefile found. Stop.

any more hint about what I'm doing wrong?

Matthias
MatWur-S530113 is offline   Reply With Quote
Old 2007-06-16, 18:13   #7
lazy
 

33·11 Posts
Default

You can either try reading the install file in the GMP-ECM archive

(or)

you can put options like this
./configure --with-gmp-include=(the folder where you keep gmp.h file)
  Reply With Quote
Old 2007-06-16, 19:42   #8
fetofs
 
fetofs's Avatar
 
Aug 2005
Brazil

2×181 Posts
Default

Quote:
Originally Posted by jasong View Post
Forget what Fetofs said(no offense, Fetofs). Go to the Information and Answers Forum, which is at the very top of the Mersenne Forum page. One of the Stickies there has a bunch of tutorials. Even if you're not interested in running ECMNet, click on that tutorial anyway. Around the beginning of those instructions will be a link to help you compile ecm.
Completely forgot, even though that was the link I've used to compile gmp myself

EDIT: No offense taken.

Last fiddled with by fetofs on 2007-06-16 at 19:45
fetofs is offline   Reply With Quote
Old 2007-06-17, 01:49   #9
MatWur-S530113
 
MatWur-S530113's Avatar
 
Apr 2007
Spessart/Germany

2×34 Posts
Default

Hello again,

6 hours ago I read your answers and started a new attempt. Yesterday I must have done another fault, this time I needed much more time to configure GMP. But the first attempt with gmp-4.2.1.tar.gz failed again, so I started another one... with gmp-4.1.4.tar.gz as described originally by Alex and the pdf. And it worked (although I used ecm-6.1.2.tar.gz and not the described ecm-6.0.1.tar.gz), I got a file 'ecm.exe'. OK, there will be sunrise here in a few minutes, I think I go to bed now . In the afternoon I want to test how to use ecm.exe for step 2 of P-1-factoring of Prime95 and how to run some Curves for ECM with it.
Thx a lot for all your (very patient ) help!

Matthias

...good night (better: morning)
MatWur-S530113 is offline   Reply With Quote
Old 2007-06-17, 13:55   #10
Yamato
 
Yamato's Avatar
 
Sep 2005
Berlin

2·3·11 Posts
Default

By the way, nobody has answered my last question in

http://mersenneforum.org/showthread.php?t=4087

concerning compiled versions for Linux/Core2Duo. I cant imagine that only Windows on P4/Xeon/A64 is used...

Yamato
Yamato is offline   Reply With Quote
Old 2007-10-22, 15:18   #11
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·1,601 Posts
Default

*bump*

I'll try to explain how I compile GMP-ECM in windows with Msys+MinGW.

Step 1-5 is for installing Msys+MinGW, only needs to be done 1st time on each computer. Step 6-9 is for Installing GMP, only needs to be done 1st time or when a new GMP version is released. Step 10-14 is for installing GMP-ECM.


1 ) Download Msys: http://gd.tuwien.ac.at/gnu/mingw/MSYS-1.0.10.exe

2 ) Download MinGW: MinGW-5.1.3.exe

3 ) Run MSYS-1.0.10.exe and follow installation, accept the default C:\msys\1.0 path. Say yes to "Do you wish to continue post install?" and no to "Do you have MinGW installed?"
msys.jpg

4 ) Run MinGW-5.1.3.exe, choose "Download and Install". In Choose Package window select "Current" and in Choose Components windows select everything except "Ada Compiler" and "Java Compiler" (unless you want everything and don't mind it taking 153Mb instead of 75Mb).
Use suggested installation folder "C:\msys\1.0\mingw" or change it if it suggest otherwise.
mingw.jpg

5 ) Download this fstab file: fstab.zip and extract it to "C:\msys\1.0\etc" folder. It tells Msys where to find MinGW, check it with wordpad if interested.



6 ) Download newest GMP: http://gmplib.org/#DOWNLOAD. I normally choose the .gz version. GMP 4.2.2 direct link: gmp-4.2.2.tar.gz.

7 ) Use WinRAR or 7-zip to extract gmp-4.2.2.tar.gz to the folder "C:\msys\1.0\home\<username>" where <username> is your windows username, for me the folder is called "C:\msys\1.0\home\ATH".

8 ) Start Msys with the desktop/startmenu link or use C:\msys\1.0\msys.bat. Msys starts in the "C:\msys\1.0\home\<username>" folder.
Type: "cd gmp-4.2.2" which should be the name of the folder you extracted gmp to, check with "ls" if the files are there (ls instead of dir, "ls -l" for detailed list).

9 ) Compile GMP with the following commands:
./configure (took 3 min on p4 3.4ghz)
make (took 15 min on p4 3.4ghz)
make check (took 8 min on p4 3.4ghz)
make install (took 15sec on p4 3.4ghz)
Now close Msys.



10 ) Download the latest GMP-ECM: https://gforge.inria.fr/frs/?group_id=135. Direct link for 6.1.3: ecm-6.1.3.tar.gz.

11 ) Use WinRAR or 7-zip to extract ecm-6.1.3.tar.gz to the folder "C:\msys\1.0\home\<username>" where <username> is your windows username, for me the folder is called "C:\msys\1.0\home\ATH".

12 ) Start Msys with the desktop/startmenu link or use C:\msys\1.0\msys.bat. Msys starts in the "C:\msys\1.0\home\<username>" folder.
Type: "cd ecm-6.1.3" which should be the name of the folder you extracted gmp-ecm to, check with "ls" if the files are there (ls instead of dir, "ls -l" for detailed list).

13 ) Compile GMP-ECM with the following commands:
./configure --with-gmp=/usr/local (took 2-3 min on p4 3.4ghz)
make (took 30 sec on p4 3.4ghz)
make check (took 2 min on p4 3.4ghz)
make ecm-params; make (took 4 min on p4 3.4ghz)
make install (took 1 sec on p4 3.4ghz)

14 ) Get the executable "ecm.exe" from "C:\msys\1.0\home\<username>\ecm-6.1.3" folder, enjoy

Last fiddled with by ATH on 2007-10-22 at 15:37
ATH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Experimental lasieve4_64, compiled with MinGW-w64! Dan Ee Factoring 40 2016-02-08 20:32
About self-compiled Prime95 tyeken8 Software 14 2009-05-27 11:02
Looking for windows-compiled gnfs-lasieve4I15e Andi47 Factoring 15 2008-02-21 19:15
compiled msieve on PS3 bigmic Msieve 2 2007-03-29 20:06
Version 24.14 Prime95 Software 13 2006-02-15 16:32

All times are UTC. The time now is 08:41.


Tue Dec 7 08:41:03 UTC 2021 up 137 days, 3:10, 0 users, load averages: 1.84, 2.22, 1.81

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.