LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS - about 30 Autoconf files and how to do the patches (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-about-30-autoconf-files-and-how-to-do-the-patches-934440/)

Sjors-rw 03-14-2012 12:00 PM

LFS - about 30 Autoconf files and how to do the patches
 
Hey,

First of all, I'm Sjors Snoeren, a 16 year old webdeveloper, I got my own company called Rockweb, see http://www.rockweb.nl, I'm from holland as you may see on my web URL. I'm a big Mac OSX and Linux fan, I know Strange combination. I'm wanting to create my own OS so,

I'm using LFS, but struggling yet,
I've installed the WGET-list, but when I cd to the $LFS I see much .tar.gz files like it have to, but I see also about 30 Autconf.tar.gz.1 and tar.gz.2 and so on, is it meant so or did I do sth wrong?

Also the patches, need they be to installed manually? Or is there a program or a patch-list like the wget-list?

Thnx for reading, and I hope someone can help me out!

druuna 03-14-2012 12:27 PM

Hi/Hoi Sjors-rw,

Welcome to LQ!

Quote:

Originally Posted by Sjors-rw (Post 4626703)
I've installed the WGET-list, but when I cd to the $LFS I see much .tar.gz files like it have to, but I see also about 30 Autconf.tar.gz.1 and tar.gz.2 and so on, is it meant so or did I do sth wrong?

Something must have gone wrong. Have a look at the content of the wget-list file, all packages/patches should be mentioned just once.

The command given in the book to get the files (wget -i wget-list -P $LFS/sources) also works as it supposed to.

You did follow the instructions in the book?

Quote:

Also the patches, need they be to installed manually?
When a patch needs installing it is explained on the page (Example: 5.5 GCC - Pass 1).

BTW: Links provided assume latest stable LFS (7.1 at this moment).

Hope this helps.

EDIT: Just asked a moderator to move this to the LFS sub-forum.

business_kid 03-14-2012 12:34 PM

Welcome to LQ.
Quote:

but I see also about 30 Autconf.tar.gz.1 and tar.gz.2 and so on, is it meant so or did I do sth wrong?
Something is probably wrong.
run
Code:

diff Autoconf.tar.gz.1 Autoconf.tar.gz.2
It will either throw up loads of crap, or nothing. If it throws up nothing, you can probably delete most of them. But check the length
Code:

ls -lh Autoconf.*
wget could have been retrying if that was set. I don't know the script. Make sure the one you keep has the right md5sum.

Quote:

Also the patches, need they be to installed manually? Or is there a program or a patch-list like the wget-list?
I think not. I think they are done one at a time. If you're doing manual (Best way to learn) the commands are in the book. If you are using the build script on the cd, it patches them before the compile.

Sjors-rw 03-14-2012 12:40 PM

What I did I copied the url with the wget's to the command instead of wget-list.

for the patches, I don't have to do anything right now? If I understand you correctly.

druuna 03-14-2012 12:44 PM

Hi,
Quote:

Originally Posted by Sjors-rw (Post 4626725)
What I did I copied the url with the wget's to the command instead of wget-list.

Follow the book, it works :)

Quote:

for the patches, I don't have to do anything right now? If I understand you correctly.
Nope, when the time comes you will notice.

Sjors-rw 03-14-2012 01:01 PM

Look, this is my problem:

http://cl.ly/F0UI

Any ideas, the rest seams OK.

druuna 03-14-2012 01:18 PM

Hi,

Well, if you do not follow the book (why not?? problem would be solved....) and don't tell us which commands you actually used we cannot help you.

What does this mean:
Quote:

Originally Posted by Sjors-rw
What I did I copied the url with the wget's to the command instead of wget-list.

Please post the exact commands you used, only that way we might be able to explain why it behaves the way it does.

Sjors-rw 03-14-2012 01:22 PM

I followed the book, it says:

Code:

wget -i wget-list -P $LFS/sources
Wget-list was not found so I used:

Code:

wget -i http://www.linuxfromscratch.org/bblalalala/wget-list.html -P $LFS/sources
That's the right way to do it? I think the book is not explaining enough detail about that kind of things.

druuna 03-14-2012 01:26 PM

Hi,
Quote:

Originally Posted by Sjors-rw (Post 4626749)
I followed the book, it says:

Code:

wget -i wget-list -P $LFS/sources
Wget-list was not found so I used:

Code:

wget -i http://www.linuxfromscratch.org/bblalalala/wget-list.html -P $LFS/sources
That's the right way to do it? I think the book is not explaining enough detail about that kind of things.

Nope.

Download and store the wget-list file. From the location you stored the wget-list file issue the wget -i wget-list -P $LFS/sources command.

Hope this helps.

Sjors-rw 03-14-2012 02:55 PM

How can I remove multiple files easy? Can I get in filemanager to do so? With Terminal it takes a alot of time...

druuna 03-14-2012 03:08 PM

Hi,
Quote:

Originally Posted by Sjors-rw (Post 4626807)
How can I remove multiple files easy? Can I get in filemanager to do so? With Terminal it takes a alot of time...

LFS is meant to be build from a console/terminal.

Assuming you want to remove all (!!) the files in $LFS/sources (as root user):
Code:

$ cd $LFS/sources
$ rm -f *

A little warning: If you are not familiar enough with the CLI to know this you will have a real hard time building a LFS system.

Hope this helps.

Sjors-rw 03-14-2012 03:13 PM

But that's why I wanted to build one, to learn.

Sjors-rw 03-15-2012 02:56 AM

So, struggled upon another problem, In chapter 4 you have to Export $LFS to /mnt/lfs, I did that but the pakages are still on $LFS... Is that a problem?

druuna 03-15-2012 03:14 AM

Hi,

The packages you downloaded should reside in $LFS/sources, not $LFS (as mentioned in chapter 3). During chapter 4 and 5 the base you are building from is stored in the LFS variable (for most people this variable will contain /mnt/lfs).

The export command doesn't have anything to do with that. The export part of the command makes sure that this variable (LFS) is also present in the sub-shells that are used during the build.

Hope this helps.

Sjors-rw 03-15-2012 03:22 AM

Thanks, I've managed to do it correcly, now I'm inn chapter 5.

Now I'm seeing:
This kinda commands:

mkdir -v ../binutils-build
cd ../binutils-build

but which directory the book is using to fill that in because ../ means two directorys back in HTML/CSS I think here is the same?

So do I have to be in $LFS/sources or what?

druuna 03-15-2012 03:28 AM

Hi again,

Each chapter assumes you unpacked the package and are standing in the newly created directory. As explained here: 5.3 - Last Important box.

Sjors-rw 03-15-2012 03:48 AM

So, in chapter 5 it presumes you are in $LFS/mnt/lfs/sources?

If I understand you correctly.

druuna 03-15-2012 04:40 AM

Hi,

No, you need to be in $LFS/sources (which expands to /mnt/lfs/sources) to unpack the appropriate package.

jschiwal 03-15-2012 06:41 AM

Moved: This thread is more suitable in Linux From Scratch forum and has been moved accordingly to help your question get the exposure it deserves.

Sjors-rw 03-15-2012 09:54 AM

Alright, I'm in mnt/lfs/sources
but, when I use this code:

../binutils-2.22/configure \
--target=$LFS_TGT --prefix=/tools \
--disable-nls --disable-werror

It says, there's no directory.

and when I cd to
../binutils-2.22/configure it says the same.

Sjors-rw 03-15-2012 10:26 AM

Ok, found an tutorial for tarballs, so i've used this code: tar -vfx binutils ....
but now in my sources folder are all the files of binutils, like 50 files.

How can I undo/delete them all and what's the right way to do it.

Is there someone who can give support via MSN or something? It would be very nice.

druuna 03-15-2012 11:14 AM

Quote:

Originally Posted by Sjors-rw (Post 4627490)
Alright, I'm in mnt/lfs/sources
but, when I use this code:

../binutils-2.22/configure \
--target=$LFS_TGT --prefix=/tools \
--disable-nls --disable-werror

It says, there's no directory.

and when I cd to
../binutils-2.22/configure it says the same.

See post #16

Quote:

Originally Posted by Sjors-rw (Post 4627505)
Ok, found an tutorial for tarballs, so i've used this code: tar -vfx binutils ....
but now in my sources folder are all the files of binutils, like 50 files.

How can I undo/delete them all and what's the right way to do it.

See post #11.........

Sjors-rw 03-18-2012 08:00 AM

Now I've started again. In chapter 5 where do I have to be? with LFS user there's permission denied, en which directory do I have to stand? $LFS/sources?

spiky0011 03-18-2012 08:30 AM

Hi

You should be in /mnt/lfs/sources
Where you have the tarball then untar the tarball into sources dir then cd into the directory created from the untar.

Which package are you on

druuna 03-18-2012 08:48 AM

Hi,
Quote:

Originally Posted by Sjors-rw (Post 4629723)
In chapter 5 where do I have to be? with LFS user there's permission denied, en which directory do I have to stand? $LFS/sources?

About the permission denied: What's denied? cd-ing into a directory? Untarring a file? Details please.
In general: Did you re-check all the commands? Especially those in 4.3, the chown commands for example. Are the packages in $LFS/sources (at least) readable for user lfs?


About the directory you need to be standing in: Really?

When you finished chapter 4 you are user lfs and standing in your home directory (/home/lfs).

In chapter 5.3 this pops up:
Quote:

Important

To re-emphasize the build process:

Place all the sources and patches in a directory that will be accessible from the chroot environment such as /mnt/lfs/sources/. Do not put sources in /mnt/lfs/tools/.

Change to the sources directory.

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.
This would put you in $LFS/sources

In 5.4 you have to build Binutils. Untar, from where you are standing ($LFS/sources), the binutils package and cd into it (steps one and two from the For each package: part.

Hope this helps.

@spiky0011: That should be /mnt/lfs/sources!

Sjors-rw 03-18-2012 10:02 AM

alright, 5.4 succeeded. Now I'm in chapter 5.5 but it says:

tar -jxf ../mpfr-3.1.0.tar.bz2
mv -v mpfr-3.1.0 mpfr
tar -Jxf ../gmp-5.0.4.tar.xz
mv -v gmp-5.0.4 gmp
tar -zxf ../mpc-0.9.tar.gz
mv -v mpc-0.9 mpc

and:
tar -jxf ../mpfr-3.1.0.tar.bz2
refers to one directory "up" but I'm in /sources and the file itself is in sources too. Do I have to just remove the ".." or do I have to be in an other directory?

druuna 03-18-2012 10:09 AM

Hi,

I told you this three times already (Posts #16, #22 and #25).

Again:
Quote:

Change to the sources directory.

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.

Sjors-rw 03-20-2012 01:38 PM

Started again, me getting better with linux, I'm now stuck at 5.7 for glibc compilation. I get the warning: warning you should not compile gnu libc without versioning

And underneath that error: You need a recent version of Binutils, 2.8 or higher, but for LFS we use 2.22. So how to solve this problem?

Thanks again for helping,

spiky0011 03-20-2012 02:01 PM

Hi

Can you post the error you are getting plz

Sjors-rw 03-20-2012 02:03 PM

I've managed to continue, but now I don't know what to do. First off all from the beginning after install each pakage there are numerous errors, the whole time with [1] Error , that structure. I don't did anything with it and keep getting further, now a few pakages wont install, getting errors with config files etc.. What am I doing wrong? any ideas?

spiky0011 03-20-2012 02:07 PM

It,s no good if you get errors to proceed.
There is a reason for the errors is that something has gone wrong, with either the package you are on or previous 1's

Sjors-rw 03-20-2012 02:09 PM

I know but I dit follewed the book, so I thought it had to be so.

Sjors-rw 03-20-2012 02:14 PM

I've been looking to another guide, with more detailed instructions, are there any? Or is there someone around here, who wants to give me support via msn or something that would be great. I think this guide has to do much more with details about which path you are right now etc.

spiky0011 03-20-2012 02:32 PM

As far as i,m awhere the book is the only tutorial for building, It dose work as many ppl have built systems from it

business_kid 03-21-2012 03:27 AM

I have done LFS several times. Once you build the toolchain error free, i.e. glibc, gcc and kernel headers) in Ch.5, you can do ch. 5 & ch 6 toolchain. Once you build that toolchain error free you can do the rest. That's a condition for putting up the stable book.

You're probably here after fruitless mails on lq itself. YOUR machine/distro doesn't measure up if you can't get that far. If you want to moan, go ahead. If you want people to cast an eye over your problems, you have to show us. No make -k; when a build fails, hit up arrow & return and catch the first error. That's all we need to see.

Sjors-rw 03-21-2012 06:24 AM

Your right, I've found a nice guy who wants to give me some support via MSN, when we both haven't an idea to come further I'm going back to here. Thanks for the support so far.

Sjors-rw 03-21-2012 11:21 AM

Look, I'm getting this kind of erros:

make[3]: Leaving directory `/mnt/react/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/react/binutils-build/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/mnt/react/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/react/binutils-build/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/mnt/react/binutils-build/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory `/mnt/react/binutils-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/mnt/react/binutils-build'
make: *** [all] Error 2

Note the Make *** [all] ERROR 2, is this a problem?

druuna 03-21-2012 11:25 AM

Hi,

You need to include the actual error (as explained here: 1.5 Help (1.5.3)).

And: Yes, that is a problem. But without the error we cannot point you to any possible solution.

EDIT: Also include the exact command(s) you used in this chapter to get to this point.

business_kid 03-21-2012 12:15 PM

@Sjors-rw:
As a general yardstick, most threads are sorted in under 7 posts. This is 32 posts - most of your LQ history. There's no point unless you give exact errors. When a compile fails,
1. Hit up arrow & return
2. Post the _first_ error. You posted the last ones.
3. If you can't see the first error run 'make > file 2>&1' and check the file with less.

Sjors-rw 03-21-2012 12:22 PM

so you mean this one:

make[3]: *** [bfd.info] Error 1
make[2]: *** [info-recursive] Error 1
make[1]: *** [all-bfd] Error 2
make: *** [all] Error 2

The commands I used are exactly the same as from the book:

mkdir -v ../binutils-build
cd ../binutils-build

../binutils-2.22/configure --target=$LFS_TGT \
--prefix=/tools \
--disable-nls \
--disable-werror

druuna 03-21-2012 12:33 PM

Did you actually read 1.5.3?

It also includes a link to a page you should definitely read!

Sjors-rw 03-21-2012 12:37 PM

WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [bfd.info] Error 1
make[3]: Leaving directory `/mnt/react/binutils-build/bfd/doc'
Making info in po
make[3]: Entering directory `/mnt/react/binutils-build/bfd/po'
( if test 'x../../../binutils-2.22/bfd/po' != 'x.'; then \
posrcprefix='../../../binutils-2.22/bfd/'; \
else \
posrcprefix="../"; \
fi; \
rm -f SRC-POTFILES-t SRC-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ $posrcprefix& \\\\@" < ../../../binutils-2.22/bfd/po/SRC-POTFILES.in \
| sed -e '$s/\\$//') > SRC-POTFILES-t \
&& chmod a-w SRC-POTFILES-t \
&& mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ ../& \\\\@" < ../../../binutils-2.22/bfd/po/BLD-POTFILES.in \
| sed -e '$s/\\$//') > BLD-POTFILES-t \
&& chmod a-w BLD-POTFILES-t \
&& mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
&& CONFIG_FILES=po/Makefile.in:po/Make-in \
CONFIG_HEADERS= /bin/bash ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Leaving directory `/mnt/react/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/react/binutils-build/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/mnt/react/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/react/binutils-build/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/mnt/react/binutils-build/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory `/mnt/react/binutils-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/mnt/react/binutils-build'
make: *** [all] Error 2

So this code? Can I assume I'm missing makeinfo and that's the problem?

Sjors-rw 03-21-2012 12:41 PM

Wow found my problem myself, the problem was makeinfo. Thanks for the tip of 1.5.3 with that info I fount the problem! :)

Sjors-rw 03-21-2012 01:54 PM

I am now at: 5.5 and stuck on the latest command, getting this error:

No command '-gcc' found, did you mean:
Command 'cgcc' from package 'sparse' (multiverse)
Command 'gcc' from package 'gcc' (main)
Command 'gcc' from package 'pentium-builder' (universe)
-gcc: command not found
`./libgcc.a' -> `libgcc.a'

with this command: ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`

spiky0011 03-21-2012 02:31 PM

Hi

I know you have been getting problems,
Did you make sure your host system was compliant, as texinfo is 1 of the dependencies, and what host are you using.

Sjors-rw 03-22-2012 02:32 AM

So, I did what you said, checked my host system req's. First check 2 unvalid. Installed them and checked again, everything is fine.
Entered: this command again ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`

same errors
looked at the code and edited it with removing - before gcc, because -gcc was not found, so I got:

ln -vs libgcc.a `$LFS_TGT gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`

changed: $LFS_TGT-gcc to $LFS_TGT gcc
and no errors but did the command executed the right way now?

druuna 03-22-2012 02:47 AM

Quote:

Originally Posted by Sjors-rw (Post 4633291)
looked at the code and edited it with removing - before gcc, because -gcc was not found, so I got:

ln -vs libgcc.a `$LFS_TGT gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`

changed: $LFS_TGT-gcc to $LFS_TGT gcc
and no errors but did the command executed the right way now?

No it did not execute correctly.

You need to check if LFS_TGT is set (it should be, it is part of .bashrc for user lfs, this part LFS_TGT=$(uname -m)-lfs-linux-gnu).

LFS_TGT should contain something like this (bold part could be different on your box, use uname -m to find out): i686-lfs-linux-gnu

When using this command:
Code:

ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
the bold part expands to: i686-lfs-linux-gnu-gcc (again: i686 may be different). If only -gcc is shown then LFS_TGT isn't set.

Hope this helps

Sjors-rw 03-22-2012 02:53 AM

Thanks, it works!

Now getting another problem, which is a problem with ubuntu itself, i guess

Googling on the errors results in that quote.

error:

-MT /mnt/react/sources/glibc-build/misc/syslog.o
In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
make[2]: *** [/mnt/react/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/mnt/react/sources/glibc-2.14.1/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/react/sources/glibc-2.14.1'
make: *** [all] Error 2

any suggestions?

druuna 03-22-2012 03:01 AM

Have a look here (at the bottom): Re: syslog.c error

It seems your host still doesn't meet the system requirements.

Sjors-rw 03-22-2012 03:13 AM

Installed everything (via software center) now getting this error:
after (MAKE)

In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
make[2]: *** [/mnt/react/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/mnt/react/sources/glibc-2.14.1/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/react/sources/glibc-2.14.1'
make: *** [all] Error 2


All times are GMT -5. The time now is 05:24 PM.