[lfs-support] LFS 7.4 / 5.5 GCC Pass 1 Question

Kenan Regez kregez at outlook.com
Mon Nov 25 22:23:51 PST 2013


On 26.11.2013 01:16, Carl Thorn wrote:
> On 11/25/2013 03:38 PM, Kenan Regez wrote:
>> On 25.11.2013 06:14, Chris Staub wrote:
>>> On 11/24/2013 04:01 PM, Kenan Regez wrote:
>>>> Hi,
>>>>
>>>> It is my first try to build LFS im really excited about the project but
>>>> i have got a question about the step GCC 4.8.1.
>>>>
>>>> I run into the same error many times when i run "make". I followed every
>>>> step in the book, i untared the gmp, mpfr and mpc into my gcc-4.8.1 dir,
>>>> as written in the book i renamed the folders.
>>>>
>>>> Now after spending some hours to find the problem i did this another way
>>>> which worked but im unsure if it legit to use the way i did.
>>>>
>>>> I got allways this error:
>>>>
>>>> |checkingfor  MPFR...  no
>>>> configure:  error:  libmpfr not found or uses a different ABI.
>>>> make[1]:  ***  [configure-mpc]  Error  1|
>>> This usually means that mpfr was not unpacked where it should be. Please
>>> paste, directly from your command history, all the exact commands you
>>> typed which lead to this error, starting with unpacking the GCC tarball.
>> Thank you for your reply,
>>
>> Ok this is what i did in /mnt/lfs/sources:
>>
>> (before, i did follow the steps to configure binutils-2.23.2: that 
>> worked, i did not see any error)
>>
>> 1.     tar -xvf gcc-4.8.1.tar.bz2
>> 2.     cd gcc-4.8.1
>> 3.     tar -Jxf ../mpfr-3.1.2.tar.xz
>> 4.     mv -v mpfr-3.1.2 mpfr
>> 5.     tar -Jxf ../gmp-5.1.2.tar.xz
>> 6.     mv -v gmp-5.1.2 gmp
>> 7.     tar -zxf ../mpc-1.0.1.tar.gz
>> 8.     mv -v mpc-1.0.1 mpc
>> 9.    -> executed the script below
>>
>> 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 at 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 did copy that from the book.
>>
>> 9.1    sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
>>
>> 10.    mkdir -v ../gccbuild
>> 11.    cd ../gccbuild
>> 12.    did type the command char by char from the book and double 
>> checked :)
>>
>> ../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
>>
>> 13.   make
>>
>> and then i got error mentioned before.
>>
>> Do i need to configure && make && make install gmp, mpfr and mpc 
>> before in my /mnt/sources/tools directorie?
>>
>> I also thought about using some more statements to configure gcc, 
>> something like "--with-gmp-include=../gcc-4.8.1/gmp/..." or with 
>> "--with-mpc-lib=../gcc-4.8.1/mpc..." but there is no include dir, nor 
>> the lib dir...
>>
>> Where is my mistake?
>>
>> Thank you for anything you can help me with.
>>
>> Kenan
>>
>> Did you put the \ at the end of each line in your configure step?
>
>
>
Yes, i did, i also did check my system with that bashscript to be sure 
ive got everything i need on my host system.

Double checked everything on my host system, my versions are a higher 
but it is mentioned that i need at least 4.2.3 for example, and ive got 
4.3.0, but i dont think that this could be the problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20131126/f326a4a2/attachment.html>


More information about the lfs-support mailing list