delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/21/10:34:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: <5.1.0.14.2.20021121072238.00fdae28@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Thu, 21 Nov 2002 07:34:35 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: m68k-elf-gcc problems under Cygwin
In-Reply-To: <01f101c2916b$9a5539c0$1b4b82ce@connecttech.com>
Mime-Version: 1.0

Brandon,

At 06:38 2002-11-21, Brandon Grenier wrote:
>Hi,
>
>I'm having a problem running the m68k elf toolchain compiler under Cygwin.
>
>I've downloaded the precompiled binary toolchain 
>(m68k-elf-20020410.tar.gz) from uClinux.org.

This is probably the mistake.


>After unzipping (with gunzip) and untarring the toolchain, I *should* be 
>able to use the m68k compiler 'right out of the box' so to speak.
>
>
>The error message I am receiving is:
>
>/m68k-elf-gcc: 1: Syntax error: "(" unexpected

It looks lie the binary you're trying to run is not a native Windows 
executable format and / or not an x86 executable at all. How does the 
"file" command classify that executable?


>I get the same error message whether I supply the compiler with arguments 
>or no arguments.
>
>
>**Things I've done ( Under Windows98SE )
>
>I downloaded the toolchain a three (3) different times. Each time I unpacked
>the toolchain and tried to use the m68k compiler, with no luck.

To what end? Were any failures reported during the download? The nature of 
Internet protocols (not to mention file compression formats) makes 
undetected errors extremely unlikely. Apart from premature termination of a 
TCP connection (which would lead to an incomplete download which would 
subsequently be detected by the tool that unpacked the archive), there's 
little likelihood that the data is corrupt.


>I downloaded an older toolchain and tried out the m68k compiler again. I 
>still receive the same error message.
>
>
>**Things I've done ( Under WIN2K )
>
>I installed Cygwin again, and once again tried to use the m68k-elf-gcc 
>compiler, again receiving the same error message.

Perhaps three (3) re-installs of Cygwin are in order?


>**Things I've done ( Under a Linux 2.4.X kernel )
>
>Aha, the m68k-elf-gcc compiler does NOT give me the same error message.

That should be a clue. Cygwin is not a Linux binary emulator. It's a POSIX 
emulation layer with its own libraries, tools and interface libraries. 
Where a capability (such as program launching, e.g.) is present in the 
underlying OS (Windows), then it's used (though indirectly). Among other 
things, that means Cygwin uses Windows executable file formats, not those 
of any Unix or Linux system.

This is probably why your program won't execute. In particular, since the 
program (probably) has execute permissions and fails when used in an 
exec(2) call, it is then interpreted as a shell script. It probably isn't a 
shell script...


>**Things I've done ( google/newsgroups )
>
>I've seen the same problem that I'm having on a ucLinux mailing list. 
>There was
>no resolution ( aside from the suggestion to not use Cygwin ). Aside from this
>small thread, I haven't found anything useful.
>
>
> >From the testing above, my assumption is that something in the Cygwin
>environment is not set up properly. However I'm not sure what it could be.

Most likely your Cygwin environment is fine.


>Has anyone ever encountered this problem before? Is there a resolution?

Yes, they have. Get or create (build) a Cygwin version of the tool chain 
you want to use. Some programming may be required...


>Cheers,
>
>BG


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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