delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/22/03:07:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <430979A2.40506@fastcom-technology.com>
Date: Mon, 22 Aug 2005 09:07:14 +0200
From: Alain Paschoud <paschoud AT fastcom-technology DOT com>
Reply-To: paschoud AT fastcom-technology DOT com
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Building a cygwin->linux cross-compiler problem
X-Antivirus: avast! (VPS 0533-5, 20.08.2005), Outbound message
X-Antivirus-Status: Clean
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019