LinuxQuestions.org
Register a domain and help support LQ
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 09-20-2005, 10:58 AM   #1
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Rep: Reputation: 0
Binutils-2.15.94.0.2.2 - Pass 1 stuck up after make install


Hi,

I am trying to build LFS 6.1 from the book. I have downloaded all the packages and patches
in /mnt/lfs/sources. I have unpacked the files as user lfs after setting up according to instructions.

After unpacking I enter the Binutils directory in /mnt/lfs/sources and issue these command:
Quote:
mkdir ../binutils-build
cd ../binutils-build
../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
make
make install
After installation when I give this command:
Quote:
make -C ld clean
make -C ld LIB_PATH=/tools/lib
I get an error "ld no such directory".

Please tell me whether I am making any mistake.

My host system is Ubuntu 5.04 kernel for i686. The machine is HP/COMPAQ Presario 2500 series Laptop.

Please help me.

kagashe
 
Old 09-20-2005, 12:00 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Re: Binutils-2.15.94.0.2.2 - Pass 1 stuck up after make install

Quote:
Originally posted by kagashe
I get an error "ld no such directory".
This suggests that make did not go well. Did it end with an error? If not, why was the ld folder not created?
 
Old 09-20-2005, 08:14 PM   #3
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Original Poster
Rep: Reputation: 0
Re: Re: Binutils-2.15.94.0.2.2 - Pass 1 stuck up after make install

Quote:
Originally posted by Andrew Benton
This suggests that make did not go well. Did it end with an error? If not, why was the ld folder not created?
Please tell me how to find the error. If Binutils is the first package to be installed why there should be an error? Is it depending upon what else is available on the host system? I don't understand what is meant by fourth line from top on Binutils page in the book:
Quote:
Installation depends on: Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext, Glibc, Grep, M4, Make, Perl, Sed, and Texinfo
How does it depend upon the packages not yet installed?

kagashe
 
Old 09-21-2005, 01:29 AM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
You need to install those things on your host system (using apt-get). When I built from Ubuntu I think I had to install gcc, flex and bison. To sort out the error, read the output on the screen after you've run `make'. If it says `error' that's bad, you need to scroll back to the start of the error and look for clues (Google on the keywords)
 
Old 09-21-2005, 05:32 AM   #5
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Andrew Benton
You need to install those things on your host system (using apt-get). When I built from Ubuntu I think I had to install gcc, flex and bison. To sort out the error, read the output on the screen after you've run `make'. If it says `error' that's bad, you need to scroll back to the start of the error and look for clues (Google on the keywords)
Thanks. I can install these packages on Host through Synaptic. I have a question regarding gcc version to be used. I had gcc 4 when I tried Binutils. In some post on this forum I have read that gcc 4 should not be used so I removed it. I also have gcc 3.3 and so I tried once again. This time the Binutils could not find gcc on the host (may be due to removal of gcc 4).
Quote:
lfs@mybox:/mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
lfs@mybox:/mnt/lfs/sources/binutils-build$
I would like to know how the packages being compiled find the path to the utilities on the host system and how to ensure this and what is "cc" and how to give its path.

kagashe

Last edited by kagashe; 09-21-2005 at 07:01 AM.
 
Old 09-21-2005, 07:02 AM   #6
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Things like gcc should be in the $PATH of an ordinary user like the user lfs. If gcc-3.3 is available but you're getting an error saying Binutils could not find gcc it's possible you may need to make a symbloic link called gcc pointing at gcc-3.3
Code:
sudo ln -s gcc-3.3 /usr/bin/gcc
 
Old 09-22-2005, 11:21 PM   #7
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Andrew Benton
Things like gcc should be in the $PATH of an ordinary user like the user lfs. If gcc-3.3 is available but you're getting an error saying Binutils could not find gcc it's possible you may need to make a symbloic link called gcc pointing at gcc-3.3
Code:
sudo ln -s gcc-3.3 /usr/bin/gcc
Thank you very much. I could proceed after installing flex, bison and provide the symbolic link to GCC as suggested by you. I have almost finished Chapter 5 (upto Util-linux) without any problem. I tested GCC pass 2 (it takes so much time) and the results were matching with LFS site. I will keep posting my progress in this thread and request you to see it for one or two days (I hope to finish LFS by this time).

kagashe
 
Old 09-24-2005, 01:33 AM   #8
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by kagashe
Thank you very much. I could proceed after installing flex, bison and provide the symbolic link to GCC as suggested by you. I have almost finished Chapter 5 (upto Util-linux) without any problem. I tested GCC pass 2 (it takes so much time) and the results were matching with LFS site. I will keep posting my progress in this thread and request you to see it for one or two days (I hope to finish LFS by this time).

kagashe
I completed Chapter 5 and initial steps in Chapter 6, installed Glibc, readjusted the toolchain, installed Binutils. When I completed makefile in GCC it was late night and since GCC testing was going to take a few hours I closed for the day and shutdown the computer.

Today I entered the Chroot environment after mounting proc and sys and issued make -k check command in GCCbuild file.
I found all tests failing. Then I deleted GCCbuild directory, made a new directory and makefile but again same result for make -k check command.

Then I started reading Chapter 6 once again and found that I should also mount tmpfs after entering Chroot environment. I did this and again issued make -k check command in GCCbuild directory. There are no errors now and gcc tests have begun. I hope there won't be any problem now and I can proceed with the remaining packages of Chapter 6.

I have one question at this stage. I find that testing in Chroot environment is slow compared to testing GCC in Chapter 5.
I have swap partition on host system. My question is:
Quote:
Is the Linux system in Chroot environment using the swap on the host? If not how to enable it? Can two systems share one swap? (I hope so).
kagashe
 
Old 09-28-2005, 07:26 AM   #9
kagashe
LQ Newbie
 
Registered: Sep 2005
Distribution: Ubuntu 7.10
Posts: 16

Original Poster
Rep: Reputation: 0
Installed LFS successfully.

Hi,

Today I have finished the installation of LFS. After adding the LFS entry in /boot/grub/menu.lst file in the host system I could boot the newly installed LFS system. I faced following problems during compiling the LFS system.
1. LFS book does not indicate clearly what is required on the host system (except the Kernel and GCC version used). After posting on this forum I came to know that BISON and FLEX are also required on the host system in addition to GCC (which I knew).
2. When you are building the packages in Chapter 6 after entering the Chroot environment you are required to shutdown the machine once or twice since the process takes so much time. The book says that if you reboot you have to mount proc and sysfs before entering the Chroot. This is OK. But before you restart the compilation you are also required to mount tmpfs and all associated nodes, and mount devpts etc.

Rest is fine if you follow the book.

kagashe
 
Old 10-09-2005, 11:42 AM   #10
jeffholman
LQ Newbie
 
Registered: Jun 2005
Posts: 7

Rep: Reputation: 0
thanks kagashe

kagashe,

Thanks for the heads up. I'm using ubuntu breezy preview and also found i needed to install flex and bison before starting. You're posts definitely helped. I also needed a gcc compiler, but when I installed the build-essential package with apt-get as was recommended, it gave me the 4.0 version, which did not work. I'm pretty much a noob, so it was a little messy getting rid of gcc-4.0, but I eventually found my problem was a broken symlink. To sum it up, if using ubuntu (and probably debian), make sure you do the following before starting the whole project:

apt-get install bison flex gcc-3.4

Things should work for you, but you may or may not have to put a symlink in /usr/bin pointing to gcc-3.4.

jeffholman
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Binutils Pass 1 error make LDFLAGS="-all-static" Phyrexicaid Linux From Scratch 5 08-25-2005 10:43 AM
5.12. Binutils-2.15.94.0.2.2 - Pass 2 - erron on "make" satimis Linux From Scratch 4 08-02-2005 05:26 PM
make: *** [configure-libiberty] Error 1 in 5.4. Binutils-2.15.91.0.2 - Pass 1 Flash_G Linux From Scratch 3 06-30-2005 08:51 PM
Chap 5 Binutils make LDFLAGS & make install errors shotokan Linux From Scratch 5 04-10-2005 03:01 AM
binutils first pass make install failure in LFS-6.0 dibyadeep Linux From Scratch 3 01-05-2005 03:34 PM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration