This is the mail archive of the cygwin@cygwin.com 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?]


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 <win32.h>.  There's a file in
> > ><perl-src>/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 <perl-src>?
>
> Well, in my original message, top level == <perl-src>.  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


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