LinuxQuestions.org
Review your favorite Linux distribution.
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 01-29-2007, 11:50 PM   #1
MrMark
LQ Newbie
 
Registered: Jan 2007
Posts: 9

Rep: Reputation: 0
MKDIR trying to use version 2.4 of libc, not 2.3.6 and causing step 6.5 to fail


G'day this is my first attempt in buliding a linux system from scratch. I'm using Gentoo as my host distro, and I'm up to step 6.5 creating directories:

Quote:
6.5. Creating Directories
It is time to create some structure in the LFS file system. Create a standard directory tree by issuing the following commands:

mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir -v /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
for dir in /usr /usr/local; do
ln -sv share/{man,doc,info} $dir
done
mkdir -v /var/{lock,log,mail,run,spool}
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}

When i copy and paste the first mkdir into my bash terminal i get the following error:

MKDIR /tools/lib/libc.so.6 Version 2.4 not found (requried by MKDIR)


So figuring it was something screwy with libc I recomplied it and got errors when I did a make check (see below). These errors may not be important as the books says you really don't need to run checks until
chapter 6, and libc is complied back in chapter 5.

What I think might be happening is that MKDIR was linked against version 2.4 of libc, not version 2.3.6. But with the compliation processing being automated by make, im not sure how it could make that mistake. So...yeah, thats just a guess, I've got no idea how to check/fix that if thats the problem.

Here's the make check errors for libc when i complie it back in chapter 5 section 6 (the book says u don't need to worry about doing a make check in chapter 5, but I figured well something is going wrong somewhere )

make[2] [/mnt/lfs/sources/glibc-build/stdio-common/tstdiomisc.out error 1

make[2] leaving directory /mnt/lfs/sources/glibc-build/stdio-common/

make[1] **** [ stdio-common/test] error 2

make [1] leaving directory '/mnt/lfs/sources/glibc-2.3.6'


ps I can't copy and paste from my linux system, so that was written out by hand, 99.999999 percent sure there's no typos.


So...any ideas ?

TIA
 
Old 01-30-2007, 07:32 PM   #2
Angeliqe
LQ Newbie
 
Registered: Jan 2007
Posts: 22

Rep: Reputation: 15
What version is on the host? If you have 2.4 on the host, that's a pretty good indication that all your compiling was done against host libraries. Might have to start over if that's the case. You may have forgotten a step when you updated the linker.

Try this, exit from the chroot environment.
exit

As root, change the ownership of tools and sources (if you made a source directory) back to lfs.
chown -R lfs.lfs $LFS/{tools,sources}

Log into lfs again to restore your previous environment
su - lfs

Then, run some tests:

cd $LFS/sources
mkdir tests
cd tests
echo 'int main(){return 0;}' > dummy.c
cc dummy.c -Wl,--verbose &> dummy.log
readelf -l a.out | grep 'interpreter'

# This should return something similar to this depending on the linker name for your system. It MUST be in /tools, not /lib
[Requesting program interpreter: /tools/lib/ld-linux.so.2]

grep 'SEARCH' dummy.log |sed 's|; |\n|g'
# Should return something like this. Might have /usr/lib or /lib, but this is only ok if they are last on the list
# SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
# SEARCH_DIR("/tools/lib")

grep -o '.*/crt[1in].* .*' dummy.log
# Should return
# /tools/lib/crti.o succeeded
# /tools/lib/crtn.o succeeded

grep "/tools/lib/libc.so.6 " dummy.log
# Should return
# attempt to open /tools/lib/libc.so.6 succeeded

grep found dummy.log
# Should return
# found ld-linux.so.2 at /tools/lib/ld-linux.so.2

Many problems compiling and installing LFS are from skipped steps or improper linking. I've done it countless times. It would shock me if anyone got through the first time without a problem unless they were using some automated script like jlfs.
 
  


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
How to find the version of libc and glibc Gins Linux - General 7 05-16-2006 04:22 PM
mkdir fail -> block problem? pixelcat Linux - General 3 01-19-2006 11:56 AM
Module conflict causing network services to fail rollo Linux - Newbie 3 11-01-2005 12:19 PM
libc version??? slack66 Slackware 3 07-07-2004 04:01 AM
I need to upgrade to a recent Squid version, I need a Step by step procedure mfeoli Linux - Newbie 4 01-14-2004 10:14 AM

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

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