error in gen-bases

John Baptise vukien at hcm.fpt.vn
Wed Mar 21 14:39:21 CET 2007


Hello!
I have an error when building gmp 4.2.1 from the source tarball with no 
patches. Make return the following:
> |gcc `test -f 'gen-fac_ui.c' || echo '../gmp-4.2.1/'`gen-fac_ui.c -o 
> gen-fac_ui
> ./gen-fac_ui 32 0 >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
> gcc `test -f 'gen-fib.c' || echo '../gmp-4.2.1/'`gen-fib.c -o gen-fib
> ./gen-fib header 32 0 >fib_table.h || (rm -f fib_table.h; exit 1)
> ./gen-fib table 32 0 >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1)
> gcc `test -f 'gen-bases.c' || echo '../gmp-4.2.1/'`gen-bases.c -o 
> gen-bases -lm
> ./gen-bases header 32 0 >mp_bases.h || (rm -f mp_bases.h; exit 1)
> ./gen-bases table 32 0 >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1)
> Assertion failure
> /bin/sh: line 1: 21846 Aborted                 ./gen-bases table 32 0 
> >mpn/mp_bases.c
> make: *** [mpn/mp_bases.c] Error 1
> |

here is what I got from gdb:
|
|
> |# gdb --args ./gen-bases table 32 0
> GNU gdb 5.3-25mdk (Mandrake Linux)
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and 
> you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for 
> details.
> This GDB was configured as "i586-mandrake-linux-gnu"...
> (gdb) run
> Starting program: /root/my-applications/gmp/gmp-obj/gen-bases table 32 0
> /* This file generated by gen-bases.c - DO NOT EDIT. */
>
> #include "gmp.h"
> #include "gmp-impl.h"
>
> #if GMP_NUMB_BITS != 32
> Error, error, this data is for 32 bits
> |#endif
>
> const struct bases mp_bases[257] =
> {
>   /*   0 */ { 0, 0.0, 0 },
>   /*   1 */ { 0, 1e37, 0 },
> Assertion failure @ 654, ../gmp-4.2.1/dumbmp.c
>
> Program received signal SIGABRT, Aborted.
> 0x40062031 in kill () from /lib/libc.so.6
> (gdb) backtrace
> #0  0x40062031 in kill () from /lib/libc.so.6
> #1  0x40061ca9 in raise () from /lib/libc.so.6
> #2  0x400631b8 in abort () from /lib/libc.so.6
> #3  0x08049937 in mpz_tdiv_qr (q=0x804bd74, r=0xbfacd350, a=0x804bd68,
>     b=0x804bd90) at dumbmp.c:654
> #4  0x080499db in mpz_tdiv_q (q=0x804bd74, a=0x804bd68, b=0x804bd90)
>     at dumbmp.c:679
> #5  0x0804a1f3 in generate (limb_bits=32, nail_bits=0, base=2)
>     at ../gmp-4.2.1/gen-bases.c:72
> #6  0x0804a475 in table (limb_bits=32, nail_bits=0)
>     at ../gmp-4.2.1/gen-bases.c:122
> #7  0x0804a676 in main (argc=4, argv=0xbfacd424)
>     at ../gmp-4.2.1/gen-bases.c:174
> #8  0x40050279 in __libc_start_main () from /lib/libc.so.6
The only configuration option was --prefix=/root/my-applications/
The version of gcc is( returned from gcc -v):
>
>  Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared 
> --enable-threads=posix --enable-__cxa_atexit --disable-checking 
> --with-gnu-ld --verbose --target=i486-slackware-linux 
> --host=i486-slackware-linux
> Thread model: posix
> gcc version 3.3.4
The rusult of uname -a was: Linux hacaopc 2.6.18.1 #1 Sat Nov 11 
07:52:06 PUP 2006 i686 unknown unknown GNU/Linux

config.guess gave:     pentium4-pc-linux-gnu
and configfsf.guess:    i686-pc-linux-gnu


This linux distro is from puppylinux, with vi translation,

I'll be very glad if someone have a look at my trouble

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gmplib.org/list-archives/gmp-bugs/attachments/20070321/72da865c/attachment.html 


More information about the gmp-bugs mailing list