Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 30 Apr 2001 15:43:10 -0400 (Eastern Daylight Time) From: Jim Hall To: "Charles S. Wilson" cc: , Subject: Re: Building PERL modules [Was: Re: Any resolution to win32.h problem?] In-Reply-To: <3AE9EA76.8B6B26F6@ece.gatech.edu> Message-ID: X-X-Sender: jhall AT gotham DOT east DOT sun DOT com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 -DUSEIMPORT 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? - Does anyone know how to tell perl was compiled, or what directory structure it is looking for. - will the patch below fix the problem? - I am sure once I move win32.h into the CORE dir, it will complain about something else. Any pointers would be great? On Fri, 27 Apr 2001, Charles S. Wilson wrote: > Jim Hall wrote: > > > > > Seems to me the solution proposed was the #ifdef mentioned below. Did you > > > try that? Its not at all clear to me that win32.h and windows.h from the > > > w32api package are supposed to be the same thing (as your symlink suggestion > > > implies). I'm definitely left with the impression that these are two > > > completely different files so I don't see that the symlink would be a > > > reasonable solution in that case. > > > > No, the win32.h that perl wants is NOT the same as the windows.h file in > w32api. Also, perl's win32.h file shouldn't be copied into /usr/include > 'cause that really pollutes the namespace (the file *should* be called > something like perl_win32.h, but that would take a lot of patching and > rebuilding of perl...) > > > > What FAQ entry suggests that Cygwin includes win32.h? > > > > I quote the following - but I don't get it: > > > > Why can't we redistribute Microsoft's Win32 headers? > > Subsection 2.d.f of the `Microsoft Open Tools License agreement' looks > > like it says that one may not "permit further redistribution of the > > Redistributables to their end users". We take this to mean that we can > > give them to you, but you can't give them to anyone else, which is > > something that Cygnus (err... Red Hat) can't agree to. Fortunately, we > > have our own Win32 headers which are pretty complete. > > > > this may have nothing to do with what my problem is. > > Nope. It doesn't. > > > > > So in the original mail: > > > > >That's "win32.h", not . There's a file in > > >/win32/win32.h, which is probably copied up to the toplevel > > >during a win32-native configure. (I'm just guessing here) > > > > I did not download the source for perl is this what is holding me up? If I > > download it, what would be the top level dir? /usr/include/ or ? > > Well, in my original message, top level == . However, you > SHOULD be able to build perl add-ons even if you don't have the perl > source. Perhaps perl needs to include win32.h in its installdir (e.g. > /usr/lib/perl5/5.6.1/cygwin/CORE/ *) > > BUT I don't think so. I *think* that the perl5-porters, or Eric within > his build for cygwin if perl5-porters do not, should include the > following patch: > > ------- begin clip ---------- > --- 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 */ > #endif /* USE_THREADS || USE_ITHREADS */ > > -#ifdef WIN32 > +#if defined(WIN32) && !defined(__CYGWIN__) > # include "win32.h" > #endif > > ------ end clip -------------- > > You can also, I *THINK*, apply this patch to the perl.h in > /usr/lib/perl5/5.6.1/cygwin/CORE/ without ill effect. > > --Chuck > -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple