[Win32] Cannot 'make speed' in the 'tune' folder
sisyphus1 at optusnet.com.au
sisyphus1 at optusnet.com.au
Wed Dec 30 01:10:17 UTC 2015
Hi,
I built gmp-6.1.0 in an msys shell with:
./configure --disable-shared --enable-static --enable-assembly && make &&
make check
It passed all tests.
Then I cd to the tune directory and run 'make speed':
$ make speed
gcc -std=gnu99 -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7
speed.c -o speed
speed.c:43:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [speed] Error 1
On Ubuntu (where 'make speed' works fine), the command that gets run
includes "-I.. -I.. -I../tests", and it's the omission of those flags that
causes this Windows failure.
However, looking at the Windows tune/Makefile (attached as Makefile.orig)
and comparing it with the Ubuntu tune/Makefile, I cannot see why those flags
are being omitted on Windows.
It's not so hard to get past this failure - I chose to set CPPFLAGS (which
is initially empty) to "-I.. -I../tests", but then I get:
$ make speed
gcc -std=gnu99 -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7
-I.. -I../tests speed.c -o speed
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x23e):
undefined
reference to `_speed_measure'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x476):
undefined reference to `_speed_cycletime'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x48c):
undefined reference to `_speed_cycletime'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x543):
undefined reference to `_speed_cycletime'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x605):
undefined reference to `_speed_cycletime'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x7b8):
undefined reference to `___gmp_tmp_reentrant_free'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x7cf):
undefined reference to `___gmp_tmp_reentrant_alloc'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0x80f):
undefined reference to `___gmp_tmp_reentrant_alloc'
C:\Users\sisyphus\AppData\Local\Temp\ccHW0ipc.o:speed.c:(.text+0xaba):
undefined reference to `___gmp_allocate_func'
.... and many more.
I guess the problem here is that the missing "-c" flag means that we're
trying to build speed.c into an executable named "speed".
On Ubuntu speed.c gets compiled into an object file named speed.o.
What should I try next ?
Oddly enough, if I run 'make tune' then there's no need to modify the
original Makefile - though 'make tune' subsequently fails to compile after a
while.
I'll make this the subject of another bug report after this one has been
sorted.
In case the 'make tune' output throws some light on the problem with 'make
speed' here's how 'make tune' terminates:
... many successful compilations ...
/bin/sh ../libtool --tag=CC --mode=compile
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -m32 -O2 -pedantic
-fomit-frame-pointer -mtune=corei7 -march=corei7 -c -o time.lo time.c
libtool: compile:
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -m32 -O2 -pedantic
-fomit-frame-pointer -mtune=corei7 -march=corei7 -c time.c -o time.o
time.c: In function 'getrusage_backwards_p':
time.c:674:18: error: storage size of 'start' isn't known
time.c:674:25: error: storage size of 'prev' isn't known
time.c:674:31: error: storage size of 'next' isn't known
time.c: In function 'cgt_works_p':
time.c:783:23: error: storage size of 'start' isn't known
time.c:783:30: error: storage size of 'end' isn't known
make[1]: *** [time.lo] Error 1
make[1]: Leaving directory `/c/smoke_mpfr/gmp-6.1.0/tune'
make: *** [tune] Error 2
I haven't run anything in the 'tune' directory before, so I'm unable to say
whether these are new problems or not.
FAIK, they may not even be gmp bugs.
Cheers,
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.orig
Type: application/octet-stream
Size: 41663 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151230/4abbe901/attachment-0001.obj>
More information about the gmp-bugs
mailing list