Trouble cross-compiling gcc-3.3.2 under MinGW

Dan Kegel dank@kegel.com
Sun Nov 2 20:45:00 GMT 2003


Peter Barada wrote:
>>>I'm trying to build gcc-3.3.2 --target=m68k-elf under MinGW, and it
>>>bombs running gengtype with the error:
>>>
>>>/home/barada/src/gcc/gcc-3.3.2/gcc/../include/ansidecl.h: No such file or directory
>>>
>>>I can see the file ansidecl.h and it is indeed in the directory
>>>mentioned, so I'm at a loss...
>>>
>>>Has anyone seen this before, or does anyone have any suggestions how I
>>>can proceed?
>>
>>Maybe it's a permissions problem?  Can you cat the file?
> 
> 
> The errno is 2(ENOENT), not 13(EACCES), so I don't thinks its a
> permission problem.  I wrote a quick-n-dirty program to fopen the
> ansidecl.h file, and it fails as well with errno=2.  I can cat the
> file form the shell so indeed its there and readable.  So it looks
> like the conversion from unix to windows path/filenames is breaking.
> 
> GDB just tells me that fopen returned a zero, and errno=2.  Under
> MinGW, there's no strace.  I started to step into fopen(), but that
> turned into a rats nest without source.

Try writing a little C program that uses open() instead of fopen();
that'll be much easier to trace into, as it'll immediately
hit a system call :-)

A few random ideas:

Assuming that also gives errno 2, try again but removing the gcc/../ from
the path, to see if it's the .. causing trouble.

Assuming that also gives errno 2, try putting a file right in /home
and opening that with open().  If that works, try again in /home/barada.
Keep going until you find the highest directory that's broken like this, maybe.

Once you have a minimal test case, go ask on the mingw list, maybe...

Does mingw use the cygwin layer?  If so, maybe they have
an old buggy fork of it, and the cygwin folks already know
how to fix the bug...

- Dan





------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list