LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-04-2012, 11:41 AM   #1
esornep
Member
 
Registered: Jun 2012
Posts: 48

Rep: Reputation: Disabled
LFS Version SVN-20120623 gcc build 2


checking for __gmpz_init in -lgmp... yes
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI.
make[1]: *** [configure-mpc] Error 1
make[1]: Leaving directory `/mnt/lfs/gcc-build'
make: *** [all] Error 2
strings@ubuntu:/mnt/lfs/gcc-build$ echo $PATH
/tools/bin:/bin:/usr/bin

GCC-4.7.1 - Pass 2 gives the above error in make file

help please ........

building on LFS SVN on ubuntu 12.04

Last edited by esornep; 07-04-2012 at 11:43 AM.
 
Old 07-04-2012, 12:12 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Found a similar problem have a look here
 
Old 07-04-2012, 12:19 PM   #3
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
yeah removed all the build libraries and started from the first but same error ....... and yes viewed the link u posted ............... any help ..... thanks
 
Old 07-04-2012, 01:24 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Did you run the checks at the bottom of glibc
Code:
echo 'main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
And get the correct output
 
Old 07-04-2012, 01:29 PM   #5
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
yep got the output right ... it is giving the same error on ubuntu 11.04 (using LFS 7.1) any help ???
 
Old 07-04-2012, 01:31 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by esornep View Post
checking for __gmpz_init in -lgmp... yes
checking for MPFR... no
configure: error: libmpfr not found or uses a different ABI.

make[1]: *** [configure-mpc] Error 1
make[1]: Leaving directory `/mnt/lfs/gcc-build'
make: *** [all] Error 2
strings@ubuntu:/mnt/lfs/gcc-build$ echo $PATH
/tools/bin:/bin:/usr/bin
Did you forget this step (done from within the gcc source directory):
Code:
tar -jxf ../mpfr-3.1.0.tar.bz2
mv -v mpfr-3.1.0 mpfr
One of the build instruction steps: http://www.linuxfromscratch.org/lfs/...gcc-pass2.html

Do remember to completely remove the gcc source and build dir before redoing this chapter!
 
Old 07-04-2012, 01:41 PM   #7
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
no .. i checked it had the library .... removed everything and started from first but the same error....
 
Old 07-04-2012, 01:51 PM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
I noticed you do not use the $LFS/sources directory, why? (make[1]: Leaving directory `/mnt/lfs/gcc-build'). This chapter: http://www.linuxfromscratch.org/lfs/...roduction.html and one related command here: http://www.linuxfromscratch.org/lfs/...ddinguser.html

Please follow the books instructions......

Just in case, can you post the output of the following command:
Code:
ls -l $LFS/gcc-4.7.1/
 
Old 07-04-2012, 02:09 PM   #9
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:


total 10364
-rw-r--r-- 1 strings strings 38475 Jul 4 2003 ABOUT-NLS
-rw-r--r-- 1 strings strings 18002 Jul 14 2005 COPYING
-rw-r--r-- 1 strings strings 26527 Jul 14 2005 COPYING.LIB
-rw-r--r-- 1 strings strings 3324 Apr 9 2009 COPYING.RUNTIME
-rw-r--r-- 1 strings strings 35147 Jul 17 2007 COPYING3
-rw-r--r-- 1 strings strings 7639 Jul 17 2007 COPYING3.LIB
-rw-r--r-- 1 strings strings 535875 Jun 14 13:57 ChangeLog
-rw-r--r-- 1 strings strings 3262 May 13 2004 ChangeLog.tree-ssa
drwxr-xr-x 2 strings strings 4096 Jun 14 14:18 INSTALL
-rw-r--r-- 1 strings strings 58 Jun 14 14:18 LAST_UPDATED
-rw-r--r-- 1 strings strings 22392 Feb 17 19:44 MAINTAINERS
-rw-r--r-- 1 strings strings 6245033 Jun 14 15:31 MD5SUMS
-rw-r--r-- 1 strings strings 25329 Jan 2 2012 Makefile.def
-rw-r--r-- 1 strings strings 1429691 May 16 21:24 Makefile.in
-rw-r--r-- 1 strings strings 68223 May 16 21:24 Makefile.tpl
-rw-r--r-- 1 strings strings 592130 Jun 14 14:18 NEWS
-rw-r--r-- 1 strings strings 815 Oct 11 2009 README
drwxr-xr-x 7 strings strings 4096 Jun 14 14:05 boehm-gc
-rwxr-xr-x 1 strings strings 3707 Aug 22 2009 compile
drwxr-xr-x 2 strings strings 4096 Jun 14 14:05 config
-rw-r--r-- 1 strings strings 25398 Mar 23 2011 config-ml.in
-rwxr-xr-x 1 strings strings 44505 Jun 6 2011 config.guess
-rwxr-xr-x 1 strings strings 14916 Feb 13 2011 config.rpath
-rwxr-xr-x 1 strings strings 35386 Nov 2 2011 config.sub
-rwxr-xr-x 1 strings strings 468595 Feb 2 15:50 configure
-rw-r--r-- 1 strings strings 102803 Feb 2 15:50 configure.ac
drwxr-xr-x 5 strings strings 4096 Jun 14 14:05 contrib
-rwxr-xr-x 1 strings strings 18615 Aug 22 2009 depcomp
drwxr-xr-x 3 strings strings 4096 Jun 14 14:18 fixincludes
drwxr-xr-x 17 strings strings 20480 Jul 4 21:55 gcc
drwxr-xr-x 14 strings strings 4096 May 6 16:50 gmp
drwxr-xr-x 2 strings strings 4096 Jun 14 14:07 gnattools
drwxr-xr-x 2 strings strings 4096 Jun 14 14:05 include
-rwxr-xr-x 1 strings strings 13663 Aug 22 2009 install-sh
drwxr-xr-x 2 strings strings 4096 Jun 14 14:04 intl
drwxr-xr-x 2 strings strings 4096 Jun 14 14:18 libada
drwxr-xr-x 4 strings strings 4096 Jun 14 14:18 libcpp
drwxr-xr-x 4 strings strings 4096 Jun 14 14:07 libdecnumber
drwxr-xr-x 7 strings strings 4096 Jun 14 14:18 libffi
drwxr-xr-x 4 strings strings 4096 Jun 14 14:07 libgcc
drwxr-xr-x 9 strings strings 4096 Jun 14 14:18 libgfortran
drwxr-xr-x 6 strings strings 4096 Jun 14 14:17 libgo
drwxr-xr-x 4 strings strings 4096 Jun 14 14:32 libgomp
drwxr-xr-x 4 strings strings 4096 Jun 14 14:05 libiberty
drwxr-xr-x 4 strings strings 4096 Jun 14 15:31 libitm
drwxr-xr-x 15 strings strings 4096 Jun 14 14:07 libjava
drwxr-xr-x 3 strings strings 4096 Jun 14 14:04 libmudflap
drwxr-xr-x 4 strings strings 4096 Jun 14 14:17 libobjc
drwxr-xr-x 5 strings strings 4096 Jun 14 15:19 libquadmath
drwxr-xr-x 3 strings strings 4096 Jun 14 14:18 libssp
drwxr-xr-x 11 strings strings 4096 Jun 14 14:04 libstdc++-v3
-rwxr-xr-x 1 strings strings 3370 Sep 20 2007 libtool-ldflags
-rw-r--r-- 1 strings strings 263440 Nov 22 2011 libtool.m4
-rw-r--r-- 1 strings strings 1768 Sep 26 2008 ltgcc.m4
-rw-r--r-- 1 strings strings 249709 Jan 14 2011 ltmain.sh
drwxr-xr-x 2 strings strings 4096 Jun 14 14:05 lto-plugin
-rw-r--r-- 1 strings strings 11950 Dec 5 2009 ltoptions.m4
-rw-r--r-- 1 strings strings 4372 Sep 26 2008 ltsugar.m4
-rw-r--r-- 1 strings strings 703 Dec 5 2009 ltversion.m4
-rw-r--r-- 1 strings strings 6126 Dec 5 2009 lt~obsolete.m4
drwxr-xr-x 2 strings strings 4096 Jun 14 14:07 maintainer-scripts
-rwxr-xr-x 1 strings strings 11419 Aug 22 2009 missing
-rwxr-xr-x 1 strings strings 2179 Jul 22 2000 mkdep
-rwxr-xr-x 1 strings strings 3538 Aug 22 2009 mkinstalldirs
-rwxr-xr-x 1 strings strings 2648 Feb 12 2011 move-if-change
drwxr-xr-x 6 strings strings 4096 Feb 21 2011 mpc
drwxr-xr-x 9 strings strings 4096 Oct 3 2011 mpfr
-rwxr-xr-x 1 strings strings 2265 Jul 14 2005 symlink-tree
-rwxr-xr-x 1 strings strings 6179 Aug 22 2009 ylwrap
drwxr-xr-x 11 strings strings 4096 Jun 14 14:04 zlib
 
Old 07-04-2012, 02:12 PM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Just 1 Question is that how you built gcc pass1??? and Binutils
 
Old 07-04-2012, 02:22 PM   #11
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
yes and they were no errors !!!!!! so did the same :P ......
 
Old 07-04-2012, 02:24 PM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by esornep View Post
The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:
You misunderstood that. It means:

Untar the gcc package in $LFS/sources (as usual), enter the created directory ($LFS/sources/gcc-4.7.1). This is your reference when you start reading the gcc (or any other) chapter. All the commands in a chapter are done from within the package source directory.
Quote:
total 10364
-rw-r--r-- 1 strings strings 38475 Jul 4 2003 ABOUT-NLS
-rw-r--r-- 1 strings strings 18002 Jul 14 2005 COPYING
-rw-r--r-- 1 strings strings 26527 Jul 14 2005 COPYING.LIB
-rw-r--r-- 1 strings strings 3324 Apr 9 2009 COPYING.RUNTIME
Why are all these files and directories owned by strings? You are doing these steps as user lfs and these files and dirs should be owned by lfs.

Last edited by druuna; 07-04-2012 at 02:25 PM. Reason: fixed spelling
 
Old 07-04-2012, 02:29 PM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Thks druuna

esornep

reread chapter 5.3
Code:
Important

To re-emphasize the build process:

    Place all the sources and patches in a directory that will be accessible from the chroot environment such as /mnt/lfs/sources/. Do not put sources in /mnt/lfs/tools/.

    Change to the sources directory.

    For each package:

        Using the tar program, extract the package to be built. In Chapter 5, ensure you are the lfs user when extracting the package.

        Change to the directory created when the package was extracted.

        Follow the book's instructions for building the package.

        Change back to the sources directory.

        Delete the extracted source directory and any <package>-build directories that were created in the build process unless instructed otherwise.
in other words cd gcc-4.7.1 mkdir ../gcc-build which will make a dir in /mnt/lfs/sources/gcc-build

I did notice the same here http://www.linuxquestions.org/questi...ml#post4718088
 
Old 07-04-2012, 02:37 PM   #14
esornep
Member
 
Registered: Jun 2012
Posts: 48

Original Poster
Rep: Reputation: Disabled
okay understood never to be smart ...... but can u help me how can i understand all that is going ....... and strings was the name of the user i gave instead of lfs ......
 
Old 07-04-2012, 02:41 PM   #15
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Ok

I think you need to rebuild because gcc pass1 is wrong that is why you was having all that trouble. Sorry for the ad news.

Thanks druuna for spotting the mistake You cant beat experiance
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] pure 32 bit LFS Version SVN-20110110 trouble installing libX11 in BLFS mcamp73 Linux From Scratch 4 01-22-2011 03:42 AM
[SOLVED] gcc build under lfs livecd grumpy.biatch Linux From Scratch 3 12-25-2010 10:37 PM
LFS 6.4 build gcc error Ron_Beltran Linux From Scratch 4 09-22-2009 11:18 PM
Make error while compiling gcc-4.2.3 (LFS-SVN) corbis_demon Linux From Scratch 14 07-25-2008 10:58 AM
A little disappointed, has anyone built the SVN version of LFS? z3r0.0v3rrid3 Linux From Scratch 5 06-29-2007 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration