Build error in gmp 4.2.2

Michael J. Bauer mjbauer at eecs.tufts.edu
Tue Mar 25 17:34:41 CET 2008


I am attempting to build gmp 4.2.2 from source on a Sunfire V120 running 
Solaris 10.  I am finding a build error with a 64-bit build and C++ 
support enabled.  I am using gcc and the stock Solaris build tools 
(make, ld, ar, ranlib, and so on)

Pertinent information:

# gcc --version
gcc (GCC) 3.4.6
# ./configure --prefix=/usr/local/package2 
--oldincludedir=/usr/local/package2/include --enable-cxx
(The error only happens with C++ support enabled.  The peculiar location 
is so I can make a Solaris package; the real install will happen in 
/usr/local.)
# setenv ABI 64
(This error does not happen with ABI 32, but does happen with ABI unset.)

I've hand-compiled dummy.o as 64-bit, but several other .o files also 
come up 32-bit.

The actual error sequence:

/bin/bash ./libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I. 
-D__GMP_WITHIN_GMP    -g -O2 -c -o dummy.lo `test -f 'cxx/dummy.cc' || 
echo './'`cxx/dummy.cc
 g++ -DHAVE_CONFIG_H -I. -I. -I. -D__GMP_WITHIN_GMP -g -O2 -c 
cxx/dummy.cc  -fPIC -DPIC -o .libs/dummy.o
 g++ -DHAVE_CONFIG_H -I. -I. -I. -D__GMP_WITHIN_GMP -g -O2 -c 
cxx/dummy.cc -o dummy.o >/dev/null 2>&1
/bin/bash ./libtool --mode=link g++  -g -O2    -o libgmpxx.la -rpath 
/usr/local/package2/lib -Wc,-m64   -version-info 4:2:0 dummy.lo 
cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo 
cxx/ismpznw.lo         cxx/osdoprnti.lo 
cxx/osfuns.lo                                  cxx/osmpf.lo cxx/osmpq.lo 
cxx/osmpz.lo libgmp.la
g++ -shared -nostdlib  
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/sparcv9/crti.o 
/usr/ccs/lib/sparcv9/values-Xa.o 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/sparcv9/crtbegin.o  
.libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o 
cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o 
cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o 
cxx/.libs/osmpz.o  -Wl,-R -Wl,/tmp/Software/gmp-4.2.2-64/.libs -Wl,-R 
-Wl,/usr/local/lib/sparcv9 -Wl,-R -Wl,/usr/local/package2/lib -Wl,-R 
-Wl,/usr/local/lib/sparcv9 -Wl,-R -Wl,/usr/local/lib -Wl,-R 
-Wl,/usr/local/ssl/lib -Wl,-R -Wl,/usr/openwin/lib ./.libs/libgmp.so 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/sparcv9 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../../sparc-sun-solaris2.10/lib 
-L/usr/ccs/bin/sparcv9 -L/usr/ccs/bin -L/usr/ccs/lib/sparcv9 
-L/usr/ccs/lib 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../../sparcv9 
-L/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/../../.. -L/lib/sparcv9 
-L/usr/lib/sparcv9 /usr/local/lib/sparcv9/libstdc++.so 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/sparcv9/libstdc++-v3/src 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/sparc-sun-solaris2.10/sparcv9/libstdc++-v3/src/.libs 
-L/usr/local/lib -L/usr/local/ssl/lib -L/usr/openwin/lib 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/gcc/sparcv9 
-L/sol10/SOURCES/S10/gcc-3.4.6/objdir/gcc -L/usr/local/lib/sparcv9 -lm 
-lgcc_s_sparcv9 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/sparcv9/crtend.o 
/usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/sparcv9/crtn.o  -m64 
-Wl,-h -Wl,libgmpxx.so.4 -o .libs/libgmpxx.so.4.0.2
ld: fatal: file .libs/dummy.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to 
.libs/libgmpxx.so.4.0.2
collect2: ld returned 1 exit status



More information about the gmp-bugs mailing list