LFS 6.5 : Step 6.7 Installing Linux API headers : make headers_check/install error
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LFS 6.5 : Step 6.7 Installing Linux API headers : make headers_check/install error
Hey everyone! This is my first LFS.
I built the system up to Chapter 6.7 now where I chrooted and created all the essential files and symlinks. And now I'm got problem starting to install the packages again.
The start of chap 6.7, I entered "make mrproper" and nothing happens, in which I assume its normal, but I when I entered "make headers_check" some error showed up indicating it "Can't locate strict.pm in @INC (@INC contains : .... )" where ... is probably the location of strict.pm. I've done getting in to those location and I found strict.pm. So, what did I do wrong? I think it is about where I extracted the tar to (which is the root) but I'm not positive. Can anyone help?? Thanks in advance.
Did you unpack the kernel package (/$LFS/sources/linux-2.6.30.2.tar.bz2), enter the created directory ($LFS/sources/linux-2.6.30.2/) and then enter the commands metioned in chapter 6.7?
My error appear to be the same with this guy though:
Quote:
Originally Posted by Stachelsk
Hi, I just chroot-ed into my root account and I was setting things up according to the LFS document. I went to compile the Linux API headers (as before), and figured all would go well, as it did before. However, I got a nasty little error message.
Code:
root:/sources/linux-2.6.27# make headers_check
CHK include/linux/version.h
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/unifdef
INSTALL include/asm-generic (12 files)
Can't locate strict.pm in @INC (@INC contains: /tools/lib/perl5/5.8./i686-linux
/tools/lib/perl5/5.8.8 /tools/lib/perl5/site_perl/5.8.8/i686-linux
/tools/lib/perl5/site_perl/5.8.8 /tools/lib/perl5/site_perl .)
at scripts/headers_install.pl line 19.
BEGIN failed--compilation aborted at scripts/headers_install.pl line 19.
make[2]: *** [/sources/linux-2.6.27/usr/include/asm-generic/.install] Error 2
make[1]: *** [asm-generic] Error 2
make: *** [headers_install] Error 2
I grabbed this from another user. My platform is actually x86-64, but oh well.
The funny thing is, is that I copied strict.pm from /tools/lib/perl5/5.8.8 to /sources/linux-2.6.27, and tried it again and it worked. I'm going alone fine now, I'm just kindof worried that I had to copy strict.pm to the Linux directory in order to get things to click...
Any input on how to really fix this problem?
The difference is my LFS is 6.5 and I'm pretty sure that my platform is x86.
Going back to the previous environment is not an option, things changed when you started chapter 6 (chapter 5 builds a temp system, 6 builds the actual LFS system).
If you did make the backup (as suggested in 5.32), you can remove everything you did this far and restore the backup. Then (re-)install perl and continue (after making a fresh backup).
If you did not make a backup: You could try installing perl from where you are. Do have a good look at the steps you need to take and make sure they work in your current environment. I assume this needs to be done as user lfs (all of chapter 5 is done this way), but step 5.32 changed the ownership of $LFS/tools, so this might not work. I've never tried this and am not sure if this can be done this way, I would start from scratch if I were you.....
- Have you checked if strict.pm is actually present at the location the script expects it to be?
- Are you using the 2.6.30 linux kernel as stated in the book or another one?
- Are you sure your host (you don't mention which) is up to specs?
If you still have the info could you also post the actual error (including a handful of lines before it).
Oh yeah, I'm sorry. I forgot to mention that I'm using the LFS LiveCD 6.3 r2160 as the host, since there are no 6.5 LiveCDs. However, I downloaded and used all the packages as specified in LFS book 6.5. Also, I can't copy and paste the errors since I'm doing it in a VM. It's actually my course's project. (If possible, is there anyway to copy and paste in and out of VMWare??)
I've done checking the strict.pm location already, and it's there. I tried copy the strict.pm file into the /linux-2.6.30.2 directory and it installs smoothly by the way. However, I ran into another problem when I install Glibc-2.10.1 (which I don't know whether is it related). I worked up to the part where I do the test suite:
Code:
cp -v ../glibc-2.10.1/iconvdata/gconv-modules iconvdata
make -k check 2>&1 | tee glibc-check-log
grep Error glibc-check-log
Although the book said that some errors are expected, none of mine ( posix/bug-regex{2,14,21}-mem , posix/tst-rxspencer-mem , posix/tst-pcre-mem , posix/tst-boost-mem , posix/tst-vfork3-mem , etc. ) fits with the files stated in the book ( nptl/tst-cancel1 , nptl/tst-clock2 , tst-attr3 ).
After that when I try to install the package with "make install", it just won't work. Is it possible that the strict.pm problem is related or did I just messed up somewhere before the compilation?
Going back to the previous environment is not an option, things changed when you started chapter 6 (chapter 5 builds a temp system, 6 builds the actual LFS system).
If you did make the backup (as suggested in 5.32), you can remove everything you did this far and restore the backup. Then (re-)install perl and continue (after making a fresh backup).
If you did not make a backup: You could try installing perl from where you are. Do have a good look at the steps you need to take and make sure they work in your current environment. I assume this needs to be done as user lfs (all of chapter 5 is done this way), but step 5.32 changed the ownership of $LFS/tools, so this might not work. I've never tried this and am not sure if this can be done this way, I would start from scratch if I were you.....
Hope this helps.
Why we can't go back? I mean, he can exit first then, go as normal user, with sudo command lets just say he can change ownership of /tools back to lfs, and then as lfs user reinstall the packages, then again as normal user change the ownership of tools and start working in his root# environment? I am posting this since i reinstalled my tar package in tool chain doing all this, and it worked. But pity is, now i am having another error though tar is fine.
Do share why we can't do that?
Why we can't go back? I mean, he can exit first then, go as normal user, with sudo command lets just say he can change ownership of /tools back to lfs, and then as lfs user reinstall the packages, then again as normal user change the ownership of tools and start working in his root# environment? I am posting this since i reinstalled my tar package in tool chain doing all this, and it worked. But pity is, now i am having another error though tar is fine.
Do share why we can't do that?
Once the toolchain is adjusted (chap. 6.10 in LFS 7.2) you cannot go back, you can go back up to and including chapter 6.9.
I do realize that you could theoretically change all this back by hand, but that is prone to making errors. Just make a backup at the end of chapter 5, if something goes wrong in chapter 6: restore the backup and restart from the beginning of chapter 6.
BTW: Using sudo is _not_ a good idea when building LFS.
I do realize that you could theoretically change all this back by hand, but that is prone to making errors. Just make a backup at the end of chapter 5, if something goes wrong in chapter 6: restore the backup and restart from the beginning of chapter 6.
BTW: Using sudo is _not_ a good idea when building LFS.
Thank you for the insight druuna. Btw without using sudo, is there any other way? i can't even change permissions without this command. I am using ubuntu. I know its dangerous for a beginner like me, i have ruined up my whole system once ... any alternative?
Btw without using sudo, is there any other way? i can't even change permissions without this command. I am using ubuntu. I know its dangerous for a beginner like me, i have ruined up my whole system once ... any alternative?
You should enable full root access for Ubuntu:
Code:
# as a normal user, druuna in the below example
druuna@ubuntu-vm:~$ sudo passwd root
[sudo] password for druuna:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
# Now you can become root user:
druuna@ubuntu-vm:~$ su -
Password:
root@ubuntu-vm:~#
The sudo command will still work if you need to use it.
# as a normal user, druuna in the below example
druuna@ubuntu-vm:~$ sudo passwd root
[sudo] password for druuna:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
# Now you can become root user:
druuna@ubuntu-vm:~$ su -
Password:
root@ubuntu-vm:~#
The sudo command will still work if you need to use it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.