Failure to build new gmp dll.
djh
henman at it.to-be.co.jp
Fri Oct 20 08:51:23 CEST 2006
I am trying to build a dll with the new gnu mp package, i.e., 4.2.1, but have
run into a problem... Please read on and see if you can give me a hand.
--------
Platform info:
gmp vers: 4.2.1
$ uname -a
CYGWIN_NT-5.1 henman-np 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin
$ ./config.guess
pentium3-pc-cygwin
$ ./configfsf.guess
i686-pc-cygwin
----------------
# Procedure followed:
# configured as below successfully
$ ./configure --disable-static --enable-shared
# then attempted to make
$ make
# make runs well until it dies. Below is the last clip of make's output.
/bin/sh ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo dive_1 | sed 's/_$//'` -m32 -O2 -fomit-frame-pointer -mtune=pentium3 -march=pentium3 `test -f 'dive_1.asm
' || echo './'`dive_1.asm
../mpn/m4-ccas --m4=m4 gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dive_1 -m32 -O2 -fomit-frame-pointer -mtune=pentium3 -march=pentium3 dive_1.asm -DPIC -o .libs/dive_1.o
m4 -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_dive_1 -DPIC dive_1.asm >tmp-dive_1.s
gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_dive_1 -m32 -O2 -fomit-frame-pointer -mtune=pentium3 -march=pentium3 tmp-dive_1.s -DPIC -o .libs/dive_1.o
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/as: BFD 2.17.50 20060817 assertion fail /netrel/src/binutils-20060817-1/bfd/coff-i386.c:576
tmp-dive_1.s: Assembler messages:
tmp-dive_1.s:110: Error: cannot represent relocation type BFD_RELOC_386_GOTPC
make[2]: *** [dive_1.lo] Error 1
make[2]: Leaving directory `/usr/src/gmp/gmp-4.2.1/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/gmp/gmp-4.2.1'
make: *** [all] Error 2
----------------
Since the error seems to involve asm I am including config.m4 as suggested.
----
cat config.m4
dnl config.m4. Generated automatically by configure.
changequote(<,>)
ifdef(<__CONFIG_M4_INCLUDED__>,,<
define(<CONFIG_TOP_SRCDIR>,<`../.'>)
define(<WANT_ASSERT>,0)
define(<WANT_PROFILING>,<`no'>)
define(<M4WRAP_SPURIOUS>,<no>)
define(<TEXT>, <.text>)
define(<DATA>, <.data>)
define(<LABEL_SUFFIX>, <:>)
define(<GLOBL>, <.globl>)
define(<GLOBL_ATTR>, <>)
define(<GSYM_PREFIX>, <_>)
define(<RODATA>, < .section .rdata,"dr">)
define(<TYPE>, <>)
define(<SIZE>, <>)
define(<LSYM_PREFIX>, <L>)
define(<W32>, <.long>)
define(<ALIGN_LOGARITHMIC>,<no>)
define(<ALIGN_FILL_0x90>,<yes>)
define(<HAVE_COFF_TYPE>, <yes>)
define(<GOT_GSYM_PREFIX>, <>)
define(<WANT_SHLDL_CL>, <1>)
define(<SQR_KARATSUBA_THRESHOLD>,<42>)
define(<SIZEOF_UNSIGNED>,<4>)
define(<GMP_LIMB_BITS>,32)
define(<GMP_NAIL_BITS>,0)
define(<GMP_NUMB_BITS>,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))
>)
changequote(`,')
ifdef(`__CONFIG_M4_INCLUDED__',,`
include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4')
include_mpn(`x86/x86-defs.m4')
define_not_for_expansion(`HAVE_HOST_CPU_pentium3')
define_not_for_expansion(`HAVE_ABI_32')
define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN')
define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')
')
define(`__CONFIG_M4_INCLUDED__')
----
And now for the offending line in ".../mpn/tmp-dive_1.s"
Line # 110 below in context.
call Lmovl_eip_ebp
line #110 addl $_GLOBAL_OFFSET_TABLE_, %ebp
movl ___gmp_modlimb_invert_table at GOT(%ebp), %ebp
movzbl (%eax,%ebp), %ebp
Please take a look at this and help me if you can. Any help is appreciated.
Thanks.
Darel Henman
More information about the gmp-bugs
mailing list