Documentation; build bugs

Torbjorn Granlund tg at swox.com
Sat Jan 5 00:51:40 CET 2008


Jafet <jafet.vixle at gmail.com> writes:

  There seems to be a discrepancy in the 4.2.2 manual, section 2.6:
  For example,
  cd tune
  make tuneup
  ./tuneup
  A brief read through tune/Makefile however appears to show only the target
  "tune" and not "tuneup", which is also stated in tune/README.
  
Both should work.  "make tune" is supposed to build tuneup and then
run it.

  Additionally, tuneup fails to build. This could be a bug. I am building
  from MSYS in Windows XP:
  $ gcc --version
  gcc.exe (GCC) 3.4.5 (mingw special)
  [...]
  $ make --version
  GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
  Built for i686-pc-msys
  [...]
  $ sh --version
  GNU bash, version 2.04.0(1)-release (i686-pc-msys)
  $ configure --enable-cxx
  [...]
  $ make
  [...]
  $ make check
  [...]
  $ cd tune
  $ make tune
  [...]
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../tests -m32 -O2
  -fomit-frame-pointer -mtune=k8 -march=k8 -mno-cygwin -c set_strs.c -o
  set_strs.o
  /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..
  -I../tests    -m32 -O2 -fomit-frame-pointer -mtune=k8 -march=k8
  -mno-cygwin -c -o time.lo time.c
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../tests -m32 -O2
  -fomit-frame-pointer -mtune=k8 -march=k8 -mno-cygwin -c time.c -o time.o
  time.c: In function `getrusage_backwards_p':
  time.c:650: error: storage size of 'start' isn't known
  time.c:650: error: storage size of 'prev' isn't known
  time.c:650: error: storage size of 'next' isn't known
  make[1]: *** [time.lo] Error 1
  make[1]: Leaving directory `/d/c++/gmp/gmp-4.2.2 /tune'
  make: *** [tune] Error 2

Please try this patch and report back if it helps:

diff -p -2 -r1.3 time.c
*** tune/time.c 30 Aug 2007 19:38:21 -0000      1.3
--- tune/time.c 4 Jan 2008 23:50:46 -0000
*************** getrusage_backwards_p (void)
*** 648,652 ****
  {
    static int result = -1;
!   struct rusage  start, prev, next;
    long  d;
    int   i;
--- 648,652 ----
  {
    static int result = -1;
!   struct_rusage  start, prev, next;
    long  d;
    int   i;


-- 
Torbjörn


More information about the gmp-bugs mailing list