This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error when making binutils "collect2: ld returned 1 exit status"


I am trying to build a cross compiler on my Windows XP host that will
compile executable binaries that I can run on my Linux Red Hat 9.0
target, but I get compile errors when building the binutils. I am
running cygwin 1.5.14, and gcc 3.3.3-3.

I have created a /crossgcc/build-binutils directory, and from it I
first execute the "configure" command:
$ ../../usr/src/binutils-20041229-1/configure --target=$TARGET
--host=$HOST --build=$BUILD --prefix=$PREFIX -v

Where:
TARGET=i686-pc-linux-gnu
HOST=i686-pc-cygwin
BUILD=i686-pc-cygwin
PREFIX=/crossgcc

and then, this is the error I get when I run 'make':
...
/crossgcc/build-binutils/binutils/arlex.c:1: multiple definition of `_main'
arparse.o(.text+0x0):/crossgcc/build-binutils/binutils/arparse.c:1:
first defined here
ar.o(.text+0x7d0): In function `main':
/crossgcc/build-binutils/binutils/../../../usr/src/binutils-20041229-1/binutils/ar.c:342:
multiple definition of `_main'
arparse.o(.text+0x0):/crossgcc/build-binutils/binutils/arparse.c:1:
first defined here
ar.o(.text+0x27): In function `mri_emul':
/crossgcc/build-binutils/binutils/../../../usr/src/binutils-20041229-1/binutils/ar.c:148:
undefined reference to `_yyparse'
collect2: ld returned 1 exit status
make[3]: *** [ar.exe] Error 1
make[3]: Leaving directory `/crossgcc/build-binutils/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/crossgcc/build-binutils/binutils'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/crossgcc/build-binutils/binutils'
make: *** [all-binutils] Error 2

Any help would be Greatly appreciated (I'm new).

==============  start of output from "configure" command ================
$ ../../usr/src/binutils-20041229-1/configure --target=$TARGET --host=$HOST --b
uild=$BUILD --prefix=$PREFIX -v
loading cache ./config.cache
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
-v: not found
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16
$$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... no
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for gm4... (cached) m4
checking for flex... no
checking for flex... no
checking for lex... no
checking for makeinfo... (cached) makeinfo
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing opcodes/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
*** removing binutils/Makefile to force reconfigure
checking for i686-pc-cygwin-ar... no
checking for ar... (cached) ar
checking for i686-pc-cygwin-as... no
checking for as... (cached) as
checking for i686-pc-cygwin-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-cygwin-ld... (cached) /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3
/../../../../i686-pc-cygwin/bin/ld.exe
checking for i686-pc-cygwin-nm... no
checking for nm... (cached) nm
checking for i686-pc-cygwin-ranlib... (cached) ranlib
checking for i686-pc-cygwin-windres... no
checking for windres... (cached) windres
checking for i686-pc-cygwin-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-cygwin-objdump... no
checking for objdump... (cached) objdump
checking for i686-pc-linux-gnu-ar... no
checking for i686-pc-linux-gnu-as... no
checking for i686-pc-linux-gnu-dlltool... no
checking for i686-pc-linux-gnu-ld... no
checking for i686-pc-linux-gnu-nm... no
checking for i686-pc-linux-gnu-ranlib... no
checking for i686-pc-linux-gnu-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
updating cache ./config.cache
creating ./config.status
creating Makefile
==============  end of output from "configure" command ================

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]