Problem building tuneup...

David Cleaver wraithx at morpheus.net
Sun Jun 26 01:04:57 CEST 2011


*** Problem description:
I read in the manual that you can run the tuneup program and should be able to 
get optimal performance out of GMP.  However, after following the instructions, 
I ran into several problems.  The first was several complaints about missing 
header files.  I believe this can be fixed by changing the header declarations 
to '#include "../gmp.h"' instead of the current '#include "gmp.h"'.  However, 
instead of changing declarations, I copied the missing files into the /tune/ 
directory.  Then running 'make tuneup' produced several 'undefined reference' 
errors.  At this point, I am not sure how to proceed to fix this problem.  Can 
someone please help me to finish compiling the tuneup program?

*** Environment description:
OS: Windows XP Pro x64
Shell: MSYS 1.0.16
Compiler: mingw64
gcc.exe (GCC) 4.4.5 20101001 (release) [svn/rev.164871 - mingw-w64/oz]

*** Steps to reproduce problem:
extract gmp-5.0.2.tar.bz2 to its own directory
$ ./configure
$ make
$ make check

All of those steps complete successfully.  Then, according to the manual:

$ cd tune
$ make tuneup

This is where I first encounter the "missing headers" errors, like so:

$ make tuneup
gcc -O2 -pedantic -m64 -std=gnu99 -mtune=k8 -march=k8    tuneup.c   -o tuneup
tuneup.c:103:20: error: config.h: No such file or directory
tuneup.c:114:22: error: gmp-impl.h: No such file or directory
tuneup.c:115:22: error: longlong.h: No such file or directory
tuneup.c:117:19: error: tests.h: No such file or directory

Then I copy the following files into the gmp-5.0.2/tune/ directory:
gmp-5.0.2/tests/tests.h
gmp-5.0.2/config.h
gmp-5.0.2/gmp.h
gmp-5.0.2/gmp-impl.h
gmp-5.0.2/longlong.h
gmp-5.0.2/mp_bases.h
gmp-5.0.2/fib_table.h
gmp-5.0.2/gmp-mparams.h

Then I get several 'undefined reference' errors, like so:

$ make tuneup
gcc -O2 -pedantic -m64 -std=gnu99 -mtune=k8 -march=k8    tuneup.c   -o tuneup
C:\DOCUME~1\David\LOCALS~1\Temp\cct2hsOe.o:tuneup.c:(.text+0x3f): undefined 
reference to `__gmpn_random'
C:\DOCUME~1\David\LOCALS~1\Temp\cct2hsOe.o:tuneup.c:(.text+0x6f): undefined 
reference to `__gmpn_random'
C:\DOCUME~1\David\LOCALS~1\Temp\cct2hsOe.o:tuneup.c:(.text+0x2d5): undefined 
reference to `__gmpn_bases'
C:\DOCUME~1\David\LOCALS~1\Temp\cct2hsOe.o:tuneup.c:(.text+0x34c): undefined 
reference to `speed_operand_src'
<snip about 100 other undefined references>

Does this build successfully for anyone else?  Am I missing a step in building 
the tuneup program?  Any help would be greatly appreciated.

-David C.


More information about the gmp-bugs mailing list