LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to compile linux packages as lfs user (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-compile-linux-packages-as-lfs-user-794298/)

andrea_g90 03-09-2010 03:04 PM

How to compile linux packages as lfs user
 
hi, I want to know how to compile packages as lfs user instead of default host user. I'm following the 6.6 guide, but when I try to create a folder or giving './configure' as lfs, a message tells me that I haven't the permission to do that...What I wrong?? ..thanks!

ProtoformX 03-09-2010 03:35 PM

Quote:

Originally Posted by andrea_g90 (Post 3891997)
hi, I want to know how to compile packages as lfs user instead of default host user. I'm following the 6.6 guide, but when I try to create a folder or giving './configure' as lfs, a message tells me that I haven't the permission to do that...What I wrong?? ..thanks!

Look at the permissions of $LFS/sources and $LFS/tools do these belong to user lfs? if they don't then you skipped a step and you need to retrace your steps.

druuna 03-09-2010 03:37 PM

Hi,

Chapter 2 and 3 should be done as user root. Chapter 4.1, 4.2 and 4.3 also as root user.

The rest of 4 and all of chapter 5 should be done as user lfs.

Are you sure you did not miss a step or made a mistake in chapters 3 and 4 (4.1, 4.2 and 4.3)??

Although this is a rather new release, these parts of the LFS book are common to the previous releases and have always worked.

andrea_g90 03-09-2010 03:41 PM

I have tryed two times to compile the LFS, and i found always the same problem.. however, I've set the permission of the user lfs to all the device /mount/lfs as it is explaned in the guide...

andrea_g90 03-09-2010 04:44 PM

Quote:

Hi,

Chapter 2 and 3 should be done as user root. Chapter 4.1, 4.2 and 4.3 also as root user.

The rest of 4 and all of chapter 5 should be done as user lfs.

Are you sure you did not miss a step or made a mistake in chapters 3 and 4 (4.1, 4.2 and 4.3)??

Although this is a rather new release, these parts of the LFS book are common to the previous releases and have always worked.
I have a question: When you say as root you mean that i have to digit before 'su' to login as root or I can simply digit sudo before the comamnd??

crts 03-09-2010 06:16 PM

Quote:

Originally Posted by andrea_g90 (Post 3892089)
I have a question: When you say as root you mean that i have to digit before 'su' to login as root or I can simply digit sudo before the comamnd??

I think, preceding every command with sudo is rather inconvinient. But it should work.
Still, I recommend you do it as follows:
Code:

su root
And then enter your password.

BTW, I do not really understand what you mean with digit.

andrea_g90 03-09-2010 07:02 PM

Quote:

BTW, I do not really understand what you mean with digit.
Sorry, I've done a wrong translation, I meant type!!
Thanks, I'll try and I let you know!

andrea_g90 03-09-2010 07:09 PM

Quote:

andrea@HpDuoInside:~$ su root
Password:
su: Authentication Error
andrea@HpDuoInside:~$
I think that i haven't the root user set!! Is it right??

crts 03-09-2010 09:06 PM

Quote:

Originally Posted by andrea_g90 (Post 3892234)
I think that i haven't the root user set!! Is it right??

Then I suspect you are using Ubuntu as host?

Just try
Code:

su
then and enter your normal user password.

andrea_g90 03-09-2010 09:50 PM

It doesn't work, my user password doesn't work with 'su' because i haven't got the password (I don't know how it is possible), the only way to became root is 'sudo su', but I think that it is different between the first one...

crts 03-10-2010 11:36 AM

Quote:

Originally Posted by andrea_g90 (Post 3892351)
It doesn't work, my user password doesn't work with 'su' because i haven't got the password (I don't know how it is possible), the only way to became root is 'sudo su', but I think that it is different between the first one...

sorry, my bad! Of course, in Ubuntu you have to do 'sudo su' and then enter your normal user password.
If you do sudo su then you do have root privileges.
However, Ubuntu is almost a sure source for trouble, when you try to build you LFS for the first time. I recommend to download the LFS liveCD and use the liveCD as host.

druuna 03-10-2010 11:39 AM

Hi,

use sudo su - instead of sudo su!!

The first gives you a full-blown root account, the second does not and will get you in to trouble with building LFS.

andrea_g90 03-14-2010 09:50 AM

thanks everybody...I'll try to make as you say!!
Quote:

However, Ubuntu is almost a sure source for trouble, when you try to build you LFS for the first time. I recommend to download the LFS liveCD and use the liveCD as host.
I would like to use ubuntu because I know very well it even if I was forced to download Ubuntu 8.04 in order to prevent trouble with gcc>4.3..
I have the last question. I have got an Intel core 2 Duo (64bit), but I want to compile a X86 LFS from a X86 ubuntu..Is it necessary that I use CLFS or LFS is good????

crts 03-14-2010 11:18 AM

Quote:

Originally Posted by andrea_g90 (Post 3897798)
I would like to use ubuntu because I know very well it even if I was forced to download Ubuntu 8.04 in order to prevent trouble with gcc>4.3..

The problem is not just to match the gcc version in Ubuntu, the problem is that Ubuntu probably modifies its version of gcc. When you check the version you will get somehthing like
Code:

gcc version 4.3 (ubuntu-generic)
Quote:

I have the last question. I have got an Intel core 2 Duo (64bit), but I want to compile a X86 LFS from a X86 ubuntu..Is it necessary that I use CLFS or LFS is good????
AFAIK, you do not need to cross-compile for that. Only if you were to build a x86_64 on a 32bit machine, for example.

andrea_g90 03-15-2010 07:01 AM

I'll try with LFS live cd...Thanks everybody for your help!! :)


All times are GMT -5. The time now is 01:46 PM.