This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Building PERL modules [Was: Re: Any resolution to win32.hproblem?]


perl has the paths in which it will look for headers when building
modules HARDCODED at buildtime (it's a perl thing, not a packager
thing).  The funny thing is, that path is NOT where you built perl from
--- it's somewhere in the install tree:
/usr/lib/perl5/5.6.1/cygwin/CORE/ or something like that.

You *could* copy that win32.h file from the unpacked source tree into
the magic directory, but that's a bad idea (see recent messages in this

Why is everybody so opposed to applying this SIMPLE ***ing patch to the
perl.h in /usr/lib/perl5/5.6.1/cygwin/CORE ?  Has *anybody* even tried
it -- I've seen no reports that it doesn't fix the problem...


--- perl.h.bak  Fri Apr 27 17:47:34 2001
+++ perl.h      Fri Apr 27 17:50:10 2001
@@ -1742,7 +1742,7 @@
 #  endif /* FAKE_THREADS */
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
 #  include "win32.h"

Jim Hall wrote:
> ok
> I installed the source using the "magic cygnus installer." Lo and behold
> the win32.h is there.
> It puts the file to /perl-5.6.1-1/win32/win32.h
> I try to compile the module and I still get the error:
> $ make
> gcc -c  -DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing
> LIB -O2   -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\"
> -I/usr/lib/perl5/5.6.1/cygwi
> n/CORE  API.c
> In file included from API.xs:39:
> /usr/lib/perl5/5.6.1/cygwin/CORE/perl.h:1746: win32.h: No such file or
> directory
> make: *** [API.o] Error 1
> Sooo...
> - should I put the header file into the CORE directory?

Maybe. see above.  I don't think so, but YMMV.

> - Does anyone know how to tell perl was compiled, or what directory
> structure it is looking for.

Doesn't matter.  Perl looks in its install dir for module-building
info.  See above.

> - will the patch below fix the problem?

TRY IT! on your LIVE system.  You shouldn't need to rebuild perl with
the patch, just apply it to the perl.h in cygwin/CORE/ and then try
building your modules.

> - I am sure once I move win32.h into the CORE dir, it will complain about
> something else.

No doubt.  That's why I suggested the patch above (and below, but
snipped away)

> Any pointers would be great?

Want to unsubscribe from this list?
Check out:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]