[rt.cpan.org #80217] Build failure under Cygwin on Windows

[email protected] ("Daniel Dragan via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Tue Oct 16 14:21:15 2012: Request 80217 was acted upon.
Transaction: Correspondence added by BULKDD
       Queue: Win32-API
     Subject: Build failure under Cygwin on Windows
   Broken in: 0.72
    Severity: Critical
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80217 >


On Tue Oct 16 08:53:50 2012, JDHEDDEN wrote:
> If you need more information, just holler.  (And, if possible, it might 
> be good to fix those warnings.)
> 


> Makefile:444: recipe for target 
> `../blib/arch/auto/Win32/API/Callback/Callback.dll' failed
> make[1]: [../blib/arch/auto/Win32/API/Callback/Callback.dll] Error 1 
> (ignored)
> make[1]: Leaving directory `/var/perl/cpan/build/Win32-API-
> 0.72/Callback'

Why did Callback.dll fail to build? Other than the 32 to 64 cast
warnings, I dont see anything else in the compiler log.

> API.c:123:55: error: expected declaration specifiers or '...' before 
> '__int32'
> API.c: In function 'w32sv_setwstr':
> API.c:131:22: error: 'wlenparam' undeclared (first use in this function)
> API.c:131:22: note: each undeclared identifier is reported only once for 
> each function it appears in
> API.c:150:15: error: 'WC_NO_BEST_FIT_CHARS' undeclared (first use in 
> this function)

WC_NO_BEST_FIT_CHARS is defined in Cygwin
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/winnls.h?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=src
in a WINVER conditional and it also is in a WINVER conditional on Visual
C. But Win32:: has
___________________________________________________
#ifndef WC_NO_BEST_FIT_CHARS
#  define WC_NO_BEST_FIT_CHARS 0x00000400
#endif
___________________________________________________
in it. Strawberry does not keep WC_NO_BEST_FIT_CHARS in a conditional
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-headers/include/winnls.h?revision=5147&view=markup
. I'll guess Cygwin Perl does not set WINVER but native Win32 Perl does.

Strawberry defines __int3264 in
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-headers/include/basetsd.h?revision=5316&view=markup
and __int32 in
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-headers/crt/_mingw.h.in?revision=5431&view=markup
. Cygwin defines __int3264 in
http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/w32api/include/basetsd.h?rev=1.6&content-type=text/x-cvsweb-markup&cvsroot=src
but I dont have Cygwin's headers to grep to see if __int32 is defined. I
think I will try INT_PTR instead of __int3264.

Getting Win32::API working on your 32 bit with quads Cygwin will take a
couple trys since once it compiles, I bet a 32 bit with 64 ivs bug will
come up. Can you try my github version (not right now, no changes are up
right now) at https://github.com/bulk88/perl5-win32-api in the future as
part of this ticket? IDK if Cosimo has time to make new CPAN releases
which may or may not work on Cygwin, and I really wouldn't want
Win32::API to hit 1.00 any time soon.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.