[lfs-support] Error in section 5.5.1 Cross GCC
Greetings: First I would like to state that I was able to successfully compile Binutils. In section 5.5.1 page 36; after the tar commands we are supposed to do the following: lfs@c-68-36-199-213:/mnt/lfs/sources/gcc-4.8.1$ for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools@g' \ -e 's@/usr@/tools@g' $file.orig $file echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 /tools/lib/ #define STANDARD_STARTFILE_PREFIX_2 ' $file touch $file.orig done I get the following error: bash: syntax error near unexpected token `' So I thought to put it in a script: #!/bin/sh for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools@g' \ -e 's@/usr@/tools@g,$file.orig $file echo ' #undef STANDARD_STARTFILE_PREFIX_1 #undef STANDARD_STARTFILE_PREFIX_2 #define STANDARD_STARTFILE_PREFIX_1 /tools/lib/ #define STANDARD_STARTFILE_PREFIX_2 ' $file touch $file.orig done I get the following error repeated 28 times: sed: -e expression #2, char 16: unknown option to `s' Any assistance would be greatly appreciated. William -- 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 in section 5.5.1 Cross GCC
Le 10/01/2014 22:40, William Darryl Jackson a écrit : Greetings: First I would like to state that I was able to successfully compile Binutils. [...] So I thought to put it in a script: #!/bin/sh for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools@g' \ -e 's@/usr@/tools@g,$file.orig $file The comma in the line above should be replaced by a single quote ' followed by a space. echo ' [...] -- 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 in section 5.5.1 Cross GCC
On 01/10/2014 05:02 PM, Pierre Labastie wrote: Le 10/01/2014 22:40, William Darryl Jackson a écrit : Greetings: First I would like to state that I was able to successfully compile Binutils. [...] So I thought to put it in a script: #!/bin/sh for file in \ $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools@g' \ -e 's@/usr@/tools@g,$file.orig $file The comma in the line above should be replaced by a single quote ' followed by a space. echo ' [...] Thank you so much. I tried so many times I got cross eyed. William -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] GCC Make - libmpfr
Greetings: The GCC configure was successful, however the make error ed-out. checking for MPFR... no configure: error: libmpfr not found or uses a different ABI (including static vs shared). make[2]: *** [configure-stage1-mpc] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 This file is available: /mnt/lfs/sources/gcc-build/mpfr/src/libmpfr.la And, the host system has libmpfr4 version 3.1.0-5, but not libmpfr-dev (which will change g++ to 4.7. Is the problem with the host system missing -dev, or elsewhere? Thanks, William -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] GCC Make - libmpfr
Hi William, On Fri, 2014-01-10 at 20:32 -0500, William Darryl Jackson wrote: Greetings: The GCC configure was successful, however the make error ed-out. checking for MPFR... no configure: error: libmpfr not found or uses a different ABI (including static vs shared). make[2]: *** [configure-stage1-mpc] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 This file is available: /mnt/lfs/sources/gcc-build/mpfr/src/libmpfr.la I believe you want to extract mpc, mpfr and gmp into `/mnt/lfs/sources/gcc-version' rather than the build directory. To highlight, the text reads: == Note There are frequent misunderstandings about this chapter. The procedures are the same as every other chapter as explained earlier (Package build instructions). First extract the gcc tarball from the sources directory and then change to the directory created. Only then should you proceed with the instructions below. == That is mpc, mpfr and gmp need to be extracted into the directory created by extracting gcc. And, the host system has libmpfr4 version 3.1.0-5, but not libmpfr-dev (which will change g++ to 4.7. Is the problem with the host system missing -dev, or elsewhere? You shouldn't be using the development packages for your distribution in building the toolchain. Well as least as possible ;). Thanks, William Thanks, Michael -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] GCC Make - c++
On 01/10/2014 09:02 PM, Michael E. Maher wrote: Hi William, On Fri, 2014-01-10 at 20:32 -0500, William Darryl Jackson wrote: Greetings: The GCC configure was successful, however the make error ed-out. checking for MPFR... no configure: error: libmpfr not found or uses a different ABI (including static vs shared). make[2]: *** [configure-stage1-mpc] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 This file is available: /mnt/lfs/sources/gcc-build/mpfr/src/libmpfr.la I believe you want to extract mpc, mpfr and gmp into `/mnt/lfs/sources/gcc-version' rather than the build directory. To highlight, the text reads: == Note There are frequent misunderstandings about this chapter. The procedures are the same as every other chapter as explained earlier (Package build instructions). First extract the gcc tarball from the sources directory and then change to the directory created. Only then should you proceed with the instructions below. == That is mpc, mpfr and gmp need to be extracted into the directory created by extracting gcc. And, the host system has libmpfr4 version 3.1.0-5, but not libmpfr-dev (which will change g++ to 4.7. Is the problem with the host system missing -dev, or elsewhere? You shouldn't be using the development packages for your distribution in building the toolchain. Well as least as possible ;). Thanks, William Thanks, Michael Thanks Michael: That step is actually listed just beneath the note you highlighted, which I did - but obviously something went wrong or I was in the wrong directory. After manually copying the tarballs, extracting, and renaming them and recompiling, the 'make' made it beyond that point. However, I have encountered a new error, the c++ compiler seems to be having some trouble: configure: error: C++ compiler missing or inoperational make[2]: *** [configure-stage1-libcpp] Error 1 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2 The precompiler is also failing the sanity check. ../gcc-4.8.1/configure --target=$LFS_TGT --prefix=/tools --with-sysroot=$LFS --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.1/mpfr/src --with-mpfr-lib=$(pwd)/mpfr/src/.libs Any ideas. you know what, thanks for your help - but I think I need to reformat and start over. I am questioning my file permissions in 'tools'. There were some things I was unsure of in the beginning. Now that I have the knowledge - I need to start over again from Binutils. Thanks, William -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page