error compiling binutils pass 1

rblythe rblythe714 at comcast.net
Sat Oct 1 19:20:48 PDT 2005


On Saturday 01 October 2005 9:26 pm, Albert wrote:
> I didn't expect any errors in binutils.  This is probably host
> related, but I don't know how to fix it.
>
> LFS 6.1/5.3 Binutils
> host: Ubuntu 5.10, i686
> kernel: 2.6.12-9-386 (gcc version 3.4.5 20050809 (prerelease))
> gcc: 4.0.1
>
>
> gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o
> ar arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o
> emul_vanilla.o bucomm.o version.o filemode.o
> ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -ldl
> arlex.o: In function `main':
> /mnt/hda6.lfs61/sources/binutils-build/binutils/arlex.c:1:
> multiple definition of `main'
> arparse.o:/mnt/hda6.lfs61/sources/binutils-build/binutils/arparse.c:1:
> first defined here
> ar.o: In function `main':
> ../../binutils-2.15.94.0.2.2/binutils/ar.c:342: multiple
> definition of `main'
> arparse.o:/mnt/hda6.lfs61/sources/binutils-build/binutils/arparse.c:1:
> first defined here
> /usr/bin/ld: Warning: size of symbol `main' changed from 16 in
> arparse.o to 3791 in ar.o
> bucomm.o: In function `make_tempname':
> ../../binutils-2.15.94.0.2.2/binutils/bucomm.c:425: warning: the
> use of `mktemp' is dangerous, better use `mkstemp'
> ar.o: In function `mri_emul':
> ar.c:(.text+0x23): undefined reference to `yyparse'
> collect2: ld returned 1 exit status
> make[3]: *** [ar] Error 1
> make[3]: Leaving directory
> `/mnt/hda6.lfs61/sources/binutils-build/binutils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/mnt/hda6.lfs61/sources/binutils-build/binutils'
> make[1]: *** [all-recursive-am] Error 2
> make[1]: Leaving directory
> `/mnt/hda6.lfs61/sources/binutils-build/binutils'
> make: *** [all-binutils] Error 2

Make sure you have flex and bison installed on your host system.  With Ubuntu 
you should be able to 'apt-get install flex bison' (w/o) the quote marks from 
the command line or use a package manager like kpackage, synaptic, or 
aptitude.  Also, to avoid any other errors (possibly) make sure your host 
system has all of the packages (dependencies) installed for each one of the 
programs you will need to build LFS.  Some distros don't have the 
dependencies of LFS installed in a basic installation.  I am using MEPIS 
(another Debian based distro) and I had similar problems until I made sure I 
had the basic dependencies met.

HTH

rblythe



More information about the lfs-support mailing list