Linux From ScratchThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
cc is a symlink as per the instructions in section: "5.5. GCC-3.4.1 - Pass 1", last step:
As a finishing touch, create a symlink. Many programs and scripts run cc instead of gcc, which is used to keep programs generic and therefore usable on all kinds of UNIX systems where the GNU C compiler is not always installed. Running cc leaves the system administrator free to decide which C compiler to install.
ln -s gcc /tools/bin/cc
I had tried it with both gcc and cc. Gcc seems to be able to create the object file correctly if I use gcc -c. It seems as if it's a problem with ld, which shouldn't come as a surprise.
I've now re-built everything from "5.4. Binutils-22.214.171.124.2 - Pass 1" and the same problem occurs.
The step that actually seems to cause the problem is the first step under " 5.9. Adjusting the Toolchain", namely:
make -C ld install (from binutils-build).
This step places a new ld into /tools/bin
I tried the following:
gcc dummy.c, where PATH=/tools/bin:/bin:/usr/bin
Error (same as before):
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/ld: no input files
collect2: ld returned 1 exit status
gcc dummy.c where PATH=/bin:/usr/bin
This worked and produced the correct readelf output.
So, from this, it would seem that my gcc/ld binaries are somehow f'ed up. I have never received any build errors either of the two times I've built and installled binutils or gcc. What am I doing wrong here?
You didn't print the output from echo $PATH, the first gcc on your path wil be called and that is the gcc which won't have an edited spec file. Are you automating the process in some way and did you source ~/.bash_profile ?
did you inspect the 'spec' file to ensure all the changes are okay?
i might have the same problem before (not sure if it's the same...), but it's just because i passed the wrong 'LIB_PATH' when I built 'ld'...