Re: [Module::Build] have_c_compiler uncovers Windoze bug
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2003-11-29 10:57:02
|
On 10/30/2003 9:36 PM, Randy W. Sims wrote:
> Hi Ken,
>
> Version 1.220 of M::B::Base.pm uncovered a bug. On Windows, an
> executable requires different options to the linker than a dynamic
> library. Currently link_c() is configured strictly to produce libraries.
> A quick and perhaps naive fix is to introduce an optional paramater to
> link_c() to indicate the desired type of the output file. But, I want to
Here is a tmp patch to fix have_c_compiler(). This is to fullfill what
the prophet Ken spoke to Yves and all of module-authors saying:
"This is actually an unfortunate bug in version 0.21 on Win32. Other
previous versions have worked fine, and I believe this specific issue
has already been fixed in CVS."
Actually, one major issue was already fixed in CVS. This is a fix for
the only remaining major issue that I'm aware of (for MSWin32). This fix
is ugly as sin. I probably should have wrote special overrides of
have_c_compiler() for each of the compilers on MSWin32 that would
manually invoke the compiler and linker (i.e. not use compile_c() &
link_c()), but this solution should work for every platform/toolset for now.
There is, however, a small problem:
C:\devel\perl\bin\perl.exe Build.PL
Checking whether your kit is complete...
Looks good
Creating new 'Build' script for 'XSTest' version '0.01'
ok 1
ok 2
lib\XSTest.pm -> blib\lib\XSTest.pm
lib\XSTest.xs -> lib\XSTest.c
Generating script 'lib\XSTest.ccs'
cl -c @"lib\XSTest.ccs" -Fo"lib\XSTest.obj" "lib\XSTest.c"
XSTest.c
XSTest.xs(10) : warning C4129: 'X' : unrecognized character escape sequence
XSTest.xs(13) : warning C4129: 'X' : unrecognized character escape sequence
ExtUtils::Mkbootstrap::Mkbootstrap('lib\XSTest')
ExtUtils::Mksymlists::Mksymlists('lib\XSTest')
This is due to a problem in ExtUtils::ParseXS. EU::ParseXS generates
lines like the following in the 'C' file:
#line 20 "lib\XSTest.c"
The backslash/Win32 dir separator in that string should be translated to
a forward slash or double backslash. This is not a fatal error; it's
just an annoying warning.
Randy.
|