This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Unable to bootstrap binutils 2.20 with plugin-enabled /usr/bin/ar
- From: Drew Moseley <drew at moseleynet dot net>
- To: binutils at sourceware dot org
- Date: Thu, 11 Feb 2010 15:46:05 -0700
- Subject: Unable to bootstrap binutils 2.20 with plugin-enabled /usr/bin/ar
Hello,
I am attempting to build the 2.20 version of binutils on an
Ubuntu 9.1 system. The system-installed version of ar has
plugins enabled. If I try to configure the source package
without specifying "--enable-plugins", during the build I
get (wrapped for reading enjoyment):
libtool: link: ar rc .libs/libbfd.a archive.o archures.o bfd.o \
bfdio.o bfdwin.o cache.o coffgen.o corefile.o format.o init.o \
libbfd.o opncls.o reloc.o section.o syms.o targets.o hash.o \
linker.o srec.o binary.o tekhex.o ihex.o stabs.o stab-syms.o \
merge.o dwarf2.o simple.o compress.o verilog.o elf64-x86-64.o \
elf-ifunc.o elf64.o elf.o elflink.o elf-attrs.o elf-strtab.o \
elf-eh-frame.o dwarf1.o elf32-i386.o elf-vxworks.o elf32.o \
i386linux.o aout32.o pei-i386.o peigen.o cofflink.o \
pei-x86_64.o pex64igen.o elf64-gen.o elf32-gen.o cpu-i386.o \
cpu-l1om.o archive64.o
ar: symbol lookup error: \
ar: undefined symbol: bfd_plugin_set_program_name
If I use "--enable-plugins" the build succeeds.
I also have a SLES11 box that I am testing on and the
system-installed ar does not have plugins disabled and does not
suffer the same build failure. I verified that if I build a
plugin-enabled version and then use that to bootstrap a
plugin-disabled version the same build error occurs.
I tracked it down to when libtool calls the system ar with the
LD_LIBRARY_PATH set in the environment to:
<obdir>/./bfd/.libs:\
<obdir>/./prev-bfd/.libs:\
<obdir>/./opcodes/.libs:\
<obdir>/./prev-opcodes/.libs
If I run the ar command above from the <objdir> directory with
LD_LIBRARY_PATH set as above the "symbol lookup error" occurs.
If I remove the first component of the LD_LIBRARY_PATH then
the error does not occur.
Thoughts on how best to fix this without upgrading the
system-installed ar?
Thanks,
Drew Moseley