LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   user based - Glibc problem (https://www.linuxquestions.org/questions/linux-from-scratch-13/user-based-glibc-problem-804208/)

charlie_lab 04-26-2010 03:15 AM

user based - Glibc problem
 
Hello,

When Im trying to install Glibc on chapter 6 with the user based package system I find this error message :

Code:

Makefile:72: warning: overriding commands for target `/usr/src/glibc/glibc-build/login/pt_chown'
../Rules:120: warning: ignoring old commands for target `/usr/src/glibc/glibc-build/login/pt_chown'
Makefile:72: warning: overriding commands for target `/usr/src/glibc/glibc-build/login/pt_chown'
../Rules:120: warning: ignoring old commands for target `/usr/src/glibc/glibc-build/login/pt_chown'
mkdir /usr/include/bits
mkdir /usr/include/gnu
mkdir /usr/share/i18n
mkdir /usr/share/i18n/charmaps
mkdir /usr/share/i18n/locales
mkdir /usr/lib/gconv
mkdir /usr/include/sys
mkdir /usr/lib/glibc
mkdir /usr/lib/glibc/getconf
/tools/bin/install: cannot create regular file `/usr/include/scsi/sg.h': Permission denied
make[2]: *** [/usr/include/scsi/sg.h] Error 1
make[1]: *** [misc/subdir_install] Error 2
make: *** [install] Error 2

How can I solve this.
Maybe by making /usr/include as a install directory ?

Roelof

crts 04-26-2010 08:00 AM

Hi,

since directories have already been created in /usr/include I'd say that /usr/include is already an install directory. If not, then you should definitely make it one. You should check the permissions of /usr/include/scsi.
But there is another problem that I see here.
Code:

/tools/bin/install: cannot create regular file `/usr/include/scsi/sg.h': Permission denied
This looks like the regular 'install' is being used. For a package user the install-wrapper should be used. IIRC, it should be located in /usr/lib/pkgusr/. This should be the first location in the PATH variable for a package user - not a regular user. For a regular user the PATH variable should not contain /usr/lib/pkgusr/ at all.
So check the following (as user glibc of course):
Code:

ls -ld /usr/include
ls -ld /usr/include/scsi
echo $PATH
ls -l /usr/lib/pkgusr/  # or whereever you stored the install-wrappers


charlie_lab 04-26-2010 09:41 AM

Hello,

I know that's the problem.
Im trying to solve that one that's why the question about install dir.


ls -ld /usr/include
Code:

drwxrwxr-t 15 root install 4096 Apr 26 07:50 /usr/include
ls -ld /usr/include/scsi
Code:

drwxr-xr-x 2 linux-headers linux-headers 84 Apr 26 06:54 /usr/include/scsi
echo $PATH
Code:

/usr/lib/pkgusr:/bin:/usr/bin:/tools/bin
ls -l /usr/lib/pkgusr/
Code:

total 20
-rwxr-xr-x 1 root root  578 Nov  1  2004 chgrp
-rwxr-xr-x 1 root root  800 Oct 28  2004 chmod
-rwxr-xr-x 1 root root  584 Nov  1  2004 chown
-rwxr-xr-x 1 root root 3318 Oct 30  2004 install
-rwxr-xr-x 1 root root 1068 Oct 30  2004 mkdir

Roelof

crts 04-26-2010 10:38 AM

Quote:

Originally Posted by charlie_lab (Post 3948136)
ls -ld /usr/include/scsi
Code:

drwxr-xr-x 2 linux-headers linux-headers 84 Apr 26 06:54 /usr/include/scsi

Hi,

this is exactly the problem that I mentioned in a previous thread:
http://www.linuxquestions.org/questi...6/#post3940367
The scsi directory was created by linux-headers and therefor glibc does not have write permission. Just make /usr/include/scsi an install-dir. Then read my hint for upcoming failures again. Now that you have encountered one it should be clearer what I tried to describe.
I am not sure if you might run into problems when compiling the kernel later in chapter 8. You will need access to directories that were created by linux-headers. But you most probably will create a user kernel in chapter 8 there might be some permission issues. If so, then try to compile and install the kernel as user linux-headers. I personally installed the headers as user kernel and also installed the compiled kernel as user kernel. But you might try it with two different users and let us know if it works.

Code:

echo $PATH
/usr/lib/pkgusr:/bin:/usr/bin:/tools/bin

I also have /sbin and /usr/sbin in my PATH. If you add those, be sure to leave /usr/lib/pkgusr as the first entry in PATH.

The install-wrappers also look OK so far.

charlie_lab 04-26-2010 01:41 PM

Oke,

glibc build is succeed.
So thank you for learning me this method.

Roelof


All times are GMT -5. The time now is 10:50 AM.