Binutils 2.20 - Windres problems building pthreads/libiconv on Open Solaris

Nick Clifton nickc@redhat.com
Tue Feb 9 10:57:00 GMT 2010


Hi Tony,

   I tried reproducing this problem on an x86 Linux host machine, but it 
fails with:

   windres: version.rc:94: syntax error

I suspect that this means that PTW32_VERSION is not defined.  It is not 
clear to me where this macro should be defined.  Maybe in the pthread.h
file ?  Do you have a local version of pthread.h that is different from 
the system version ?


> i686-pc-mingw32-windres --include-dir=. -D__CLEANUP_C -o version.o version.rc
> gmake[3]: *** [version.o] Segmentation Fault (core dumped)

> i686-pc-mingw32-windres version.rc version.o
> results in the same segfault.

Interesting - I would have expected to see the #error message from the 
preprocessor about the "Resource compiler doesn't know which compiler 
you're using - see version.rc".  Which leads me to suspect that the 
problem is in the C-preprocessor that is being used by windres, rather 
than the windres program itself.  Have you tried using the 
--preprocessor=<> option to specify a different C preprocessor ? 
(Assuming that one is available on your system).


> After a long process of trying different
> options, it seems that specifying a codepage:
>
> i686-pc-mingw32-windres -c 1252 version.rc version.o
>
> allows the build to succeed

Which kind of destroys my theory about the C preprocessor being 
responsible, since the -c option is not passed along...

Are you able to run windres inside a debugger and find out where the 
segmentation fault is happening ?  I have a horrible feeling that it 
might be inside a system/library call and there might not be a lot that 
can be done about it. :-(


> I'm a little stuck now, and don't know how to proceed. I can't find a
> way to specify a codepage globally,

I *think* that you can do this by defining the macro CP_ACP to the 
codepage that you want.  (See the binutils/winduni.h source file). 
Either that or you could edit winduni.h directly...

Cheers
   Nick





More information about the Binutils mailing list