[lfs-support] Error in compiling Binutils-2.24 Pass 2 - eval -r: invalid option

William Harrington kb0iic at berzerkula.org
Tue May 27 15:47:54 PDT 2014

On May 27, 2014, at 1:28 PM, Nathan Bibb wrote:

> libtool: link: i586-lfs-linux-gnu-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 elf32-i386.o elf-ifunc.o elf-nacl.o elf-vxworks.o elf32.o  
> elf.o
> elflink.o elf-attrs.o elf-strtab.o elf-eh-frame.o dwarf1.o  
> i386linux.o aout32.o
> pei-i386.o peigen.o cofflink.o elf32-gen.o cpu-i386.o trad-core.o
> libtool: link: -ranlib .libs/libbfd.a
> ./libtool: line 1118: eval: -r: invalid option
> eval: usage: eval [arg ...]

This is what stands out:

libtool: link: -ranlib ./libs/libbfd.a

-ranlib will never be a valid command. That probably has to do with - 
ranlib being parsed and -r being an argument.

CC=$LFS_TGT-gcc \ AR=$LFS_TGT-ar \ RANLIB=$LFS_TGT-ranlib \ ../ 
binutils-2.24/configure \ --prefix=/tools \ --disable-nls \ --with-lib- 
path=/tools/lib \ --with-sysroot
When LFS_TGT is not set, then -ranlib will be the command.  I suggest  
you check the lfs user's environment and make sure LFS_TGT is set.
If you aren't using the lfs user, then make sure your own use (not  
root) has the environment set right.  If you are the root user, then  
the lfs user's environment wouldn't be used and LFS-TGT would not be  


William Harrington

More information about the lfs-support mailing list