mersenneforum.org  

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

Reply
 
Thread Tools
Old 2006-07-16, 03:28   #1
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2×3×52×19 Posts
Default compiling gwnum

I'm trying to compile the GWNUM library so I can compile GMP-ECM with the --with-gwnum switch. I'm using Msys and MinGW on Windows XP and I'm a complete newbie.


GWNUM readme.txt says to do a "nmake /f compile" but it exits with the error:

makefile(30) : fatal error U1033: syntax error : ':' unexpected

Line30 says:
$(COFFOBJS): %.o : %.obj

I guess this note in the makefile is the answer:
"# NOTE: To convert the included object files to ELF, your binutils
# installation must be able to read the coff-i386 object format.
#
# Assuming your binutils are dynamically linked, you can add COFF support
# by configuring binutils with the switch '--enable-targets=i386-go32'
# and rebuilding libbfd.so ."

but how do I rebuild that in msys?
ATH is offline   Reply With Quote
Old 2006-07-16, 07:22   #2
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

46438 Posts
Default

There are readily compiled GWNUM libraries:

http://mersenne.org/gimps/gwnum_gpl_mingw.tgz
http://mersenne.org/gimps/gwnum_gpl_linux.tgz

Compiling the binutils to include COFF support is very time consuming. I don't know what is causing the syntax error, at a glance the Makefile line looks to be correct.

Alex
akruppa is offline   Reply With Quote
Old 2006-07-16, 14:04   #3
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

3×72×47 Posts
Default

The "nmake /f compile" is run in a Windows MS-DOS shell to create the COFF obj files from the *.asm sources.
Prime95 is offline   Reply With Quote
Old 2006-07-16, 14:16   #4
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2×3×52×19 Posts
Default

I think I got GMP-ECM compiled with gwnum, I did:
./configure --with-gmp=/usr/local --with-gwnum=. (I put gwnum files in ecm directory)
make

make stopped with an error, so I tried without gwnum:

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

that worked, then I tried again with:

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

this time it didn't stop so I continued with

make check
make ecm-params; make
make install

but how do I check if gwnum works? help or verbose mode doesn't mention it.
ATH is offline   Reply With Quote
Old 2006-07-16, 14:43   #5
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

If GWNUM support is compiled in, GMP-ECM will say so in the "powered by" remark. If it only says, i.e., "powered by GMP 4.2.1", then no GWNUM support is compiled in.

If you first build it without --with-gwnum, then again with --with-gwnum, make probably won't actually create any new object files because the previously compiled ones are still newer than the sources. Perhaps we should have a dependency on config.status or Makefile or something... anyway, do a "make clean" if you want new options given to ./configure to take effect.

> make stopped with an error, so I tried without gwnum:

What error was that?

Alex

Last fiddled with by akruppa on 2006-07-16 at 17:19
akruppa is offline   Reply With Quote
Old 2006-07-16, 16:57   #6
bearnol
 
bearnol's Avatar
 
Sep 2005

12710 Posts
Default

Quote:
Originally Posted by ATH
./configure --with-gmp=/usr/local --with-gwnum=. (I put gwnum files in ecm directory)
This is somewhat ambiguous. The way I've always done it (please bear in mind only on Linux - ymmv), is to keep the gwnum files in their _own_ subfolder, created by the unzip, (in your case prob called 'gwnum_gpl_mingw' or such), within the ecm directory, mainly for fear of overwriting main ecm files. Then one has to reference as '--with-gwnum=./gwnum_gpl_mingw'
You may well be OK with the method you've used - but really I just wanted to make sure, as the thought occurred to me on reading your post of the possible ambiguity..
Good luck!
J
bearnol is offline   Reply With Quote
Old 2006-07-16, 17:39   #7
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·3·52·19 Posts
Default

ECM wasn't compiled with gwnum, I tried again and got the same error:

libecm.a(Fgw.o)(.text+0x0):C:/msys/1.0/home/ATH/ecm/Fgw.c:62: first defined here
libecm.a(Fgw.o)(.text+0x27f): In function `make_conv_plan':
C:/msys/1.0/home/ATH/ecm/Fgw.c:127: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x291):C:/msys/1.0/home/ATH/ecm/Fgw.c:127: undefined reference to `valloc'
libecm.a(Fgw.o)(.text+0x2c7):C:/msys/1.0/home/ATH/ecm/Fgw.c:136: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x2dd):C:/msys/1.0/home/ATH/ecm/Fgw.c:139: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x330):C:/msys/1.0/home/ATH/ecm/Fgw.c:169: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x359):C:/msys/1.0/home/ATH/ecm/Fgw.c:177: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x38a):C:/msys/1.0/home/ATH/ecm/Fgw.c:184: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x427):C:/msys/1.0/home/ATH/ecm/Fgw.c:139: more undefined references to `_FFTLEN' follow
libecm.a(Fgw.o)(.text+0xefb): In function `Fgwmul':
C:/msys/1.0/home/ATH/ecm/Fgw.c:777: undefined reference to `_GWERROR'
make[1]: *** [ecm.exe] Error 1
make[1]: Leaving directory `/home/ATH/ecm'
make: *** [all] Error 2

The reason I put gwnum files inside the ecm directory is it's the only place ecm can find them. If I try ~/gwnum or /usr/local/gwnum it still says it can't find them.
ATH is offline   Reply With Quote
Old 2006-07-16, 19:45   #8
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

First, the valloc() should be a malloc(). The valloc() call is deprecated, we meant to remove them from GMP-ECM but apparantly I overlooked one in my code. There will be a patch eventually, for a start you can just edit Fgw.c and change "valloc" to "malloc".

Second, the configure script does not do tilde expansion, so "~/directory" won't work. Give the absolute path to your home dir instead, or use "$HOME/directory". In the latter case, the command shell does the variable expansion, not the configure script.

Third, the make errors are bothersome... there is some trickery to add underscores to symbols exported by the GWNUM library on some systems, but not on others. Maybe that went awry... but there should be more symbols referenced than just FFTLEN and GWERROR... strange. I'll look.

Alex
akruppa is offline   Reply With Quote
Old 2006-07-17, 18:02   #9
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

2·3·52·19 Posts
Default

--with-gwnum=$HOME/gwnum worked and I corrected valloc to malloc in ftw.c, but there is still make errors:

C:/msys/1.0/home/ATH/gwnum/gwnum.lib(gwdbldbl.o)(.text+0x94f0):gwdbldbl.cpp: multiple definition of `__gxx_personality_v0'
libecm.a(Fgw.o)(.text+0x0):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:62: first defined here
libecm.a(Fgw.o)(.text+0x27f): In function `make_conv_plan':
C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:127: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x2ad):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:136: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x2c3):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:139: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x31c):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:169: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x347):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:177: undefined reference to `_FFTLEN'
libecm.a(Fgw.o)(.text+0x378):C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:184: more undefined references to `_FFTLEN' follow
libecm.a(Fgw.o)(.text+0xefb): In function `Fgwmul':
C:/msys/1.0/home/ATH/ecm-6.1/Fgw.c:777: undefined reference to `_GWERROR'
make[1]: *** [ecm.exe] Error 1
make[1]: Leaving directory `/home/ATH/ecm-6.1'
make: *** [all] Error 2


Don't spend alot of time checking this, it's not that important for me. Was just trying to compile with gwnum out of curiosity. I have a working ecm without gwnum.

Last fiddled with by ATH on 2006-07-17 at 18:04
ATH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem compiling GMP-ECM with gwnum... WraithX GMP-ECM 9 2011-08-21 22:45
LLR V3.8.2 using gwnum 26.2 is available! Jean Penné Software 25 2010-11-01 15:18
GWNUM? Unregistered Information & Answers 3 2010-09-12 19:52
Compiling GMP-ECM With GWNUM tmorrow GMP-ECM 5 2007-04-04 00:39
GWNUM as DLL? Cyclamen Persicum Software 1 2007-01-02 20:53

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

Sun Jul 5 08:21:57 UTC 2020 up 102 days, 5:55, 1 user, load averages: 1.23, 1.08, 1.13

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.