Bugs trying to crosscompile gmp

Deekoo L. deekoo_tzc+bugreport at deekoo.net
Wed Mar 9 08:19:28 CET 2011


Trying to compile gmp 4.3.2 on a Debian testing amd64 system (As found at 
http://mirrors-us.seosue.com/gcc/infrastructure/gmp-4.3.2.tar.bz2 ) with
$ ./configure --host=i586-mingw32msvc &&make
fails with:

i586-mingw32msvc-gcc -std=gnu99 `test -f 'gen-fac_ui.c' || echo './'`gen-fac_ui.c -o gen-fac_ui
./gen-fac_ui  0 >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)
/usr/lib/binfmt-support/run-detectors: can't execute /usr/lib/cli/binfmt-detector-cli: No such file or directory
Usage: gen-fac_ui limbbits nailbits

The binfmt-support error is harmless; win32 binaries are being automatically
executed through wine on my system.  i586-mingw32msvc-gcc is version 4.4.4.

uname -a returns "Linux transfinity 2.6.32-5-amd64 #1 SMP Fri Dec 10 15:35:08 UTC 2010 x86_64 GNU/Linux".  config.guess and configfsf.guess return
core2-unknown-linux-gnu and x86_64-unknown-linux-gnu respectively.

config.log is attached.

It looks to me like the problem is that it's failing to correctly define
the bits per limb, since it's turning
--- gmp-h.in ---
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
#define __GMP_BITS_PER_MP_LIMB             @BITS_PER_MP_LIMB@
#define __GMP_HAVE_HOST_CPU_FAMILY_power   @HAVE_HOST_CPU_FAMILY_power@
#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc @HAVE_HOST_CPU_FAMILY_powerpc@
#define GMP_LIMB_BITS                      @BITS_PER_MP_LIMB@
#define GMP_NAIL_BITS                      @GMP_NAIL_BITS@
#endif
#define GMP_NUMB_BITS     (GMP_LIMB_BITS - GMP_NAIL_BITS)
#define GMP_NUMB_MASK     ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS)
#define GMP_NUMB_MAX      GMP_NUMB_MASK
---          ---
into
--- gmp.h ---
/* Instantiated by configure. */
#if ! defined (__GMP_WITHIN_CONFIGURE)
#define __GMP_BITS_PER_MP_LIMB             
#define __GMP_HAVE_HOST_CPU_FAMILY_power   0
#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0
#define GMP_LIMB_BITS                      
#define GMP_NAIL_BITS                      0
#endif
#define GMP_NUMB_BITS     (GMP_LIMB_BITS - GMP_NAIL_BITS)
#define GMP_NUMB_MASK     ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS)
#define GMP_NUMB_MAX      GMP_NUMB_MASK
---       ---

gmp 5.0.1 will compile successfully when configured with
--host=i586-mingw32msvc, but 'make check' fails some of the tests:
--- (make check output) ---
make  check-TESTS
make[4]: Entering directory `/home/ming/tmp/gmp-5.0.1/tests/misc'
/usr/lib/binfmt-support/run-detectors: can't execute /usr/lib/cli/binfmt-detector-cli: No such file or directory
gmp_vsprintf wrong
  fmt      |%Fe|
  got      |0.000000e+28420932468998144|
  want     |0.000000e+00|
  got_len  27
  want_len 12
FAIL: t-printf.exe
/usr/lib/binfmt-support/run-detectors: can't execute /usr/lib/cli/binfmt-detector-cli: No such file or directory
t-scanf.c:1495: GNU MP assertion failed: ret == (-1)
FAIL: t-scanf.exe
/usr/lib/binfmt-support/run-detectors: can't execute /usr/lib/cli/binfmt-detector-cli: No such file or directory
PASS: t-locale.exe
------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.gz
Type: application/octet-stream
Size: 70883 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-bugs/attachments/20110308/81165f28/attachment-0001.obj>


More information about the gmp-bugs mailing list