Re: [Mingw-users] Error build shared library
- Date: Sat, 12 Apr 2008 00:03:19 -0300
- From: Rafael Fernandes <ragatol@xxxxxxxxxxxxxx>
- Subject: Re: [Mingw-users] Error build shared library
Brian Dessent escreveu:
> Rafael Fernandes wrote:
>
>
>> Everytime I try to build a shared library (under MSYS with MSYS make),
>> windres aways freezes and, after I press <Enter>, it says "can't open
>> file 'the': No such file or directory".
>>
>
> Putting on the psychic debugging hat, I'd guess it's something similar
> to the problem where you have %SystemRoot%\system32 ahead of the POSIX
> tools PATH, and something calls 'find'. In that case, the Windows find
> is used and has no idea of the POSIX syntax and just says something
> stupid like "The syntax is invalid", hence the "the". Some native tools
> helpfully try to print a help text when they are given invalid
> parameters, and in some cases when the help text is too long to fit in a
> default 80x25 they have a "press return for next page" prompt, hence the
> hang until you press enter. And if this package uses libtool, then it
> is very likely that 'find' is called in the process of building a shared
> library but not when building a static library.
>
>
>> Right now I'm trying to build SDL, and make calls windres like this:
>>
>> windres ./src/main/win32/version.rc build/version.o
>>
>> The file exists and it's only for version information.
>> Building a static library works perfectly.
>> I tried both the latest release and the latest beta of widres, but both
>> have the same problem.
>> Windres use is simple so I really don't know where I should look for
>> more details. If you know what I should check first, tell me. :)
>>
>
> windres runs the compiler (or more specifically, the C preprocessor, gcc
> -E) in order to resolve things like #include and #define in the .rc
> file, so it's not quite as simple as you might think.
>
> But I suspect windres could be a red herring. Are you sure that it's
> not the libtool processing *after* windres that is actually hanging,
> i.e. windres runs fine, but the next thing after that is libtool trying
> to create a shared library which calls find, and hangs because it gets
> the Win32 version. Have you actually run the windres command manually
> outside of the makefile and verified the hang?
>
> If it's really windres, run it with -v and it will show you the
> subcommands its invoking. If it's not really windres, I suspect the
> PATH problem above.
>
> Brian
>
>
>
Hi Brian,
I'm not very familiar with the gnu toolchain (yet), so I'm learning it.
I was reading windres.c, resrc.c and rcparse.c/rcparce.y sources and
trying to locate where/when it gets the "the" filename.
In the process, I saw what you said about it invoking gcc to parse the
rc file.
Anyway, I think my PATH is setup correctly as 'find --version' returns:
GNU find version 4.1
I tried to run windres manually, and got the same problem.
So, I have run it with the -v option as you recommended this time and
that's what I got:
$ windres -v ./src/main/win32/version.rc build/version.o
The process tried to write to a nonexistent pipe.
Tried `D:\msys\1.0\local\bin\gcc.exe'
Using `gcc -E -xc -DRC_INVOKED ./src/main/win32/version.rc'
Using popen to read preprocessor output
D:\msys\1.0\local\bin\windres.exe: can't open file `the': No such file
or directory
D:\msys\1.0\local\bin\windres.exe: preprocessing failed.
Note that this is the version 2.18.50.20080109 of windres.
With that I used:
$ windres --use-temp-file ./src/main/win32/version.rc buid/version.o
and it worked now! :)
Looks like there's a problem when using pipes... should I consider it a
bug, a limitation of MSYS or a work in progress?
Thanks for the info, at least now I know what is the problem and how to
avoid it.
Rafael Fernandes
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users