Re: [lfs-support] error when trying to cross compile glibc-2.19
Thanks all. Indeed changing the target name, was the solution to be able to build. Marian On Apr 19, 2014, at 12:42 AM, mar...@byteanywhere.com wrote: 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. I suggest you look at how we do that in CLFS at http://cross-lfs.org/view/git/index.html or our current http://cross-lfs.org/~kb0iic/CLFS-GIT-SYSTEMD/html/index.html Those will provide you a better understanding of what you may be doing wrong. One critical step is changing your target triplet so the tools know that it is cross compiling. Sincerely, William Harrington -- 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
Re: [lfs-support] error when trying to cross compile glibc-2.19
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
Re: [lfs-support] error when trying to cross compile glibc-2.19
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
Re: [lfs-support] error when trying to cross compile glibc-2.19
On 19.4.2014 7:42, mar...@byteanywhere.com wrote: 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 The trick is in this line. To cross compile glibc for the same arch, target triplet needs to be different or you are nothing other but simply compiling. I ran into similar issue when I bootstrapped 32 bit glibc on 64 bit os. That's one reason lfs uses $LFS_TGT-*lfs*-linux-gnu, not $LFS_TGT-*unknown*-linux-gnu for pass1 of both binutils and gcc. 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
Re: [lfs-support] error when trying to cross compile glibc-2.19
Le 19/04/2014 07:42, mar...@byteanywhere.com a écrit : 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 I think there are at least 2 problems in the above: 1) TARGET=x86_64-unknown-linux-gnu: you have not told what your host is, but I assume it is a 64 bit PC running linux. In this case, the host is already x86_64-unknown-linux-gnu, so the build systems of binutils and gcc do not understand that you want to create a cross compiler. As explained in LFS page 5.2, you need to slightly deviate from that by changing the vendor name from unknown to something else. Of course, if your host is not a 64 bit PC, the preceding does not apply. 2) SYSROOT=/home/marian/crosstool/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root SYSROOT is the _root_ of the new system disk image, where the linker will look for the target libraries. Using --with-sysroot=$SYSROOT --with-lib-path=/tools/lib below means that the linker will look into $SYSROOT/tools/lib for target libraries. Clearly, those directories do not exist. What I would recommend is to use the LFS section 4.4 setup. If you do not want to do that, you should at least have: PREFIX=/whatever/tools SYSROOT=/whatever ln -s /whatever/tools / 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=/ That's a very bad idea, you have overwritten your host headers, unless you did not run this command as user root, in which case you have done nothing... You should have seen errors, though. This step is not needed anyway. 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 Did you run the for file in [...] done part? 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 Those are not found by the linker because it looks for them in $SYSROOT/tools/lib/somepath, which does not exist. Also, the compiler thinks it is a native compiler if the TARGET is not different from the host, and the algorithm to find the files is different. 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 You should be able to run just make. 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. See what happens when you correct the errors above (TARGET and SYSROOT, I think). Pierre -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] error when trying to cross compile glibc-2.19
On Apr 19, 2014, at 12:42 AM, mar...@byteanywhere.com wrote: 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. I suggest you look at how we do that in CLFS at http://cross-lfs.org/view/git/index.html or our current http://cross-lfs.org/~kb0iic/CLFS-GIT-SYSTEMD/html/index.html Those will provide you a better understanding of what you may be doing wrong. One critical step is changing your target triplet so the tools know that it is cross compiling. Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] error when trying to cross compile glibc-2.19
Hi, I am getting the following error trying to build LFS 5.7 x86_64-unknown-linux-gnu-gcc -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/config.h rpc_main.c \ -o /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o -MMD -MP -MF /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o.dt -MT /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o -c rpc_main.c:37:19: fatal error: errno.h: No such file or directory #include errno.h ^ compilation terminated. I configured : ../glibc-2.19/configure --prefix=/tools --host=$TARGET --build=$(../glibc-2.19/scripts/config.guess) --disable-profile --enable-kernel=3.7.10 --with-headers=/tools/include libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes --without-selinux I am running on linux 3.7.10. I am not sure how to get this working. I build gcc using: make all-gcc make all-target-libgcc make install-gcc make install-target-libgcc because otherwise if i use make, i also get error saying that the compiler can not create executables. Thanks, Marian -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] error when trying to cross compile glibc-2.19
On Fri, Apr 18, 2014 at 10:37:48PM +0300, mar...@byteanywhere.com wrote: Hi, I am getting the following error trying to build LFS 5.7 For anybody confused by '5.7', that is section 5.7 not the LFS version ;-) With glibc-2.19 you are either using LFS-7.5 or a recent version of the development book. x86_64-unknown-linux-gnu-gcc -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/config.h rpc_main.c \ When I see a version of crosstool in the directory name, together with your heading about cross-compiling, I think that I don't know what you are doing! The LFS book is written for people building in /mnt/lfs, with a symlink from /tools to /mnt/lfs/tools. There is no requirement that /mnt/lfs needs to be a separate filesystem, but you do need to be able to access it as /mnt/lfs - from time to tiem I do test builds using a directory which I have bound to /mnt/lfs. Perhaps you are doing the same, but referencing crosstool implies you may well be doing something very different. In particular, you probably have not followed section 4.3 - we tell people to log in as the lfs user. Or perhaps the lfs user does have write access in /home/marian - some potential to overwrite your own files. -o /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o -MMD -MP -MF /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o.dt -MT /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/glibc-build/sunrpc/cross-rpc_main.o -c rpc_main.c:37:19: fatal error: errno.h: No such file or directory #include errno.h ^ compilation terminated. If you are indeed following the book, I think that perhaps you didn't install the kernel headers. There are _variants_ of errno.h in those. But I think this is probably a crosstool issue : glibc itself provides errno.h, so at this point in the process I guess it comes from the host system. Or alternatively, it should be coming from the glibc you are building - in that case, either your disk is full or the extracted source appears to be incomplete. It would definitely help if you can explain what you are trying to do. I configured : ../glibc-2.19/configure --prefix=/tools --host=$TARGET --build=$(../glibc-2.19/scripts/config.guess) --disable-profile --enable-kernel=3.7.10 --with-headers=/tools/include libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes --without-selinux I am running on linux 3.7.10. I am not sure how to get this working. I build gcc using: make all-gcc make all-target-libgcc make install-gcc make install-target-libgcc Yes, you are doing something different from the book - we are able to build pass-1 gcc using just make and make install. because otherwise if i use make, i also get error saying that the compiler can not create executables. Thanks, Marian We don't support real cross-compilation, if that is what you are trying to do. If your host system is x86_64-unknown-linux-gnu then you should be able to build LFS for x86_64. But one of the things you need to learn, even if you are not following the book, is how to debug the C compiler cannot create executables message. It's actually quite easy - in both gcc and binutils, configure is run in several directories. As it runs, it creates output in config.log in that directory, then moves on to the next directory and does the same thing - until it fails. So, to debug the gcc build problem (and your solution suggests that you are really cross-compiling), you need to find the newest config.log (or log configure's stdout and stderr and work out which directory it was in by reading the log). Then open up that config.log in e.g. vim ('view' for safety, I suppose) or else in 'less'. Search for the message: /C\ compiler\ cannot ('/' to search in vim or less, '\ ' to escape the spaces so that they are treated as part of the text to search for.) When you find that error message, look at the lines above it (probably a few screens worth, say 50 to 100 lines). You should see a message about what is being tested, a program fragment getting created, and then it is fed to the compiler to see if it will compile. Throughout any config.log you will see many error messages, typically because your system does not support a particular feature, or does not have a specific file. That is normal, but here you have a real error. Sometimes, a missing header might trigger it - that seems unlikely for this particular error, particularly since you compiled pass 1 binutils just before gcc. Perhaps there was a typo in $LFS_TGT when you built binutils. Usually, either gcc or ld is objecting to something in the compile, or occasionally there is a problem with ld. Either way, you will see the error message in config.log, a few lines above C
Re: [lfs-support] error when trying to cross compile glibc-2.19
On Apr 18, 2014, at 2:37 PM, mar...@byteanywhere.com wrote: /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/ glibc-build/sunrpc/cross-rpc_main.o -MMD -MP -MF /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/ glibc-build/sunrpc/cross-rpc_main.o.dt -MT /home/marian/kits/crosstool-0.43/build/x86_64-unknown-linux-gnu/ glibc-build/sunrpc/cross-rpc_main.o This is from kegel's cross-tools package 0.43 http://kegel.com/crosstool/ It's old, ancient, and newer tools cross compile much better, plus, LFS doesn't use cross-tools. What are you doing? Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] error when trying to cross compile glibc-2.19
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