LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   v9.0 Seem to have issue with directory/path in chroot Chapter 6 (https://www.linuxquestions.org/questions/linux-from-scratch-13/v9-0-seem-to-have-issue-with-directory-path-in-chroot-chapter-6-a-4175662226/)

GeekBoy 10-08-2019 02:08 PM

v9.0 Seem to have issue with directory/path in chroot Chapter 6
 
So I completed version 8.4, and did not have this issue.

Comparing the two, I am not even seeing much difference between what I did.

Anyway the issue was spotted in Chapter 6.7. Linux-5.2.8 API Headers

Quote:

(lfs chroot) root:/sources# tar xf linux-5.2.8.tar.xz
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Doing "ls -l lin*" returns:
Quote:

-rw-r--r-- 1 root root 107064028 Aug 9 16:02 linux-5.2.8.tar.xz
So I try the next package

Quote:

(lfs chroot) root:/sources# tar xf man-pages-5.02.tar.xz
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Any ideas on this ?

Thanks!

Krejzi 10-08-2019 02:18 PM

Does /tools/bin/xz exist? Have you ran make install when you compiled xz at the end of chap. 5?

GeekBoy 10-08-2019 02:26 PM

Yes, you are correct, I missed that.

Thanks a bunch for the help!

GeekBoy 10-08-2019 02:55 PM

It is there now, but I am getting the same result


Quote:

(lfs chroot) root:/sources# ls -l /tools/bin/xz*
-rwxr-xr-x 1 root root 263816 Oct 8 19:43 /tools/bin/xz
Quote:

(lfs chroot) root:/sources# tar xf linux-5.2.8.tar.xz
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
I think I will just start all over.

Krejzi 10-08-2019 03:04 PM

Check "ldd /tools/bin/xz" output from outside the chroot. If it doesn't show /tools/lib/ld-linux*, it's possible that you've already adjusted the toolchain, or you didn't build and install xz with LFS user environment.

GeekBoy 10-08-2019 03:09 PM

This is the response it gave:

Quote:

linux-vdso.so.1 (0x00007fff6669e000)
liblzma.so.5 => /tools/lib/liblzma.so.5 (0x00007fe10969f000)
libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007fe109cdc000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007fe109b1e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe109adc000)

Krejzi 10-08-2019 03:16 PM

The problem is that it shows "/lib64/ld-linux-x86-64.so.2" instead of "/tools/lib64/ld-linux-x86-64.so.2" which means either

1) Temp. toolchain wasn't adjusted correctly (source dirs were kept between gcc pass1 and gcc pass2
2) You did not build it as LFS user or your LFS user didn't have the correct environment set up to use /tools/bin/gcc and friends.

I suspect 2), since "tar" seems fine.

GeekBoy 10-08-2019 03:21 PM

Okay, thanks! I will just over on this.


All times are GMT -5. The time now is 05:32 PM.