binutils compile error... chapter 5... newbie need help
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
binutils compile error... chapter 5... newbie need help
I am trying to build an LFS system using Arch Linux as a base system....
I am quite a newbie to advanced distros, but willing to learn.
I followed the LFS book to the letter, except for...
1. Mounting a boot and home partition that will be shared between Arch Linux, Gentoo linux, and an LFS system if I'm successful.
2. Downloading the latest available version of kernel 2.6.27 instead of the version that is mentioned in the book.
3. creating a subdirectory named lfs in the mnt/lfs/sources and keeping all the downloaded tar and patch files in it.
When I got to the stage of compiling the first package, binutils I ran into this error.
Quote:
lfs:/mnt/lfs/tools/binutils-build$ make
make[1]: Entering directory `/mnt/lfs/tools/binutils-build'.....................................................................
$restore $backupdir/* `echo "./bfd.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
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/lfs/tools/binutils-build/bfd/doc'
Making info in po
make[3]: Entering directory `/mnt/lfs/tools/binutils-build/bfd/po'
( if test 'x/mnt/lfs/sources/lfs/binutils-2.18/bfd/po' != 'x.'; then \
posrcprefix='/mnt/lfs/sources/lfs/binutils-2.18/bfd/'; \
else \
posrcprefix="../"; \
fi; \
rm -f SRC-POTFILES-t SRC-POTFILES \
&& (sed -e '/^#/d' \
-e '/^[ ]*$/d' \
-e "s@.*@ $posrcprefix& \\\\@" < /mnt/lfs/sources/lfs/binutils-2.18/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@.*@ ../& \\\\@" < /mnt/lfs/sources/lfs/binutils-2.18/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.ino/Make-in \
CONFIG_HEADERS= /bin/sh ./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/lfs/tools/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/lfs/tools/binutils-build/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/mnt/lfs/tools/binutils-build/bfd/po'
make[3]: Entering directory `/mnt/lfs/tools/binutils-build/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/mnt/lfs/tools/binutils-build/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory `/mnt/lfs/tools/binutils-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/mnt/lfs/tools/binutils-build'
make: *** [all] Error 2
I suspect the problem is that I did not successfully apply the patch file for getting over the texinfo 4.9 problem to the binutils file.
I had indeed applied the patch, but I got an error saying
Quote:
File to patch: binutils-2.18.tar.bz2
patching file binutils-2.18.tar.bz2
Hunk #1 FAILED at 6128.
1 out of 1 hunk FAILED -- saving rejects to file binutils-2.18.tar.bz2.rej
What went wrong here. The output of the script for checking requirements in the host system, seems Ok, except that host binutils version is 2.19 and greater than the recommended 2.18
Quote:
bash, version 3.2.48(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.19.0.20081119
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 6.12
diff (GNU diffutils) 2.8.1
find (GNU findutils) 4.4.0
GNU Awk 3.1.6
awk not found
gcc (GCC) 4.3.2
GNU C Library stable release version 2.9,
GNU grep 2.5.3
gzip 1.3.12
Linux version 2.6.28-ARCH (root@T-POWA-LX) (gcc version 4.3.2 (GCC) ) #1 SMP PREEMPT Tue Jan 6 10:26:22 UTC 2009
m4 (GNU M4) 1.4.12
GNU Make 3.81
patch 2.5.9
Perl version='5.10.0';
GNU sed version 4.1.5
tar (GNU tar) 1.21
makeinfo (GNU texinfo) 4.13
Compilation OK
How did you apply the patch? You don't apply the patch to the binutils tarball. You unpack the tarball, change into the binutils source tree, then apply the patch.
I was indeed applying it to the tarred directory instead of applying it to the untarred configure file. This time I corrected the error. And the compile went just fine.
thank you weibullguy....
To help all noobs like me who have trouble patching, here is how i did it.
1. unzipped the binutils tar file that i want to patch
tar -xvjf filename (if its a tar.bz2 file)
tar -zxvf filename (if it is a tar.gz file)
2. This created a directory of the same name as the file. And I copied the patch file into this directory
3. i applied the patch by copying out the command from The Book, into the newly created binutils folder. That way, it won't even ask for a file name,provided you do the patching from within the binutils folder by "cd"ing there. if it does, the name of the file can be seen in the console output.
unzipped the binutils tar file that i want to patch
tar -xvjf filename (if its a tar.bz2 file)
tar -zxvf filename (if it is a tar.gz file)
Actually if you are using a version of tar that meets the minimum requirements of LFS, you don't need the j or z; tar is smart enough to figure it out on its own.
Quote:
Originally Posted by jaydoc
This created a directory of the same name as the file. And I copied the patch file into this directory
You don't copy the patch into the source tree. If you read the book and follow its instructions, you download all of the source tarballs and patches to $LFS/sources. Unpack the tarball, cd into the top of the source tree (binutils-2.18 in this case) and apply the patch with command in the book.
You'll notice that each patch is applied patch -Np1 -i ../laladada.patch. The ../ means the patch is up one directory level.
alright, here is something that WILL help every ignorant Linux Newbie like me...!
.. see those two dots? in a cd command they mean - "not whatever your directory is" as I so mistakenly assumed.
They mean "cd to the parent directory" which as weibullguy pointed out, mean a directory just above where you are.
I must say that if I had learnt this before embarking on this arduous mission, I would not have wasted a lot of time typing out long path names and also ending up with a wrongly adjusted toolchain...!
.. see those two dots? in a cd command they mean - "not whatever your directory is" as I so mistakenly assumed.
According to the book, "Building an LFS system is not a simple task. It requires a certain level of existing knowledge of Unix system administration in order to resolve problems, and correctly execute the commands listed. In particular, as an absolute minimum, the reader should already have the ability to use the command line (shell) to copy or move files and directories, list directory and file contents, and change the current directory. It is also expected that the reader has a reasonable knowledge of using and installing Linux software."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.