This is the gcc compile error configure:8604: checking whether the C compiler works configure:8626: /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/build-gcc/./prev-gcc/xgcc -B/home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/build-gcc/./prev-gcc/ -B/tools/x86_64-unknown-linux-gnu/bin/ -B/tools/x86_64-unknown-linux-gnu/bin/ -B/tools/x86_64-unknown-linux-gnu/lib/ -isystem /tools/x86_64-unknown-linux-gnu/include -isystem /tools/x86_64-unknown-linux-gnu/sys-include -g -O2 -gtoggle -static-libstdc++ -static-libgcc conftest.c >&5 /tools/x86_64-unknown-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory /tools/x86_64-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory /tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc /tools/x86_64-unknown-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status configure:8630: $? = 1 configure:8668: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU MP" | #define PACKAGE_TARNAME "gmp" | #define PACKAGE_VERSION "5.1.3" | #define PACKAGE_STRING "GNU MP 5.1.3" | #define PACKAGE_BUGREPORT "gmp-b...@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | #define PACKAGE "gmp" | #define VERSION "5.1.3" | #define WANT_ASSEMBLY 1 | #define WANT_FFT 1 | #define HAVE_HOST_CPU_none 1 | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:8673: error: in `/home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/build-gcc/gmp': configure:8675: error: C compiler cannot create executables See `config.log' for more details
> One update is that step 5 when building glibc, the compilation fails due > to errno.h > > rpc_main.c:37:19: fatal error: errno.h: No such file or directory > #include <errno.h> > >> >> Hi >> >> Thanks all for the replays. >> I am trying to create a cross compiler using the steps for building LFS >> when the temporary tools are build. >> Those steps should allow me to use the cross compiler, but obviously >> i am not doing something correctly. >> I just used the path from cross-tools package 0.43 >> but not using anything from there. One reason for which i am trying >> to create the cross compiler, is that i saw you build for LFS gcc 4.8.2 >> and glibc-2.19, which are not supported anymore by that tool or others. >> >> This are the steps is used. I didnt created a lfs user, >> but if you think thats the cause of the problem i can create it and try >> that way as well. The host is x86_64 with kernel 3.7.10 >> >> I have a symlink between: >> ls -ld /tools >> lrwxrwxrwx 1 root root 47 Apr 17 08:08 /tools -> >> /home/marian/crosstool/x86_64-unknown-linux-gnu/ >> >> >> export PREFIX=/home/marian/crosstool/x86_64-unknown-linux-gnu >> export TARGET=x86_64-unknown-linux-gnu >> export >> SYSROOT=/home/marian/crosstool/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root >> export PATH=/tools/bin:/bin:/usr/bin >> >> 1. Binutils >> ../binutils-2.24/configure --prefix=/tools --with-sysroot=$SYSROOT >> --with-lib-path=/tools/lib --target=$TARGET --disable-nls >> --disable-werror >> >> binutils compiles fine. no errors. >> >> 2. Kernel headers >> >> make headers_check >> make INSTALL_HDR_PATH=dest headers_install >> cp -rv dest/include/* /tools/include >> >> >> 3. From some other docs i saw they install the glibc headers as well >> here. >> I have tried this, but the same error is happening when building gcc or >> glibc. >> System glibc headers >> >> mkdir glibc-build >> cd glibc-build >> >> ../glibc-2.19/configure --prefix=/tools --host=$TARGET >> --build=$(../glibc-2.19/scripts/config.guess) --disable-profile >> --enable-kernel=2.6.32 --with-headers=/tools/include >> libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes >> --without-selinux >> >> make -k install-headers install_root=/ >> >> 4. GCC stage 1 >> >> ../gcc-4.8.2/configure --target=$TARGET --prefix=/tools >> --with-sysroot=$SYSROOT --with-newlib --without-headers >> --with-local-prefix=/tools >> --with-native-system-header-dir=/tools/include --disable-nls >> --disable-shared --disable-multilib --disable-decimal-float >> --disable-threads --disable-libatomic --disable-libgomp >> --disable-libitm >> --disable-libmudflap --disable-libquadmath --disable-libsanitizer >> --disable-libssp --disable-libstdc++-v3 --enable-languages=c,c++ >> --with-mpfr-include=$(pwd)/../gcc-4.8.2/mpfr/src >> --with-mpfr-lib=$(pwd)/mpfr/src/.libs >> >> Here if i use make, i get the same error, that compiler can not >> create >> executables. From config log, the error is that cross gcc is not able >> to find a couple of libs (which seems generated by glibc) crt1.o, >> crti.o, >> crtn.o and libc.so >> >> Thus from other docs i have seen these being used, so i have tried to >> continue using them: >> >> make all-gcc >> make all-target-libgcc >> make install-gcc >> make install-target-libgcc >> >> 5. building glibc fails building in sunrpc folder, >> for some rpc_* files, with the same same error, saying that those libs >> can >> not be found. >> >> >> ../glibc-2.19/configure --prefix=/tools --host=$TARGET >> --build=$(../glibc-2.19/scripts/config.guess) --disable-profile >> --enable-kernel=2.6.32 --with-headers=/tools/include >> libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes >> --without-selinux >> >> -- >> http://linuxfromscratch.org/mailman/listinfo/lfs-support >> FAQ: http://www.linuxfromscratch.org/lfs/faq.html >> Unsubscribe: See the above information page >> > > -- > http://linuxfromscratch.org/mailman/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/lfs/faq.html > Unsubscribe: See the above information page > -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page