LFS 7.1, Chapter 5.4.1 fatal error: cannot find 'ld'
Hello everyone,
I've been cruising through LFS 7.1, when I ran into an issue with installing binutils-2.22. EDIT* The host system is Fedora 17, 32 bit. First, I did this: Code:
lfs:/mnt/lfs/sources/binutils-build$ ../binutils-2.22/configure \ Code:
checking build system type... i686-pc-linux-gnu The output of the version_check.sh is: Code:
root:/usr/bin# bash version-check.sh Thank you |
I've never used Fedora to build LFS, but it looks like you also need to install the following to make your host compliant:
- gcc-devel - compat-libstdc++ - compat-libstdc++-devel I'm not 100% sure about the last 2. BTW: There's no point in starting with the LFS build until you solved the host system requirements. |
Thank you for the reply. I do agree that there is no point trying to proceed with the install before resolving this issue. This is my second time to attempt the installation, the first I had installed several more packages, and when running the version_check.sh, I did not have this error. I have since nuked the first install (it was the 64-bit version), and, on the recommendation of the book, installed the 32-bit version of F17. I forgot to check this again until I reached the current point in chapter 5.
By the way, from what I see in the script's output, it only appears as though there is one error; all the other checks seems to pass/indicate a suitable version. Do you agree? Also, what lead you to the conclusion that I was missing the gcc-devel package? Was there some output in the version check script that would lead me to the same conclusion? Thanks again. BTW, I'm at work now, but I'm going to experiment some more when I get home, and try adding the packages you mentioned. |
Quote:
Code:
echo 'main(){}' > dummy.c && gcc -o dummy dummy.c Quote:
|
Okay, so I've been tooling around with this for an hour or so.
I installed the gcc-plugin-devel package (which had the following dependencies: gmp-devel, libmpc-devel, mpfr-devel) and tried building again, and that did not work. The configure script generated the same result as above. In looking through the config.log file, since we used the '=--prefix=/tools' argument, the configure script is using the tools directory as the prefix to several pathnames in the configure script. However, my tools directory is empty. Is this correct? Any other thoughts? |
Also, just for grins, I su'd into my other user and wrote a quick C++ program (similar to the test above) and tried to compile it using gcc, and received the same output. I tried this in a different directory (my other user's home directory).
|
I just had a look at a Fedora 17 system and the following needs to be installed, including their dependencies, to be LFS (7.2) compliant:
- bison - patch - texinfo - binutils - perl - gcc The other package I mentioned earlier aren't needed (or are part of the dependencies). |
Quote:
Will advise after I've done that. |
I know that these:
gcc-c++ glib2-devel are needed for Fedora, I'm not sure this is the correct package for gcc "gcc-plugin-devel" fromthe title looks like an extra bit. |
Well, I installed both of the packages mentioned by Keith Hedger, namely gcc-c++ and glib2-devel, but still receive the same error. When I started my LFS build the first time, the only difference I can think of is that it was the install DVD (64bit), rather than the live CD version of the install (32bit) that I am using now. Note however, that I installed the full OS with the CD, and am not using the Live CD environment to build LFS.
Under the 64bit install, the version_check.sh script did not return this error; there must be some additional packages that the DVD installs that I'm not aware of that were missed in the 32bit install, thus the error. Can anyone recommend a distro that may work better for a LFS 7.1 base system than Fedora? What distros have you used as a base OS for successfully installing LFS? On a side note, I noticed that when I change to the lfs user, I get the following error: Quote:
|
Quote:
Quote:
Strangely I never tried using a RedHat based distro.... Might be a good idea I try one of these days. Quote:
|
Facepalm. Thanks for catching that, no telling how long it might have taken me to track that down.
In regards to the question on the version check script, I at first took it for granted, since it said GCC was installed, but was concerned also about the error at the end: Quote:
I haven't had a chance to do much since yesterday, but I'll fix my oversight in the .bashrc file and see if anything else changes. About 8 years ago, I experimented around with Debian-based distros (Ubuntu, Debian, etc.) and then wanted to try out RHEL-based distros, so I picked up Fedora 12 and CentOS, and haven't looked back since. For whatever reason, I prefer those over Debian distros. I'm at the point now where I'm more or less set in my ways, and would prefer to just stick with one set of commands/interface style. |
Just to clarify something: I have used RedHat based distro's (mostly work related) but I never used them as host to build LFS.
Must be possible, I'll give it a try if I have some time to spare. |
Quote:
Second bit, I would STRONGLY recommend slackware for the simple reason that it doesn't split dev files form the normal install as it's a source based distro, when you install a library or other app ALL the dev stuff gets installed as well ( include files, .pc files etc ), the distro is also pretty grown up and doesn't hold your hand when it comes to installing, for instance you have to sort out your own dependencies, so you know what has been installed. |
I had some time to install fedora
Used : Fedora-17-i686-Live-Desktop.iso (in VM) Install to HD : Defaults / No Changes made After install finishes: Code:
$ uname -a - binutils -> ld not found - bison not found - yacc not found - gcc not found - patch not found - perl not found - makeinfo not found - gcc not found (gcc compilation failed) Add packages: Code:
yum install bison gcc patch perl texinfo Code:
Installing: Code:
ln -s /bin/bison /usr/bin/yacc Second version-check.sh run: no issues I'm assuming for now that if echo 'main(){}' > dummy.c && gcc -o dummy dummy.c from the version check script works, then you should also be able to compile during the LFS build. If not then a mistake during the LFS build might be the problem. |
Thanks for the help, everyone. I reinstalled F17 32 bit from the live CD, and installed the additional requisite packages as detailed above. After running version check, everything passed.
I just finished building and compiling binutils-2.22 Pass 1 per Chapter 5.4, and everything worked fine. FWIW, I don't think the packages I had installed were the problem. The symlink I had created previously was incorrect, so I fixed that, and also the "eport" typing blunder I had when configuring the lfs user may have caused some issues. I say this because I had installed all the same packages previously, but with different results. Thread marked as solved; maybe this can help someone else in the future. I'm sure I'll be back with more questions before this is all said and done! :) |
All times are GMT -5. The time now is 07:35 AM. |