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]

Building a cygwin->linux cross-compiler problem


Hi all,

For some reason, I need to compile in cygwin applications that will run
on linux (OpenBSD to be precise). I didn't find any pre-compiled
cross-compiler to do that (does it exist one ?), so I try to build one.
To do so, I am following first part of next howto :
http://gentoo-wiki.com/HOWTO_Distcc_server_on_Windows

But when I compile the binutils (binutils-20050610-1) with gcc (gcc
(GCC) 3.4.4 (cygming special)), the compilation stops, complaining that
_main is twice defined... and that _yyparse can't be linked. Can someone
help ? I found some questions about this problem on the net, but I can't
see any answer. Here are the logs:


*** Compilation logs ****
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -o
ar.exe arparse.o a
rlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o
bucomm.o version.o file
mode.o  ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a
arlex.o: In function `main':
/usr/src/binutils-20050610-1/binutils/arlex.c:1: multiple definition of
`_main'
arparse.o:/usr/src/binutils-20050610-1/binutils/arparse.c:1: first
defined here
ar.o: In function `main':
/usr/src/binutils-20050610-1/binutils/ar.c:337: multiple definition of
`_main'
arparse.o:/usr/src/binutils-20050610-1/binutils/arparse.c:1: first
defined here
ar.o: In function `mri_emul':
/usr/src/binutils-20050610-1/binutils/ar.c:143: undefined reference to
`_yyparse'
collect2: ld returned 1 exit status
make[3]: *** [ar.exe] Error 1
make[3]: Leaving directory `/usr/src/binutils-20050610-1/binutils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/binutils-20050610-1/binutils'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/binutils-20050610-1/binutils'
make: *** [all-binutils] Error 2

*** Configure command I used: ***
$ configure --with-included-gettext --target=$TARGET --host=$HOST
--build=$BUILD --prefix=$PREFIX -v

where:

cygwin$ export PREFIX=/usr/local/cross-linux
cygwin$ export SRC_ROOT=/usr/src/binutils-20050610-1
cygwin$ export BUILD=i686-pc-cygwin
cygwin$ export HOST=i686-pc-cygwin
cygwin$ export TARGET=i686-pc-linux-gnu
cygwin$ export BUILDDIR=/usr/src/build

Thank you for any advice.
-- 
Alain Paschoud, Fastcom Technology, Lausanne
Phone : +41 21 619 06 79

--
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]