Trouble in tune directory...

David Cleaver wraithx at morpheus.net
Sat Jul 7 05:29:38 CEST 2012


Hello all,

I am on a Windows XP x64 computer, in an Msys shell, using MingW64 as my compiler.

I have downloaded gmp-5.0.90-20120706.  I can run:
$ ./configure --host=x86_64-pc-mingw32 --target=x86_64-pc-mingw32
$ make
$ make check
All successfully and without problem.  Then, after I:
$ cd tune
$ make speed.exe
It ends in an error saying:
/bin/sh ../libtool --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. 
-I.. -I.. -I../tests    -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 
-march=k8 -c -o time.lo time.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../tests -O2 
-pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 -c time.c -o time.o
time.c: In function 'getrusage_backwards_p':
time.c:663:18: error: storage size of 'start' isn't known
time.c:663:25: error: storage size of 'prev' isn't known
time.c:663:31: error: storage size of 'next' isn't known
make: *** [time.lo] Error 1

I was able to fix this error on my computer by changing line 663 of time.c from:
   struct rusage  start, prev, next;

To:
#if HAVE_GETRUSAGE
   struct rusage  start, prev, next;
#else
   struct rusage_dummy  start, prev, next;
#endif

I'm not sure if this would be the right fix for everyone in general, but I 
wanted to let you know what allowed it to compile for me.


Actually, when I try to run the program based on one of the examples in the 
README it says:
D:\Programming\gmp\gmp-5.0.90-20120706\tune>speed -s 1-40 -c -d mpn_add_n mpn_ls
hift.1
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
D:\Programming\gmp\gmp-5.0.90-20120706\tune>

I believe it gives this output because it is trying to find the frequency of the 
processor.  When I set an environment variable like:
set GMP_CPU_FREQUENCY=2e9
Then run the program again, I get no output at all:
D:\Programming\gmp\gmp-5.0.90-20120706\tune>speed -s 1-40 -c -d mpn_add_n mpn_ls
hift.1
D:\Programming\gmp\gmp-5.0.90-20120706\tune>

Is this expected behavior on a Windows system?  I know it is difficult to 
support Windows systems since they don't natively implement posix functionality. 
   Besides using cygwin or "a better OS", is there anything I can do that would 
allow this speed program to run normally?  Please let me know if you need any 
more information to help diagnose this issue.  Thank you for your time and any 
help you can provide.

-David C.


More information about the gmp-bugs mailing list