This is the mail archive of the cygwin@cygwin.com 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]

Re: m68k-elf-gcc problems under Cygwin


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/


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