Unable to compile binutils-2.15.91.0.2

kaladen kaladen at cox.net
Thu Dec 30 12:54:22 PST 2004


Philipp Klein wrote:
> Hi,
> 
> i'm at the very beginning of my LFS and I've got some trouble compiling
> binutils.
> Well, actually there isn't anything extraordinary I did. I just followed
> the steps of the book. Eventhough, I get this error while doing `make
> LDFLAGS="-all-static"':
> 
> --snip--
> /bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes
> -Wmissing-prototypes -g -O2  -all-static -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/libbfd.la ../libiberty/libiberty.a   -ldl
> gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -static -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(.text+0x0): In function `main':
> /mnt/lfs/sources/tmp/binutils-build/binutils/arlex.c:1: multiple
> definition of `main'
> arparse.o(.text+0x0):/mnt/lfs/sources/tmp/binutils-build/binutils/arparse.c:1:
> first defined here
> ar.o(.text+0x44c): In function `main':
> /mnt/lfs/sources/tmp/binutils-build/binutils/ar.c:349: multiple
> definition of `main'
> arparse.o(.text+0x0):/mnt/lfs/sources/tmp/binutils-build/binutils/arparse.c:1:
> first defined here
> /usr/bin/ld: Warning: size of symbol `main' changed from 7 in arparse.o
> to 1854 in ar.o
> bucomm.o(.text+0x8d8): In function `make_tempname':
> /mnt/lfs/sources/tmp/binutils-build/binutils/bucomm.c:425: warning: the
> use of `mktemp' is dangerous, better use `mkstemp'
> ar.o(.text+0x26): In function `mri_emul':
> /mnt/lfs/sources/tmp/binutils-build/binutils/ar.c:148: undefined
> reference to `yyparse'
> collect2: ld returned 1 exit status
> make[3]: *** [ar] Error 1
> make[3]: Leaving directory
> `/mnt/lfs/sources/tmp/binutils-build/binutils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory
> `/mnt/lfs/sources/tmp/binutils-build/binutils'
> make[1]: *** [all-recursive-am] Error 2
> make[1]: Leaving directory
> `/mnt/lfs/sources/tmp/binutils-build/binutils'
> make: *** [all-binutils] Error 2
> lfs at fnord:/mnt/lfs/sources/tmp/binutils-build$ 
> --snap--
> 
> Of course I used Google to find a solution for this. All the answers I
> found had something to do with flex. 
> A friend of mine also told me that this problem could be caused by
> flex. I'm using Debian Sarge. The version of flex they're using is 
> 2.3.51. Nevertheless I tried to upgrade it and installed version 
> 2.5.4a. But even this didn't help. I still get the same error.
> 
> Now, I don't how to go on. Do you guys have any ideas what could be
> wrong here?
> 
I believe yyparse is part of bison, make sure your host has bison installed.



More information about the lfs-support mailing list