LinuxQuestions.org
Help answer threads with 0 replies.
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 04-13-2013, 08:01 PM   #1
Spruce_Moose
LQ Newbie
 
Registered: Mar 2013
Location: Australia
Distribution: Slackware
Posts: 9

Rep: Reputation: Disabled
LFS 7.3 GMP libraries


G'day all,

I am trying to complile the coreutils in chap 5.17 and have encountered 2 errors so far relating to GMP.

In the fist instance gmp.h was missing, so I copied one from the host system /tools/include directory and this fixed the problem. But now when I try to compile I get the following error:

Code:
help2man: can't get '--help' info from man/expr.td/expr
So I run
Code:
./man/expr.td/expr --help
myself and get an error that it is unable to load shared library libgmp.so.10.

I did a search in /tools/ for anything GMP related and found nothing. I am guessing that nothing for GMP has installed. However in the previous 2 passes of the GCC build, we had to extract and rename the gmp tarball directory and place in the gcc-4.7.2 directory before building GCC. Should this have given the appropriate GMP libraries? The instructions don't say to build the GMP source on it's own until chapter six. I'm not really sure how to proceed now.

Any help would be greatly appreciated.

Thank you

Tyson
 
Old 04-13-2013, 08:23 PM   #2
Spruce_Moose
LQ Newbie
 
Registered: Mar 2013
Location: Australia
Distribution: Slackware
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi again,

Upon reflection I came to the conclusion that maybe the GMP libraries were not supposed to install with the GCC builds, but were just placed in the directory as referrence for the actual build process. Is this correct?

Had another read of ./configure --help and found a --without-gmp option. Added this to my ./configure and compiled and it now compiles fine! Hope this information is useful to anybody in my position.
 
Old 04-14-2013, 03:09 AM   #3
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

gmp is included in the gcc build you dont have to change anything
 
Old 04-14-2013, 04:59 AM   #4
Spruce_Moose
LQ Newbie
 
Registered: Mar 2013
Location: Australia
Distribution: Slackware
Posts: 9

Original Poster
Rep: Reputation: Disabled
Are you saying that after pass 2 of the GCC build in chapter 5, I should have the gmp libraries in /tools/lib ?
 
Old 04-14-2013, 05:09 AM   #5
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

well I have never had to deviate from the book and not had any errors
Did you untar gcc cd into gcc-dir then run 1st command about
untaring mpc mprf gmp etc that part would of satisfied the gcc error
 
Old 04-14-2013, 07:08 AM   #6
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by Spruce_Moose

Had another read of ./configure --help and found a --without-gmp option. Added this to my ./configure and compiled and it now compiles fine! Hope this information is useful to anybody in my position.
That was a bad idea, IMO. I didn't have to do that.

Last edited by stoat; 04-14-2013 at 07:52 AM.
 
Old 04-14-2013, 08:37 AM   #7
Spruce_Moose
LQ Newbie
 
Registered: Mar 2013
Location: Australia
Distribution: Slackware
Posts: 9

Original Poster
Rep: Reputation: Disabled
Had a chat with some people on #lfs-support channel today and was advised that coreutils normally builds without gmp libraries for an lfs build in chapter 5. There should be no trace of gmp after the gcc-build I was told. For some reason, probably because I didn't delete the gcc-build directoy after compiling, the coreutils configure file thinks I have gmp installed. This was confirmed in a log file. So compiling with --without-gmp would build coreutils as it should at this point.

I have gone back anyway and am rebuilding everything from the start and will this time delete each build directory after each build and see if this makes a difference. I'll let you know how it goes.

And yes spiky, I did that as the book said. The only thing I have done different from the book, as far as I can tell, was not deleting each build directory as I progressed.
 
Old 04-18-2013, 07:02 AM   #8
Spruce_Moose
LQ Newbie
 
Registered: Mar 2013
Location: Australia
Distribution: Slackware
Posts: 9

Original Poster
Rep: Reputation: Disabled
Hi all,

Rebuilt and compiled from the start, this time deleting all directories as I went, and coreutils built no problems this time.

Line 493 of configure script for the original unsucessful build:
Code:
checking for library containing __gmpz_init... -lgmp
Line 493 of configure script for the sucessful build:
Code:
checking for library containing __gmpz_init... no
Seems to indicate what I said above.

Thanks for the help input everyone.

Hope this helps anyone silly enough not to follow the book correctly.
 
  


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] LFS-7.2: mpfr-3.1.1, error: gmp.h can't be found, or is unusable. McZ Linux From Scratch 0 01-11-2013 12:44 PM
GMP and c headers and libraries themanwhowas Programming 1 08-24-2012 11:20 PM
LFS 6.6 on Ubuntu 10.04 / 6.13 GMP-5.0.0 make error SmokingSquirrel Linux From Scratch 3 06-12-2010 02:45 AM
6.13 GMP-5.0.0 LFS make error SmokingSquirrel Linux - General 5 06-11-2010 12:34 PM

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

All times are GMT -5. The time now is 09:26 PM.

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