LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   gcc ld cannon find -lc (https://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-ld-cannon-find-lc-852661/)

computerfreak97 12-27-2010 03:12 PM

gcc ld cannon find -lc
 
Well, I got all the way to ch 5.7 in the version 6.3 book without any errors, and now I am getting the error:
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lc. THis happens when i try to run gcc dummy.c.

druuna 12-27-2010 03:25 PM

Hi,

Shouldn't that be: cc dummy.c?

From the 6.3 book:
Quote:

echo 'main(){}' > dummy.c
cc dummy.c
readelf -l a.out | grep ': /tools'
gcc dummy.c should only be tried if the cc command fails (as described in the Caution part).

Hope this helps.

computerfreak97 12-27-2010 03:26 PM

it is, i tried both.

druuna 12-27-2010 03:37 PM

Hi,

How about the other tips given in the Caution box? Tried any of those?

Are you 100% sure all the commands where copy/pasted (typed???) correctly and none where forgotten?

Please give more information, its a bit hard to guess what you have tried already.

computerfreak97 12-27-2010 03:43 PM

everything appears to be right, except that path is /tools/bin:/bin/usr/bin, as it says to set it to in ch 4.4.

computerfreak97 12-27-2010 03:44 PM

i cant copy and paste the commands, but i double checked, and they were typed right

druuna 12-27-2010 03:57 PM

Hi,
Quote:

Originally Posted by computerfreak97 (Post 4204725)
everything appears to be right, except that path is /tools/bin:/bin/usr/bin, as it says to set it to in ch 4.4.

The PATH is incorrect and not as shown in chapter 4.4. It should be: /tools/bin:/bin:/usr/bin

computerfreak97 12-27-2010 03:57 PM

srry, mistype on my end, thats what it is

druuna 12-27-2010 03:59 PM

Hi,
Quote:

Originally Posted by computerfreak97 (Post 4204726)
i cant copy and paste the commands, but i double checked, and they were typed right

That's a bummer. Triple check the commands in chapter 5.7, a typo is made very easy (as acknowledged by the LFS team in that same chapter).


All times are GMT -5. The time now is 11:39 PM.