LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-25-2006, 01:09 PM   #1
R3D
LQ Newbie
 
Registered: Apr 2006
Location: Belgium, Antwerp City
Distribution: Slackware 10.2
Posts: 6

Rep: Reputation: 0
cc dummy.c = warning ld-linux.so.2 not found


Hi, I'm having a problem that i can't seem to fix,

Applies to: Chapter 5.7. Adjusting the Toolchain (LFS v6.1.1 Book), using disc-version lfslivecd-x86-6.1.1-3

When I run next to check the toolchain;

Code:
echo 'main(){}' > dummy.c
cc dummy.c
Then I get next warning;

Code:
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld:
        ld-linux.so.2, 
        needed by /tools/lib/libc.so.6, 
        not found (try using -rpath or -rpath-link)
I have the file at /mnt/lfs/tools/lib/ld-linux.so.2", checked vars/paths/files but can't find what I'm doing wrong, did re-install everything from start a couple of times and I keep getting stuck at this stage.

additional info;
Code:
ld --verbose | grep SEARCH
gave next result:
Code:
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib");SEARCH_DIR("/usr/lib");
Does have anyone a few suggestions what could be the cause of my problem and where I start to look at?

Thanks at front,
R.
 
Old 04-28-2006, 05:13 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
did you tweak your specfile as instructed??
Code:
SPECFILE=`gcc --print-file specs` &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
    $SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE
if you execute this command:
Code:
cat `gcc --print-file specs` | grep ld-linux.so.2
your output should look like this:
Code:
%{!static:--eh-frame-hdr} -m elf_i386 %{shared:-shared}   %{!shared:     %{!ibcs:       %{!static:      %{rdynamic:-export-dynamic}     %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}}    %{static:-static}}}
 
Old 04-29-2006, 08:54 AM   #3
R3D
LQ Newbie
 
Registered: Apr 2006
Location: Belgium, Antwerp City
Distribution: Slackware 10.2
Posts: 6

Original Poster
Rep: Reputation: 0
Hi, yes, my output didn't look same as you have illustrated, I did run the specfile command ones again like you instructed and seems it working fine now.
I will make a fresh install tomorrow and see where I went wrong before.
Thanks.

I got an aditional question I wish to ask, I just advanched now upto the part of "III. Building the LFS System", as instructed here I'm told to continue under root user from now onwards, tough I'm not able to make the su switch to root, it asks for a password, i tried "root", "x", "0" and even the lfs user password that I entered at beginning, none of these allows me to become root user again.
Do I need a reboot here first in order to gain root status back again or can I make the switch somehow rightaway?
 
Old 04-29-2006, 05:34 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
it's the root account for your regular non-LFS system... you should be able to su to root as you usually do, with your usual password... no reboot or anything like that is needed...
 
Old 04-30-2006, 02:38 AM   #5
R3D
LQ Newbie
 
Registered: Apr 2006
Location: Belgium, Antwerp City
Distribution: Slackware 10.2
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry win32sux, I forgot to mention I'm not building LFS from a existing host system, I'm using the LFS-livecd itself as host system, the book told this was an option to. This is why I don't know the root password yet, I need to make the su switch (chap-6.1) before the group/passwd files are created in a later stage (chapt-6.7)
This confuses me a bit to, becuase in chapt-6.7 it's been told you can't login as root until these files are setup.

Last edited by R3D; 04-30-2006 at 02:50 AM.
 
Old 05-04-2006, 12:35 PM   #6
R3D
LQ Newbie
 
Registered: Apr 2006
Location: Belgium, Antwerp City
Distribution: Slackware 10.2
Posts: 6

Original Poster
Rep: Reputation: 0
Problem solved, I was under the impression that there was a root password by default, until I booted the Livecd again and did enter 'passwd' as the very first thing to do...
 
Old 06-03-2006, 10:28 AM   #7
abhinavrakesh
LQ Newbie
 
Registered: May 2006
Posts: 2

Rep: Reputation: 0
a

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
  


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
more than one dummy interfaces? kpachopoulos Linux - Networking 3 03-03-2006 06:27 AM
kcontrol: WARNING: No K menu group with X-KDE-BaseGroup=settings found ! hellodio Linux - Software 1 11-25-2005 04:31 PM
Dummy bong.mau Programming 10 09-01-2005 12:29 PM
Security Warning: World Writable files found foxxer Linux - Security 7 06-04-2005 11:03 AM
Who can help this dummy install linux and a mail server artful Linux - Software 4 09-30-2004 11:59 AM

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

All times are GMT -5. The time now is 05:44 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