Mailing List Archive

Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit)
I am trying to compile Modperl 2.0.9 on windows with Strawberry Perl 5.20.2
and Apache 2.2.31 (all 64 bit)
Preferable would be to use Apache 2.4 but that might be a bridge to far.

I use the binary version from Apachelounge.

My first question is, is this supported ?
and can it be done with the Mingw32 environment that comes with Strawberry
Perl ?

When I try to do so, at I first run into the problem with not finding the
ap_config_auto.h file

When I look in the apache include file ap_config.h there is a line

#if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__)
#include "ap_config_auto.h"
#include "ap_config_layout.h"
#endif

What I found was that the ap_config_auto was created by the Configure script
that runs on linux when building Apache.
On Windows this include file is not available.

When I remove '|| defined(__MINGW32__)' and continue I can run the Make file
without errors.

If I run dmake it starts compiling and after some build modules I get errors
saying:

mod_perl.lo:mod_perl.c:(.text+0x1a9): undefined reference to
`__imp_apr_dynamic_fn_register'
mod_perl.lo:mod_perl.c:(.text+0x1d3): undefined reference to
`__imp_ap_server_config_defines'
mod_perl.lo:mod_perl.c:(.text+0x1dc): undefined reference to
`__imp_apr_array_push'
mod_perl.lo:mod_perl.c:(.text+0x1ef): undefined reference to
`__imp_apr_pstrdup'
mod_perl.lo:mod_perl.c:(.text+0x20a): undefined reference to
`__imp_ap_hook_pre_config'
mod_perl.lo:mod_perl.c:(.text+0x21f): undefined reference to
`__imp_ap_hook_open_logs'
mod_perl.lo:mod_perl.c:(.text+0x237): undefined reference to
`__imp_ap_hook_post_config'
mod_perl.lo:mod_perl.c:(.text+0x23e): undefined reference to
`__imp_ap_hook_handler'
mod_perl.lo:mod_perl.c:(.text+0x26d): undefined reference to
`__imp_ap_hook_insert_filter'
mod_perl.lo:mod_perl.c:(.text+0x29c): undefined reference to
`__imp_ap_register_output_filter'
...

And some more of these when building mod_perl.so

And then ??

Can it be that the mingw32 environment is not working with the .dll or .lib
files from Apache ?
Is my environment not correct, do I need to use the MSYS2 shell ?

Sorry many question, any help is welcome.

--
Thomas den Braber
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
On 25.09.2015 17:13, Thomas den Braber wrote:
> I am trying to compile Modperl 2.0.9 on windows with Strawberry Perl 5.20.2
> and Apache 2.2.31 (all 64 bit)
> Preferable would be to use Apache 2.4 but that might be a bridge to far.
>
> I use the binary version from Apachelounge.
>
> My first question is, is this supported ?
> and can it be done with the Mingw32 environment that comes with Strawberry
> Perl ?
>
> When I try to do so, at I first run into the problem with not finding the
> ap_config_auto.h file
>
> When I look in the apache include file ap_config.h there is a line
>
> #if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__)
> #include "ap_config_auto.h"
> #include "ap_config_layout.h"
> #endif
>
> What I found was that the ap_config_auto was created by the Configure script
> that runs on linux when building Apache.
> On Windows this include file is not available.
>
> When I remove '|| defined(__MINGW32__)' and continue I can run the Make file
> without errors.
>
> If I run dmake it starts compiling and after some build modules I get errors
> saying:
>
> mod_perl.lo:mod_perl.c:(.text+0x1a9): undefined reference to
> `__imp_apr_dynamic_fn_register'
> mod_perl.lo:mod_perl.c:(.text+0x1d3): undefined reference to
> `__imp_ap_server_config_defines'
> mod_perl.lo:mod_perl.c:(.text+0x1dc): undefined reference to
> `__imp_apr_array_push'
> mod_perl.lo:mod_perl.c:(.text+0x1ef): undefined reference to
> `__imp_apr_pstrdup'
> mod_perl.lo:mod_perl.c:(.text+0x20a): undefined reference to
> `__imp_ap_hook_pre_config'
> mod_perl.lo:mod_perl.c:(.text+0x21f): undefined reference to
> `__imp_ap_hook_open_logs'
> mod_perl.lo:mod_perl.c:(.text+0x237): undefined reference to
> `__imp_ap_hook_post_config'
> mod_perl.lo:mod_perl.c:(.text+0x23e): undefined reference to
> `__imp_ap_hook_handler'
> mod_perl.lo:mod_perl.c:(.text+0x26d): undefined reference to
> `__imp_ap_hook_insert_filter'
> mod_perl.lo:mod_perl.c:(.text+0x29c): undefined reference to
> `__imp_ap_register_output_filter'
> ...
>
> And some more of these when building mod_perl.so
>
> And then ??
>
> Can it be that the mingw32 environment is not working with the .dll or .lib
> files from Apache ?
> Is my environment not correct, do I need to use the MSYS2 shell ?
>
> Sorry many question, any help is welcome.
>

Not directly an answer, but you may want to have a look here :
http://people.apache.org/~stevehay/
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
> Not directly an answer, but you may want to have a look here :
> http://people.apache.org/~stevehay/
[http://people.apache.org/%7Estevehay/]

I am already using those, working very well but wanted to test the 2.0.9 and
better with Apache 2.4.
I also would like to be able to compile it my self.

@Steve Hay: Can you explain how you setup your build environment ?

--
Thomas den Braber
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
On 28 September 2015 at 09:44, Thomas den Braber <thomas@delos.nl> wrote:
>
>
>> Not directly an answer, but you may want to have a look here :
>> http://people.apache.org/~stevehay/
>
> I am already using those, working very well but wanted to test the 2.0.9 and
> better with Apache 2.4.
> I also would like to be able to compile it my self.
>
> @Steve Hay: Can you explain how you setup your build environment ?
>

Unfortunately, mod_perl doesn't currently support dmake builds, so
doesn't build directly with either ActivePerl or StrawberryPerl.

I hope to add dmake support in the nearish future, but in the meantime
one has to build with Visual C++/nmake (preferably (or maybe
*necessarily*? I'm not sure) with an old VC that links against the old
unversioned msvcrt.dll for compatibility with gcc binaries).

I will make new binaries for 2.0.9 soon, but want to get mod_perl
working with Perl 5.22.x first.
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
> I will make new binaries for 2.0.9 soon, but want to get mod_perl

> working with Perl 5.22.x first.

That is great I will be looking forward to it.
Will that be for Apache 2.4 or 2.2, or both ?

2.09 with Strawberry Perl 5.22 and Apache 2.4. It sound like a winner!


Thanks,

Thomas
-----Original Message-----
From: Steve Hay <steve.m.hay@googlemail.com>
To: Thomas den Braber <thomas@delos.nl>
Cc: "A. Warnier" <aw@ice-sa.com>, "modperl@perl.apache.org"
<modperl@perl.apache.org>
Date: Wed, 28 Oct 2015 13:09:44 +0000
Subject: Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit)


On 28 September 2015 at 09:44, Thomas den Braber <thomas@delos.nl
[mailto:thomas%40delos.nl]> wrote:
>
>
>> Not directly an answer, but you may want to have a look here :
>> http://people.apache.org/~stevehay/ [http://people.apache.org/~stevehay/]
>
> I am already using those, working very well but wanted to test the 2.0.9
and
> better with Apache 2.4.
> I also would like to be able to compile it my self.
>
> @Steve Hay: Can you explain how you setup your build environment ?
>

Unfortunately, mod_perl doesn't currently support dmake builds, so
doesn't build directly with either ActivePerl or StrawberryPerl.

I hope to add dmake support in the nearish future, but in the meantime
one has to build with Visual C++/nmake (preferably (or maybe
*necessarily*? I'm not sure) with an old VC that links against the old
unversioned msvcrt.dll for compatibility with gcc binaries).

I will make new binaries for 2.0.9 soon, but want to get mod_perl
working with Perl 5.22.x first.
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
On 2 November 2015 at 09:42, Thomas den Braber <thomas@delos.nl> wrote:
>> I will make new binaries for 2.0.9 soon, but want to get mod_perl
>> working with Perl 5.22.x first.
>
> That is great I will be looking forward to it.
> Will that be for Apache 2.4 or 2.2, or both ?
>
> 2.09 with Strawberry Perl 5.22 and Apache 2.4. It sound like a winner!
>
>

I will make 2.0.9 binaries for httpd-2.2 and -2.4, hopefully with both
perl-5.20 and -5.22, but the -5.22 fix isn't done yet...
RE: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
I apologize for resurrecting a long-idle thread, but I haven't been able to find any newer binaries for mod_perl than 2.0.8 for Perl 5.20.1 (from http://people.apache.org/~stevehay/). Are there newer binaries available anywhere that I just haven't been successful in locating? Ideally, I'd like to get into the mod_perl 2.0.10 / Perl 5.22 for 64bit on windows (I use the 64-bit Apache for windows from apachelounge).

Thanks,
Lewis Foster

-----Original Message-----
From: Steve Hay [mailto:steve.m.hay@googlemail.com]
Sent: Monday, November 02, 2015 8:06 AM
To: Thomas den Braber <thomas@delos.nl>
Cc: modperl@perl.apache.org
Subject: Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit)

On 2 November 2015 at 09:42, Thomas den Braber <thomas@delos.nl> wrote:
>> I will make new binaries for 2.0.9 soon, but want to get mod_perl
>> working with Perl 5.22.x first.
>
> That is great I will be looking forward to it.
> Will that be for Apache 2.4 or 2.2, or both ?
>
> 2.09 with Strawberry Perl 5.22 and Apache 2.4. It sound like a winner!
>
>

I will make 2.0.9 binaries for httpd-2.2 and -2.4, hopefully with both
perl-5.20 and -5.22, but the -5.22 fix isn't done yet...
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
There's no need to apologize -- you also pose a good question.

I couldn't find binaries, but I did find Steve Hay's name in CPAN
with a source-only downloadable 2.0.10 version, here:

https://metacpan.org/release/mod_perl

If you check the left-hand side, you should see a "Download" link
which will get you a .tar.gz file containing full sources. I could
not find any .DLL files in that archive, but upon a cursory look
there does seem to be instructions for compiling on Windows.

Since I only use mod_perl2 on Unix, I don't know anything about how
to get it compiled on Windows, and more importantly I don't have the
tools to do this with (I also couldn't get MingW to work properly,
but to be fair I also didn't spend a whole lot of time on it).

I do think, however, that it could be very beneficial to the ModPerl
project because it would probably result in more people using ModPerl
on Windows servers. In particular, the Windows binaries have always
been difficult to obtain, and I noticed this a long time ago when I
had to get it working on a few servers owned by clients that were
running Apache HTTPd on Windows 2000, Windows XP, and Windows 7.

What I think should be available in terms of binaries are 32-bit and
64-bit versions that will work with Strawberry Perl and also
ActiveState Perl (if that requires separate downloads, so be it as
long as it's available), plus any other major Perl distributions (I'm
not aware of any). And it's also important that the download include
the various "Apache2" packages (modules) in compiled form too so that
users don't have to spend time finding them (for me, Apache2::Reload
usually had to be obtained from elsewere and it wasn't always easy to
find back then; ditto for a few other modules I've since forgotten).

I don't know how difficult this is, but if it's possible to run a
Unix script that cross-compiles all of these then I'd be willing to
do that and even host it on http://www.modperl.pl/ (a web site I
started a few years ago but haven't done much with yet) for free
download by the public. I think it would be better for those files
to be available through the official mod_perl web site, however.

The bottom line is that on Unix (and Linux) it's usually not a
problem to compile mod_perl2 from sources since most Unix/Linux users
are already familiar with this, and also many flavours of Unix (and
distributions of Linux) have binary repositories that pre-compiled
software can be downloaded and installed from. With Windows, the
problem is that most users don't know how to compile code from
sources, primarily because they're accustomed to installing software
that was pre-compiled by the respective vendors, and so when they
encounter source code that must be compiled they often give up and
seek other solutions, but if they had binaries that they could just
easily copy then I suspect that there could be a lot more mod_perl2
installations running on Apache 2.4 (and 2.2) on Windows.

> I apologize for resurrecting a long-idle thread, but I haven't been able to find any newer binaries for mod_perl than 2.0.8 for Perl 5.20.1 (from http://people.apache.org/~stevehay/). Are there newer binaries available anywhere that I just haven't been successful in locating? Ideally, I'd like to get into the mod_perl 2.0.10 / Perl 5.22 for 64bit on windows (I use the 64-bit Apache for windows from apachelounge).
>
> Thanks,
> Lewis Foster
>
> -----Original Message-----
> From: Steve Hay [mailto:steve.m.hay@googlemail.com]
> Sent: Monday, November 02, 2015 8:06 AM
> To: Thomas den Braber <thomas@delos.nl>
> Cc: modperl@perl.apache.org
> Subject: Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit)
>
> On 2 November 2015 at 09:42, Thomas den Braber <thomas@delos.nl> wrote:
> >> I will make new binaries for 2.0.9 soon, but want to get mod_perl
> >> working with Perl 5.22.x first.
> >
> > That is great I will be looking forward to it.
> > Will that be for Apache 2.4 or 2.2, or both ?
> >
> > 2.09 with Strawberry Perl 5.22 and Apache 2.4. It sound like a winner!
> >
> >
>
> I will make 2.0.9 binaries for httpd-2.2 and -2.4, hopefully with both
> perl-5.20 and -5.22, but the -5.22 fix isn't done yet...
>


Randolf Richardson - randolf@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
http://www.inter-corporate.com/
Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit) [ In reply to ]
If it may help : Steve Hay was very helpful to me some time (and Apache/perl versions)
ago, building new binary versions on request. I'd suggest to drop him a line.

On 03.09.2017 19:51, Randolf Richardson wrote:
> There's no need to apologize -- you also pose a good question.
>
> I couldn't find binaries, but I did find Steve Hay's name in CPAN
> with a source-only downloadable 2.0.10 version, here:
>
> https://metacpan.org/release/mod_perl
>
> If you check the left-hand side, you should see a "Download" link
> which will get you a .tar.gz file containing full sources. I could
> not find any .DLL files in that archive, but upon a cursory look
> there does seem to be instructions for compiling on Windows.
>
> Since I only use mod_perl2 on Unix, I don't know anything about how
> to get it compiled on Windows, and more importantly I don't have the
> tools to do this with (I also couldn't get MingW to work properly,
> but to be fair I also didn't spend a whole lot of time on it).
>
> I do think, however, that it could be very beneficial to the ModPerl
> project because it would probably result in more people using ModPerl
> on Windows servers. In particular, the Windows binaries have always
> been difficult to obtain, and I noticed this a long time ago when I
> had to get it working on a few servers owned by clients that were
> running Apache HTTPd on Windows 2000, Windows XP, and Windows 7.
>
> What I think should be available in terms of binaries are 32-bit and
> 64-bit versions that will work with Strawberry Perl and also
> ActiveState Perl (if that requires separate downloads, so be it as
> long as it's available), plus any other major Perl distributions (I'm
> not aware of any). And it's also important that the download include
> the various "Apache2" packages (modules) in compiled form too so that
> users don't have to spend time finding them (for me, Apache2::Reload
> usually had to be obtained from elsewere and it wasn't always easy to
> find back then; ditto for a few other modules I've since forgotten).
>
> I don't know how difficult this is, but if it's possible to run a
> Unix script that cross-compiles all of these then I'd be willing to
> do that and even host it on http://www.modperl.pl/ (a web site I
> started a few years ago but haven't done much with yet) for free
> download by the public. I think it would be better for those files
> to be available through the official mod_perl web site, however.
>
> The bottom line is that on Unix (and Linux) it's usually not a
> problem to compile mod_perl2 from sources since most Unix/Linux users
> are already familiar with this, and also many flavours of Unix (and
> distributions of Linux) have binary repositories that pre-compiled
> software can be downloaded and installed from. With Windows, the
> problem is that most users don't know how to compile code from
> sources, primarily because they're accustomed to installing software
> that was pre-compiled by the respective vendors, and so when they
> encounter source code that must be compiled they often give up and
> seek other solutions, but if they had binaries that they could just
> easily copy then I suspect that there could be a lot more mod_perl2
> installations running on Apache 2.4 (and 2.2) on Windows.
>
>> I apologize for resurrecting a long-idle thread, but I haven't been able to find any newer binaries for mod_perl than 2.0.8 for Perl 5.20.1 (from http://people.apache.org/~stevehay/). Are there newer binaries available anywhere that I just haven't been successful in locating? Ideally, I'd like to get into the mod_perl 2.0.10 / Perl 5.22 for 64bit on windows (I use the 64-bit Apache for windows from apachelounge).
>>
>> Thanks,
>> Lewis Foster
>>
>> -----Original Message-----
>> From: Steve Hay [mailto:steve.m.hay@googlemail.com]
>> Sent: Monday, November 02, 2015 8:06 AM
>> To: Thomas den Braber <thomas@delos.nl>
>> Cc: modperl@perl.apache.org
>> Subject: Re: Compiling 2.0.9 with Strawberry Perl 5.20 on windows (64Bit)
>>
>> On 2 November 2015 at 09:42, Thomas den Braber <thomas@delos.nl> wrote:
>>>> I will make new binaries for 2.0.9 soon, but want to get mod_perl
>>>> working with Perl 5.22.x first.
>>>
>>> That is great I will be looking forward to it.
>>> Will that be for Apache 2.4 or 2.2, or both ?
>>>
>>> 2.09 with Strawberry Perl 5.22 and Apache 2.4. It sound like a winner!
>>>
>>>
>>
>> I will make 2.0.9 binaries for httpd-2.2 and -2.4, hopefully with both
>> perl-5.20 and -5.22, but the -5.22 fix isn't done yet...
>>
>
>
> Randolf Richardson - randolf@inter-corporate.com
> Inter-Corporate Computer & Network Services, Inc.
> Beautiful British Columbia, Canada
> http://www.inter-corporate.com/
>
>