GCC 4.9.2 Build Fails at cc1

Cyd Haselton chaselton@gmail.com
Wed Dec 3 17:37:00 GMT 2014


Hello,
After downloading and unpacking  the source, creating the build
directory and running ./contrib/download_prerequisites, I run
configure with the following options:

../gcc-4.9.2/configure --prefix=/usr/gcc-4.9
--build=arm-linux-androideabi --host=arm-linux-androideabi
--target=arm-linux-androideabi --disable-ld
--with-as=/usr/gcc-4.9/bin/as --with-ld=/usr/gcc-4.9/bin/ld
--enable-languages=c,c++ --disable-bootstrap --disable-gold
--disable-fortran --disable-libssp --disable-libquadmath
--disable-libquadmath-support --disable-libada --disable-nls
--disable-werror --disable-multilib --disable-libgomp --disable-cloog
--disable-libmudflap --disable-libatomic --disable-sjlj-exceptions
--disable-libitm --disable-ppl
--with-build-time-tools=/usr/gcc-4.9/bin
--with-sysroot=/usr/gcc-4.9/sysroot
--with-build-sysroot=/usr/gcc-4.9/sysroot
LDFLAGS=-Wl,--dynamic-linker=/system/bin/linker
-L/usr/gcc-4.8/sysroot/usr/lib -lc -ldl -lgcc -lm -lsupc++
-lgnustl_shared LIBCFLAGS=-O2 -mandroid -mbionic LIBCPPFLAGS=-O2
-mandroid -mbionic LIBCXXFLAGS=-O2 -mandroid -mbionic
-fno-implicit-templates LIBS=-lc -ldl -lgcc -lm -lsupc++
-lgnustl_shared SHELL=/bin/sh


And during make, this happens:

g++ --sysroot=/usr/gcc-4.8/sysroot   -g -O2 -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
 -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc
-Wl,--dynamic-linker=/system/bin/linker -lc -ldl -lgcc -lm -lsupc++
-lgnustl_shared -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o
c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o
c/c-objc-common.o c/c-parser.o c/c-array-notation.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o
c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-cilkplus.o
c-family/array-notation-common.o c-family/cilk.o c-family/c-ubsan.o
arm-c.o glibc-c.o \
  cc1-checksum.o libbackend.a main.o  libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
-L/bld/gcc/builddir-4.9/./gmp/.libs
-L/bld/gcc/builddir-4.9/./mpfr/.libs
-L/bld/gcc/builddir-4.9/./mpc/src/.libs -lmpc -lmpfr -lgmp -rdynamic
-L../zlib -lz
/bld/gcc/builddir-4.9/./mpfr/.libs/libmpfr.a(div.o): In function `mpfr_div':
/bld/gcc/builddir-4.9/mpfr/../../gcc-4.9.2/mpfr/div.c:324: undefined
reference to `__gmpn_divrem'
/bld/gcc/builddir-4.9/mpfr/../../gcc-4.9.2/mpfr/div.c:284: undefined
reference to `__gmpn_rshift'
/bld/gcc/builddir-4.9/mpfr/../../gcc-4.9.2/mpfr/div.c:432: undefined
reference to `__gmpn_mul'
/bld/gcc/builddir-4.9/mpfr/../../gcc-4.9.2/mpfr/div.c:292: undefined
reference to `__gmpn_rshift'
/bld/gcc/builddir-4.9/mpfr/../../gcc-4.9.2/mpfr/div.c:499: undefined
reference to `__gmpn_sub_n'

*snip*

/bld/gcc/builddir-4.9/gmp/mpz/../../../gcc-4.9.2/gmp/mpz/tdiv_q.c:77:
undefined reference to `__gmpn_tdiv_qr'
/bld/gcc/builddir-4.9/./gmp/.libs/libgmp.a(tdiv_q_2exp.o): In function
`__gmpz_tdiv_q_2exp':
/bld/gcc/builddir-4.9/gmp/mpz/../../../gcc-4.9.2/gmp/mpz/tdiv_q_2exp.c:49:
undefined reference to `__gmpn_rshift'
/bld/gcc/builddir-4.9/./gmp/.libs/libgmp.a(tdiv_qr.o): In function
`__gmpz_tdiv_qr':
/bld/gcc/builddir-4.9/gmp/mpz/../../../gcc-4.9.2/gmp/mpz/tdiv_qr.c:98:
undefined reference to `__gmpn_tdiv_qr'
/bld/gcc/builddir-4.9/./gmp/.libs/libgmp.a(tdiv_r.o): In function
`__gmpz_tdiv_r':
/bld/gcc/builddir-4.9/gmp/mpz/../../../gcc-4.9.2/gmp/mpz/tdiv_r.c:83:
undefined reference to `__gmpn_tdiv_qr'
collect2: error: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/bld/gcc/builddir-4.9/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/bld/gcc/builddir-4.9'
make: *** [all] Error 2

Previously I thought this occurred because I was using the wrong
versions of mpfr/gmp and mpc...until I started over and ran the
download_prerequisites.

Any idea what could be wrong?



More information about the Gcc-help mailing list