LinuxQuestions.org
Help answer threads with 0 replies.
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-10-2010, 03:51 PM   #1
graphit
LQ Newbie
 
Registered: Apr 2010
Distribution: Arch, Gentoo
Posts: 6

Rep: Reputation: 0
in chroot compiled programs do not work in chroot


Hallo,
I just ran into a problem after installing glibc in chapter 6.9 (LFS6.6 x86_64).
All the programs, compiled so far after chrooting (really only the compiled ones) refuse to run, each printing the output
Code:
root:/# localedef
bash: /usr/bin/localedef: No such file or directory
(localedef as an example)

It is definitly there:
Code:
root:/# ls -l /usr/bin
total 2080
-rwxr-xr-x 1 root root    3388 Apr 10 08:14 catchsegv
-rwxr-xr-x 1 root root   74108 Apr 10 08:14 gencat
-rwxr-xr-x 1 root root   46989 Apr 10 08:14 getconf
-rwxr-xr-x 1 root root   68605 Apr 10 08:14 getent
-rwxr-xr-x 1 root root  213291 Apr 10 08:14 iconv
-rwxr-xr-x 1 root root    5659 Apr 10 08:14 ldd
-rwxr-xr-x 1 root root  110451 Apr 10 08:14 locale
-rwxr-xr-x 1 root root 1240773 Apr 10 08:14 localedef
-rwxr-xr-x 1 root root    6473 Apr 10 08:14 mtrace
-rwxr-xr-x 1 root root   26247 Apr 10 08:14 pcprofiledump
lrwxrwxrwx 1 root root      15 Apr  6 15:28 perl -> /tools/bin/perl
-rwxr-xr-x 1 root root  222827 Apr 10 08:14 rpcgen
-rwxr-xr-x 1 root root   71398 Apr 10 08:14 sprof
-rwxr-xr-x 1 root root    7131 Apr 10 08:14 tzselect
-rwxr-xr-x 1 root root    5320 Apr 10 08:14 xtrace
The complete amount of toolchain-programs is doing their jobs quite well (also in chroot), so I do not think I completely failed in compiling gcc in chapter 5.10, as they seem to be host independent.
In addition to this the compilation of glibc worked without any problems (except the posix/annexc test)

When used from the host-distribution they run quite well:
Code:
$ /media/LFS/usr/bin/localedef 
»localedef --help« oder »localedef --usage« gibt weitere Informationen.
I do not know how to get around this, although I am quite sure the problem is the dynamic linker.

I am looking forward to your answers!
Thanks for all replies!
 
Old 04-10-2010, 05:20 PM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi,

did you make sure that in your chroot environment you have a symlink lib64 -> lib? Also post the output of
Code:
ldd $LFS/usr/bin/localedef
readelf -a $LFS/usr/bin/localedef | grep interpreter
You can also execute the above commands in your chroot environment but then you will have to ommit the $LFS variable.
 
Old 04-11-2010, 03:04 AM   #3
graphit
LQ Newbie
 
Registered: Apr 2010
Distribution: Arch, Gentoo
Posts: 6

Original Poster
Rep: Reputation: 0
OK, the problem was much simpler than I thought:
The dynamic linker was not in place.

The reason for this:
I am using the DESTDIR method for installing programs, and when copying the files from $FAKEROOT to / I lost all the /lib64 and /usr/lib64 files because of this:
Code:
root:/# cp -r /usr/pkglog/fakeroot/lib64 /
cp: cannot overwrite non-directory `/lib64' with directory `/usr/pkglog/fakeroot/lib64'
Thank you very much, all is working now!
 
  


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
programs compiled in chroot hang system bobwall Linux - Software 2 01-13-2008 09:44 PM
chroot to run hd-installed distro's programs from chroot in live distro? silencestone Linux - Software 0 10-12-2007 06:29 AM
chroot doesn't work (with anything) sydney-troz Linux - Software 6 03-07-2007 07:43 AM
chroot won't work oudoubah Linux - Software 3 01-12-2007 11:24 AM
Running graphical programs from chroot 1veedo Linux - Software 4 07-27-2006 08:16 PM


All times are GMT -5. The time now is 04:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration