LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Some help for temporary system (https://www.linuxquestions.org/questions/linux-from-scratch-13/some-help-for-temporary-system-4175436811/)

Only_Jeck 11-12-2012 01:26 PM

Some help for temporary system
 
Open this new thread to ask u help in "makin' temporary system" phase, chapter 5.
At the moment, I'm trying to compile glibc.
Decompressed glibc and entered in its directory, i digited:

Code:

if [ ! -r /usr/include/rpc/types.h ]; then
  su -c 'mkdir -p /usr/include/rpc'
  su -c 'cp -v sunrpc/rpc/*.h /usr/include/rpc'
fi

but no results.. And in "make" phase, I got this:

Code:

checking for -z relro option... no
configure: error: linker with -z relro support required

This last one I can't understand..

spiky0011 11-12-2012 01:37 PM

Can you post the output of version-check
And when you ran the configure command you should of been in glibc-build

Only_Jeck 11-12-2012 01:45 PM

version-check of.. what?
I am in glibc-build. And I see now, the warning message in config phase

Code:

configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: msgfmt makeinfo autoconf
*** some features will be disabled.
*** Check the INSTALL file for required versions.

Yes, the book said it. I read the install file, but don't understand how to fix this warning..

spiky0011 11-12-2012 01:52 PM

Did you read this page and make nessecary additions to host?
http://www.linuxfromscratch.org/lfs/.../hostreqs.html
Half way down there is a script to run to make sure host is compliant.
Run the script post output back here

Only_Jeck 11-13-2012 03:58 AM

Code:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
version-check.sh: line 8: bison: command not found
yacc not found
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
version-check.sh: line 17: gawk: command not found
/usr/bin/awk -> /usr/bin/mawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10.3) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
version-check.sh: line 27: m4: command not found
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
version-check.sh: line 33: makeinfo: command not found
Texinfo:
xz (XZ Utils) 5.1.0alpha
gcc compilation OK


spiky0011 11-13-2012 04:08 AM

Hi
Well there is the problem ypur host is not cmpiant
That is why i said read the book. You must fix all the noncompilant
Packages

Bison . Gawk. Makeinfo. M4. Bin/sh should point to bash

Only_Jeck 11-13-2012 04:21 AM

I thought ubuntu was enough recent to have all ok, and I didn't take care about it. Sorry.

Code:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10.3) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK

Now it's ok?

druuna 11-13-2012 04:24 AM

Quote:

Originally Posted by Only_Jeck (Post 4828216)
I thought ubuntu was enough recent to have all ok, and I didn't take care about it. Sorry.

Code:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10.3) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK

Now it's ok?

Not it isn't.

This is mentioned in the book and mentioned by spiky0011. How hard can it be?

Only_Jeck 11-13-2012 04:43 AM

How can I set the point to bash?

druuna 11-13-2012 04:49 AM

Quote:

Originally Posted by Only_Jeck (Post 4828232)
How can I set the point to bash?

As root user:
Code:

rm /bin/sh
ln -s /bin/bash /bin/sh


Only_Jeck 11-13-2012 05:03 AM

Code:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
...

bash or dash?

druuna 11-13-2012 05:05 AM

Quote:

Originally Posted by Only_Jeck (Post 4828244)
Code:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
...

bash or dash?

http://www.linuxfromscratch.org/lfs/.../hostreqs.html

https://www.linuxquestions.org/quest...1/#post4828210

https://www.linuxquestions.org/quest...1/#post4828232

https://www.linuxquestions.org/quest...1/#post4828238

Only_Jeck 11-13-2012 05:10 AM

Code:

root@giacomo-notebook:~# rm /bin/sh
root@giacomo-notebook:~# ln -s /bin/bash /bin/sh
root@giacomo-notebook:~# exit
exit
giacomo@giacomo-notebook:~$ ls -al /bin/sh
lrwxrwxrwx 1 root root 9 nov 13 12:05 /bin/sh -> /bin/bash

And then, the script:

Code:

root@giacomo-notebook:~# bash version-check.sh
bash, version 4.2.24(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10.3) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK


spiky0011 11-13-2012 05:15 AM

All looks good now. I would start from the beginning
again and remove all old dir

Only_Jeck 11-13-2012 05:18 AM

Thank you. Ok, it will be done

Only_Jeck 11-13-2012 08:32 AM

Quote:

For each package:
Using the tar program, extract the package to be built. In Chapter 5, ensure you are the lfs user when extracting the package.
Change to the directory created when the package was extracted.
Follow the book's instructions for building the package.
Change back to the sources directory.
Delete the extracted source directory and any <package>-build directories that were created in the build process unless instructed otherwise.
Every time, after "make install" command, I have to delete package directory (created by decompression) and if exist, the package-build directory. Right?
On deleting binutils-build, I take:

Code:

rm: remove write-protected regular file `binutils-build/bfd/po/SRC-POTFILES'?
Confirm and go ahead?

spiky0011 11-13-2012 08:42 AM

Yes that is correct

Only_Jeck 11-14-2012 02:47 AM

During creation of LFS system, can I reboot or shutdown pc?
The last time I did it, days ago, I lost all the content in /mnt/lfs directory... Therefore, for now, I'm constantly keeping the pc on.

druuna 11-14-2012 03:42 AM

Quote:

Originally Posted by Only_Jeck (Post 4828968)
During creation of LFS system, can I reboot or shutdown pc?

Yes, you can stop and restart (reboot) during the build.

A few pointers:
- After you restart you need to re-mount your LFS related partitions again (2.4. Mounting the New Partition).

- If you stop once you have started with chapter 6 you also need to mount dev and virtual file systems before you enter the chrooted environment (6.2. Preparing Virtual Kernel File Systems (steps 6.2.2 and 6.2.3) and the note at the bottom of 6.4. Entering the Chroot Environment).

- I never stop in the middle of a chapter, finish the chapter you are working on before stopping.

Only_Jeck 11-14-2012 04:50 AM

Thanks, usefull

Only_Jeck 11-14-2012 06:35 AM

In chapter 5.34:

Quote:

The commands in the remainder of this book must be performed while logged in as user root and no longer as user lfs. Also, double check that $LFS is set in root's environment.
Actually I am in chapter 6. The operations here, must be made with root?
I tried to do:

Quote:

mkdir -v $LFS/{dev,proc,sys}
But with root I take this:

Code:

mkdir: impossibile creare la directory "/dev": File già esistente
mkdir: impossibile creare la directory "/proc": File già esistente
mkdir: impossibile creare la directory "/sys": File già esistente

And with classic user or LFS user I take this:

Code:

mkdir: cannot create directory '/mnt/lfs/dev': Permission denied
mkdir: cannot create directory '/mnt/lfs/proc': Permission denied
mkdir: cannot create directory '/mnt/lfs/sys': Permission denied

What's the problem?

druuna 11-14-2012 06:47 AM

As mentioned in the note, The commands in the remainder of this book must be performed while logged in as user root.

It can't be clearer than that.....

Chapter 4.4 up to and including 5.33 are done as user lfs, the rest of the book as root.

spiky0011 11-14-2012 06:55 AM

OWhat is the output of echo $LFS as root

Only_Jeck 11-14-2012 06:57 AM

Well, but the fact remains:

Code:

mkdir: cannot create directory '/dev': file already exists
mkdir: cannot create directory '/proc': file already exists
mkdir: cannot create directory '/sys': file already exists

This with root and command: "mkdir -v $LFS/{dev,proc,sys}"

(sorry, previous code was in italian)

Seems that $LFS route (/mnt/lfs) is not known by root..

druuna 11-14-2012 06:58 AM

Quote:

Originally Posted by spiky0011 (Post 4829112)
OWhat is the output of echo $LFS as root

Good catch!

Only_Jeck 11-14-2012 07:00 AM

Quote:

Originally Posted by spiky0011 (Post 4829112)
OWhat is the output of echo $LFS as root

An empty line:

Code:

root@giacomo-notebook:~# echo $LFS

root@giacomo-notebook:~#

copied and pasted from terminal

druuna 11-14-2012 07:02 AM

Quote:

Originally Posted by Only_Jeck (Post 4829117)
Seems that $LFS route (/mnt/lfs) is not known by root..

Sigh.......

What does the note in chapter 5.34 say?
Quote:

Also, double check that $LFS is set in root's environment.
Code:

export LFS=/mnt/lfs
or add that line to root's .bashrc to make it permanent.

Only_Jeck 11-14-2012 07:13 AM

I read it... I'm an ass... I know u hate me for this.

Which command to set $LFS in root's environment?

spiky0011 11-14-2012 07:16 AM

Tips hat to druuna

spiky0011 11-14-2012 07:18 AM

As pointed out by druuna export LFS=/mnt/lfs

Only_Jeck 11-14-2012 07:20 AM

Thanks thanks thanks

spiky0011 11-14-2012 10:47 AM

Only Jeck
can we mark this as solved as we seem to be going through the whole book in 1 thread.


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