LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 6.5 : Step 6.7 Installing Linux API headers : make headers_check/install error (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-6-5-step-6-7-installing-linux-api-headers-make-headers_check-install-error-788977/)

tsong99 02-13-2010 11:43 PM

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. :)

druuna 02-14-2010 04:21 AM

Hi,

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?

Hope this helps.

tsong99 02-14-2010 06:43 AM

Yes, I did.

My error appear to be the same with this guy though:

Quote:

Originally Posted by Stachelsk (Post 3542051)
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.

Then you (druuna) said to Stachelsk...

Quote:

Originally Posted by druuna (Post 3542124)
Hi,

Are you sure you did not forget these steps?

- 5.26.1. Installation of Perl -

mkdir -pv /tools/lib/perl5/5.8.8
cp -Rv lib/* /tools/lib/perl5/5.8.8


BTW: You are building and 'older' LFS (6.2), you do know that 6.4 is available.....

...which I'm not really sure whether I forgot to do that or not...

But now since I chroot-ed, how can I go back to the previous environment and try to reinstall perl again?

druuna 02-14-2010 07:42 AM

Hi,

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.

tsong99 02-14-2010 08:04 AM

I tried reinstalling from the current environment and it didn't work, and I forgot to make a backup in chapter 5, too. How stupid.

And about starting from scratch, that's what I've been doing while looking for solution anyway. Well, I guess that works! lolz

Much appreciated for the advise anyway. Thanks a lot. :)

tsong99 02-14-2010 11:14 PM

WTF!?! Even though I started over, the same error still exists!! I'm 100% sure that I've copied the perl files, too.

Can anyone help me pls???

druuna 02-15-2010 04:17 AM

Hi,

Strange.

- 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).

tsong99 02-15-2010 07:02 AM

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?

Lakhan Kumar 12-24-2012 04:12 AM

Quote:

Originally Posted by druuna (Post 3863285)
Hi,

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? :)

druuna 12-24-2012 04:36 AM

Quote:

Originally Posted by Lakhan Kumar (Post 4855968)
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.

The ownership isn't the real problem, changes in the toolchain are. Have a look here: 5.34. Changing Ownership (the Caution box) and here 6.10. Adjusting the Toolchain

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.

Lakhan Kumar 12-24-2012 08:48 PM

Quote:

Originally Posted by druuna (Post 4855974)
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.

The ownership isn't the real problem, changes in the toolchain are. Have a look here: 5.34. Changing Ownership (the Caution box) and here 6.10. Adjusting the Toolchain

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 :D... any alternative?

druuna 12-25-2012 02:40 AM

Quote:

Originally Posted by Lakhan Kumar (Post 4856340)
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 :D... 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.

Lakhan Kumar 12-25-2012 04:26 PM

Quote:

Originally Posted by druuna (Post 4856439)
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.

Okay thankyou Drunna :).


All times are GMT -5. The time now is 07:25 PM.