Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm getting started with Bare Bones, and the as a first step am creating a cross compiler on Debian Wheezy. All the gcc related steps are working, but I'm having trouble building libgcc. When I run make all-target-libgcc, I get
checking for suffix of object files... configure: error: in `/home/vagrant/src/build-gcc/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
configure:3371: /home/vagrant/src/build-gcc/./gcc/xgcc -B/home/vagrant/src/build-gcc/./gcc/ -B/home/vagrant/opt/cross/i686-elf/bin/ -B/home/vagrant/opt/cross/i686-elf/lib/ -isystem /home/vagrant/opt/cross/i686-elf/include -isystem /home/vagrant/opt/cross/i686-elf/sys-include -o conftest -g -O2 conftest.c >&5
/home/vagrant/src/build-gcc/./gcc/as: 87: exec: -o: not found
configure:3374: $? = 1
configure:3562: checking for suffix of object files
configure:3584: /home/vagrant/src/build-gcc/./gcc/xgcc -B/home/vagrant/src/build-gcc/./gcc/ -B/home/vagrant/opt/cross/i686-elf/bin/ -B/home/vagrant/opt/cross/i686-elf/lib/ -isystem /home/vagrant/opt/cross/i686-elf/include -isystem /home/vagrant/opt/cross/i686-elf/sys-include -c -g -O2 conftest.c >&5
/home/vagrant/src/build-gcc/./gcc/as: 87: exec: -o: not found
configure:3588: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
I tried adding the path to the libmpc, libgmp, and libmpfr to the ld path, but got the same result. I have multiple libmpc.so files in /usr/lib/i386-linux-gnu, not sure if that is an issue, as I both apt-getted those libraries and ran the gcc dependency download script. Anybody been here before?
This seems unusually odd. Can you please dump all your environmental variables using env (1) and provide a full log of everything you typed and all the output? I couldn't spot the issue from the above log. Does your compiler work?
make[1]: Entering directory `/home/vagrant/src/build-gcc/libiberty'
make[2]: Entering directory `/home/vagrant/src/build-gcc/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vagrant/src/build-gcc/libiberty/testsuite'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/libiberty'
make[1]: Entering directory `/home/vagrant/src/build-gcc/lto-plugin'
make all-am
make[2]: Entering directory `/home/vagrant/src/build-gcc/lto-plugin'
make[2]: Leaving directory `/home/vagrant/src/build-gcc/lto-plugin'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/lto-plugin'
make[1]: Entering directory `/home/vagrant/src/build-gcc/gmp'
make all-recursive
make[2]: Entering directory `/home/vagrant/src/build-gcc/gmp'
Making all in tests
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests'
Making all in .
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests'
Making all in devel
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/devel'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/devel'
Making all in mpn
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/mpn'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/mpn'
Making all in mpz
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/mpz'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/mpz'
Making all in mpq
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/mpq'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/mpq'
Making all in mpf
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/mpf'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/mpf'
Making all in rand
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/rand'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/rand'
Making all in misc
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/misc'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/misc'
Making all in cxx
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/cxx'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/cxx'
Making all in mpbsd
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/tests/mpbsd'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests/mpbsd'
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tests'
Making all in mpn
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/mpn'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/mpn'
Making all in mpz
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/mpz'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/mpz'
Making all in mpq
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/mpq'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/mpq'
Making all in mpf
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/mpf'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/mpf'
Making all in printf
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/printf'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/printf'
Making all in scanf
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/scanf'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/scanf'
Making all in cxx
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/cxx'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/cxx'
Making all in mpbsd
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/mpbsd'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/mpbsd'
Making all in demos
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/demos'
Making all in calc
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/demos/calc'
make all-am
make[5]: Entering directory `/home/vagrant/src/build-gcc/gmp/demos/calc'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/vagrant/src/build-gcc/gmp/demos/calc'
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/demos/calc'
Making all in expr
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/demos/expr'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/demos/expr'
make[4]: Entering directory `/home/vagrant/src/build-gcc/gmp/demos'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/vagrant/src/build-gcc/gmp/demos'
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/demos'
Making all in tune
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/tune'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/tune'
Making all in doc
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp/doc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp/doc'
make[3]: Entering directory `/home/vagrant/src/build-gcc/gmp'
make[3]: Leaving directory `/home/vagrant/src/build-gcc/gmp'
make[2]: Leaving directory `/home/vagrant/src/build-gcc/gmp'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/gmp'
make[1]: Entering directory `/home/vagrant/src/build-gcc/intl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vagrant/src/build-gcc/intl'
make[1]: Entering directory `/home/vagrant/src/build-gcc/mpfr'
Making all in tests
make[2]: Entering directory `/home/vagrant/src/build-gcc/mpfr/tests'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vagrant/src/build-gcc/mpfr/tests'
make[2]: Entering directory `/home/vagrant/src/build-gcc/mpfr'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/vagrant/src/build-gcc/mpfr'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/mpfr'
make[1]: Entering directory `/home/vagrant/src/build-gcc/mpc'
make all-recursive
make[2]: Entering directory `/home/vagrant/src/build-gcc/mpc'
Making all in src
make[3]: Entering directory `/home/vagrant/src/build-gcc/mpc/src'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/mpc/src'
Making all in tests
make[3]: Entering directory `/home/vagrant/src/build-gcc/mpc/tests'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/mpc/tests'
Making all in doc
make[3]: Entering directory `/home/vagrant/src/build-gcc/mpc/doc'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vagrant/src/build-gcc/mpc/doc'
make[3]: Entering directory `/home/vagrant/src/build-gcc/mpc'
make[3]: Leaving directory `/home/vagrant/src/build-gcc/mpc'
make[2]: Leaving directory `/home/vagrant/src/build-gcc/mpc'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/mpc'
make[1]: Entering directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/libiberty'
make[2]: Entering directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/libiberty/testsuite'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/libiberty'
make[1]: Entering directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/fixincludes'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vagrant/src/build-gcc/build-i686-pc-linux-gnu/fixincludes'
make[1]: Entering directory `/home/vagrant/src/build-gcc/zlib'
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/home/vagrant/opt/cross" "infodir=/home/vagrant/opt/cross/share/info" "libdir=/home/vagrant/opt/cross/lib" "prefix=/home/vagrant/opt/cross" "tooldir=/home/vagrant/opt/cross/i686-elf" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[1]: Leaving directory `/home/vagrant/src/build-gcc/zlib'
make[1]: Entering directory `/home/vagrant/src/build-gcc/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[1]: Leaving directory `/home/vagrant/src/build-gcc/libcpp'
make[1]: Entering directory `/home/vagrant/src/build-gcc/libdecnumber'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vagrant/src/build-gcc/libdecnumber'
make[1]: Entering directory `/home/vagrant/src/build-gcc/fixincludes'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/vagrant/src/build-gcc/fixincludes'
make[1]: Entering directory `/home/vagrant/src/build-gcc/gcc'
make[1]: Leaving directory `/home/vagrant/src/build-gcc/gcc'
Checking multilib configuration for libgcc...
Configuring in i686-elf/libgcc
configure: loading cache ./config.cache
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-elf
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... mawk
checking for i686-elf-ar... i686-elf-ar
checking for i686-elf-lipo... i686-elf-lipo
checking for i686-elf-nm... /home/vagrant/src/build-gcc/./gcc/nm
checking for i686-elf-ranlib... i686-elf-ranlib
checking for i686-elf-strip... i686-elf-strip
checking whether ln -s works... yes
checking for i686-elf-gcc... /home/vagrant/src/build-gcc/./gcc/xgcc -B/home/vagrant/src/build-gcc/./gcc/ -B/home/vagrant/opt/cross/i686-elf/bin/ -B/home/vagrant/opt/cross/i686-elf/lib/ -isystem /home/vagrant/opt/cross/i686-elf/include -isystem /home/vagrant/opt/cross/i686-elf/sys-include
checking for suffix of object files... configure: error: in `/home/vagrant/src/build-gcc/i686-elf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make: *** [configure-target-libgcc] Error 1
I have no idea what more to do. The binaries are all in the right place and seem to work, it's just libgcc that's failing. Since this is all on a vagrant debian box I'm considering wiping it and starting fresh.
Hi. When I asked for the commands and output above, I meant you must delete the build directory and start over. Paste all the terminal scrollback, including the commands you typed, in a single log.
Mind that the leading : in LD_LIBRARY_PATH means the current directory, it is a bad thing to do that.