Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Status of ActivePerl in CVS

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


matt at sergeant

Aug 23, 2000, 11:42 AM

Post #1 of 17 (3242 views)
Permalink
Status of ActivePerl in CVS

I have a couple of spare tuits tonight and was wondering what the status
of mod_perl is on ActivePerl? Is there any chance of getting it to work -
I hear it compiles now... I'm talking about activePerl 5.6, not the
PERL_OBJECT monstrosity that is 5.5, btw...

--
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


randy at theoryx5

Aug 23, 2000, 12:42 PM

Post #2 of 17 (3133 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Wed, 23 Aug 2000, Matt Sergeant wrote:

> I have a couple of spare tuits tonight and was wondering what the status
> of mod_perl is on ActivePerl? Is there any chance of getting it to work -
> I hear it compiles now... I'm talking about activePerl 5.6, not the
> PERL_OBJECT monstrosity that is 5.5, btw...

That's true that mod_perl-1.24 now compiles on activePerl 5.6 - I
seem to recall little or no changes to the mod_perl sources were needed.
However, I couldn't get it to run, but didn't have a lot of
time then trying to find out why. Perhaps some of the changes in
the latest activePerl might help, which fix some of the bugs in the
original 5.6 sources that I used - I'll try that and see too. It would
certainly be nice to get this to work, especially in the context of
preparation for apache/mod_perl 2.

best regards,
randy kobes


matt at sergeant

Aug 29, 2000, 11:38 PM

Post #3 of 17 (3171 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Tue, 29 Aug 2000, Doug MacEachern wrote:

> has anybody tried the patch that sarathy posted?

Where did he post it to?

--
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


cholet at logilune

Aug 30, 2000, 1:16 AM

Post #4 of 17 (3169 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

> > has anybody tried the patch that sarathy posted?
>
> Where did he post it to?
>
> --
> <Matt/>

he posted it to the modperl list a few days ago, here it is:

----- Original Message -----
From: "Gurusamy Sarathy" <gsar [at] ActiveState>
To: <craig.davidson [at] nuasis>
Cc: <bugs [at] ActiveState>; <ActivePerl-Bugs [at] ActiveState>; <modperl [at] apache>
Sent: Friday, August 25, 2000 11:39 PM
Subject: Re: mod_perl for Apache to work with ActivePerl (APR#816)


> On Tue, 18 Jul 2000 11:21:15 PDT, craig.davidson [at] nuasis wrote:
> >Full_Name:
> >Version: ActivePerl 616
> >OS: Windows NT 4.0 SP 4 or lower
> >Submission from: (NULL) (155.229.70.9)
> >
> >
> >is there a way to get mod_perl for Apache to work with ActivePerl?
>
> mod_perl apparently doesn't know anything about ithreads. This
> patch makes it build and "work" for me, but I haven't tested it
> for more than 20 seconds. It is possible that similar treatment
> is needed for other callbacks that my 20-seconds worth of testing
> did not trigger. :-)
>
> Note that the patch should NOT be applied as is. A #ifdef USE_ITHREADS
> guard is needed around the new code. Sorry I don't have time to
> make a more complete patch.
>
> HTH,
>
>
> Sarathy
> gsar [at] ActiveState
> -----------------------------------8<-----------------------------------
> --- Leak/Leak.xs.dist Wed Aug 02 18:33:34 2000
> +++ Leak/Leak.xs Wed Aug 02 18:57:38 2000
> @@ -121,7 +121,7 @@
> {
> char *state = lookup((struct hash_s **)p, sv, t_new);
> if (state != t_old) {
> - fprintf(stderr, "%s %p : ", state ? state : t_new, sv);
> + PerlIO_printf(PerlIO_stderr(), "%s %p : ", state ? state : t_new, sv);
> sv_dump(sv);
> }
> return hwm+1;
> --- src/modules/perl/mod_perl.c.dist Wed Aug 02 18:33:34 2000
> +++ src/modules/perl/mod_perl.c Thu Aug 03 13:02:47 2000
> @@ -735,9 +735,10 @@
> perl_tainting_set(s, cls->PerlTaintCheck);
> (void)GvSV_init("Apache::__SendHeader");
> (void)GvSV_init("Apache::__CurrentCallback");
> +#if 0
> if (ap_configtestonly)
> GvSV_setiv(GvSV_init("Apache::Server::ConfigTestOnly"), TRUE);
> -
> +#endif
> Apache__ServerReStarting(FALSE); /* just for -w */
> Apache__ServerStarting_on();
>
> @@ -861,10 +862,19 @@
> dPPDIR;
> dPPREQ;
> dTHR;
> - GV *gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
> + GV *gv;
> +
> + dTHX;
> +
> + if (!aTHX) {
> + PERL_SET_CONTEXT(perl);
> + }
>
> (void)acquire_mutex(mod_perl_mutex);
> -
> +
> + gv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
> +
> +
> #if 0
> /* force 'PerlSendHeader On' for sub-requests
> * e.g. Apache::Sandwich
> @@ -1310,6 +1320,10 @@
> I32 i, do_clear=FALSE;
> SV *sub, **svp;
> int hook_len = strlen(hook);
> + dTHX;
> +
> + if (!aTHX)
> + PERL_SET_CONTEXT(perl);
>
> if(handlers == Nullav) {
> if(hv_exists(stacked_handlers, hook, hook_len)) {
> End of Patch.


randy at theoryx5

Aug 31, 2000, 9:44 PM

Post #5 of 17 (3178 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Tue, 29 Aug 2000, Doug MacEachern wrote:

> has anybody tried the patch that sarathy posted?
>

Hi,
It seems to work ... (!) On Win98 and using ActiveState's latest
build (616) with the latest cvs mod_perl-1.24 source, VC++ 6,
and a fresh apache_1.3.12, the compilation went without
warnings, and the server started fine (I applied the patches
just as given). I'm not sure about the mod_perl tests, as
there's some issues with Win98 and this build that I'm not
sure about (independent of mod_perl), but some Apache::Registry
scripts worked fine, and a simple Apache::Hello handler also worked.
I'll test it further, but I thought I'd make it available
first - in ftp://theoryx5.uwinnipeg.ca/pub/other/ppd/,
there's mod_perl.ppd, mod_perl.tar.gz, ApacheModulePerl.dll,
httpd.conf-perl, and install.txt. Supposedly the mod_perl
stuff can be installed within ppm as
install ftp://theoryx5.uwinnipeg.ca/pub/other/ppd/mod_perl.ppd
although if that doesn't work, if you grab the .ppd and .tar.gz
files, put them in the same directory, and type
ppm install mod_perl.ppd
that should work. If I didn't made up the ppd file right,
the install.txt file is a dialogue of 'nmake install' on
my system (I put Perl in C:\Perl) to check. Finally, the
ApacheModulePerl.dll file should be placed in C:\Apache\modules.
httpd.conf-perl is a simple apache .conf for some mod_perl stuff.
As I said, I haven't tested this out a lot yet, but perhaps
if there's no obvious and immediate problems, we could mention
it on the list, to get wider testing.

best regards,
randy


randy at theoryx5

Aug 31, 2000, 9:54 PM

Post #6 of 17 (3168 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Thu, 31 Aug 2000, Randy Kobes wrote:

[ .. ]
> Supposedly the mod_perl
> stuff can be installed within ppm as
> install ftp://theoryx5.uwinnipeg.ca/pub/other/ppd/mod_perl.ppd

I should mention - if ftp doesn't work, this is also available as

install http://theoryx5.uwinnipeg.ca/pub/other/ppd/mod_perl.ppd

best regards,
randy


randy at theoryx5

Aug 31, 2000, 10:41 PM

Post #7 of 17 (3142 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Thu, 31 Aug 2000, Doug MacEachern wrote:

> excellent news, thank you randy!!! i've committed the patch to cvs, i'm
> thrilled we no longer have to punt ActivePerl users :)
>

That is great news ... I should expand on the mod_perl tests I tried.
On Win98 I have to set HARNESS_IGNORE_EXITCODE=1 for Test::Harness
to work (with ActivePerl), as $? seems broken with the ActivePerl/Win9?
combination. When I do this, all tests pass except for modules/perlrun.t,
which fails because PerlRun can't locate dirty-lib in @INC. I'll look
at this also some more, as well as some packages like Embperl, Mason,
and ASP. But this is certainly a quantum leap (or two) ahead ...

best regards,
randy


richter at ecos

Aug 31, 2000, 11:03 PM

Post #8 of 17 (3132 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

Hi Randy,

> I'll look
> at this also some more, as well as some packages like Embperl, Mason,
> and ASP. But this is certainly a quantum leap (or two) ahead ...
>

The newest Embperl version 1.3b5 contains some code to work with a threaded
Perl 5.6.0, maybe this addtions are enought to get Embperl working also with
ActiveState (because that are the same macros). I don't have ActiveState
Perl installed here, but if you find a little free time you could give it a
try. I am very happy about any feedback.

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter [at] ecos Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------


matt at sergeant

Aug 31, 2000, 11:52 PM

Post #9 of 17 (3176 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Fri, 1 Sep 2000, Randy Kobes wrote:

> On Thu, 31 Aug 2000, Doug MacEachern wrote:
>
> > excellent news, thank you randy!!! i've committed the patch to cvs, i'm
> > thrilled we no longer have to punt ActivePerl users :)
> >
>
> That is great news ... I should expand on the mod_perl tests I tried.
> On Win98 I have to set HARNESS_IGNORE_EXITCODE=1 for Test::Harness
> to work (with ActivePerl), as $? seems broken with the ActivePerl/Win9?
> combination. When I do this, all tests pass except for modules/perlrun.t,
> which fails because PerlRun can't locate dirty-lib in @INC. I'll look
> at this also some more, as well as some packages like Embperl, Mason,
> and ASP. But this is certainly a quantum leap (or two) ahead ...

I'll be testing on NT and also testing AxKit today. Very exciting news for
my business!

--
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


randy at theoryx5

Aug 31, 2000, 11:54 PM

Post #10 of 17 (3174 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Fri, 1 Sep 2000, Gerald Richter wrote:

> Hi Randy,
>
> > I'll look
> > at this also some more, as well as some packages like Embperl, Mason,
> > and ASP. But this is certainly a quantum leap (or two) ahead ...
> >
>
> The newest Embperl version 1.3b5 contains some code to work with a threaded
> Perl 5.6.0, maybe this addtions are enought to get Embperl working also with
> ActiveState (because that are the same macros). I don't have ActiveState
> Perl installed here, but if you find a little free time you could give it a
> try. I am very happy about any feedback.
>
> Gerald
>

Hi Gerald,
I'll definitely do that ... I just tried it, and there were
a few errors in the build. One was a conflict with lstat,
which can be handled the same way (within ep.h) as some other
functions like uid_t, gid_t, ... However, after that there's
some problems with including Win32's malloc.h and signal.h - I'll
look at this tomorrow (it's late here), and get back to you then.

best regards,
randy


richter at ecos

Sep 1, 2000, 12:13 AM

Post #11 of 17 (3168 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

Hi Randy,

>I'll
> look at this tomorrow (it's late here), and get back to you then.
>

Great! If you need any help let me know. My free time is very very limited
at the moment, but when I find some free time I could also install
ActiveState here and test it out.

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter [at] ecos Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------


randy at theoryx5

Sep 1, 2000, 12:44 AM

Post #12 of 17 (3177 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Fri, 1 Sep 2000, Matt Sergeant wrote:

> I'll be testing on NT and also testing AxKit today. Very exciting news for
> my business!

I also looked at AxKit ... Some juggling has to be done to
get the header files in place (I just did it manually to start
with). Then, the define flags /D "_WINSOCK2API_" and
/D "_MSWSOCK_" have to be added for Win32 in Makefile.PL.
There's a warning about lstat (as with Embperl) - this can
be handled, as with mod_perl, as something like what is
done in mod_perl's apache_inc.h for Win32. However, there's
then a problem similar to Embperl with including Win32's
malloc.h and signal.h ... I'll also look at this tomorrow.

best regards,
randy


richter at ecos

Sep 1, 2000, 11:22 AM

Post #13 of 17 (3166 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

Hi Randy,

> I managed to build Embperl with ActivePerl - like Matt mentioned,
> adding _WINDOWS to the defines and taking out
> -D_PERL_IMPLICIT_SYS from the defines gets rid of the
> problems with malloc.h and signal.h.

Great!

> However, the tests fail -
> I've attached the dialogue of 'nmake test'. This may be related to
> some warnings in the build, which I've also attached. I know you
> don't have a lot of time, but if something in the warnings rings
> a bell, let me know - I'll look at this later today.
>

Of course I take the time to help you. I am very interested that Embperl
works with ActiveState. The problem is the following warning:

epmain.c(325) : warning C4113: 'int (__cdecl *)(struct sv *,struct magic *)'
differs in parameter lists from 'int (__cdecl *)(struct interpreter *,struct
sv *,struct magic *)'

The reason lies in the line 55 and the following function defines in
epmacro.h:

int EMBPERL_mgGet##name (pTHX_ SV * pSV, MAGIC * mg) \

For a threaded Perl 5.6.0 pTHX_ gets declared correct so that it takes the
Perl context. For ActiveState this should be the same (see man perlguts at
the end), but as the warning shows us, it isn't. To work correctly pTHX_
must be defined as " struct interpreter * ". I guess there is some define
that is missing, which would cause the right #if in perl.h where all this
stuff is setup.

Maybe it would be enought to add a

#define pTHX_ struct interpreter *

at the top of epnames.h.

Hope this helps a little bit (I send a copy to dev [at] perl, maybe
somebody there has more ideas)

Gerald

P.S. You and Matt talked about a lot of objects that you had to add manualy.
What exactly was neccessary to do? Maybe I have an idea how to fix this,
because I had played a some time around when I made the first version of
Embperl to compile on Win32.


randy at theoryx5

Sep 1, 2000, 11:31 AM

Post #14 of 17 (3179 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Fri, 1 Sep 2000, Gerald Richter wrote:

[ .. ]
> The problem is the following warning:
> epmain.c(325) : warning C4113: 'int (__cdecl *)(struct sv *,struct magic *)'
> differs in parameter lists from 'int (__cdecl *)(struct interpreter *,struct
> sv *,struct magic *)'
>
> The reason lies in the line 55 and the following function defines in
> epmacro.h:
>
> int EMBPERL_mgGet##name (pTHX_ SV * pSV, MAGIC * mg) \
>
> For a threaded Perl 5.6.0 pTHX_ gets declared correct so that it takes the
> Perl context. For ActiveState this should be the same (see man perlguts at
> the end), but as the warning shows us, it isn't. To work correctly pTHX_
> must be defined as " struct interpreter * ". I guess there is some define
> that is missing, which would cause the right #if in perl.h where all this
> stuff is setup.
>
> Maybe it would be enought to add a
>
> #define pTHX_ struct interpreter *
>
> at the top of epnames.h.
>
> Hope this helps a little bit (I send a copy to dev [at] perl, maybe
> somebody there has more ideas)

Hi Gerald,
I'll try that tonight - thanks.

> P.S. You and Matt talked about a lot of objects that you had to add manualy.
> What exactly was neccessary to do? Maybe I have an idea how to fix this,
> because I had played a some time around when I made the first version of
> Embperl to compile on Win32.

For me, this had to do with some missing symbols in building
libapreq of a while ago (although as Matt mentioned, he didn't
find this recently for libapreq, so things may have changed
since I tried it). However, there are some missing in AxKit.
These symbols don't appear in ApacheModulePerl.lib, as built
by mod_perl, so what seems to be required is to link in the
*.obj files of the mod_perl build individually. It does
seem a bit strange ... Did you initially find a similar
problem with Embperl?

best regards,
randy


matt at sergeant

Sep 1, 2000, 11:48 AM

Post #15 of 17 (3172 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

On Fri, 1 Sep 2000, Gerald Richter wrote:

> P.S. You and Matt talked about a lot of objects that you had to add manualy.
> What exactly was neccessary to do? Maybe I have an idea how to fix this,
> because I had played a some time around when I made the first version of
> Embperl to compile on Win32.

For some reason ApacheModulePerl.lib doesn't contain the symbols that are
needed by AxKit for its compiled directives. So as usual for Win32
programming I ended up searching for the strings, and every time I found
one I added in the .obj file that it was found in. It turned out I needed
every single *.obj file in modperl/src/modules/ApacheModulePerl/Release
(assuming you build a Release, not debug build). My assumption is that
either the symbols go amiss in building the ApacheModulePerl.lib somehow,
or they get mangled somehow (I didn't look too deeply into it, as I don't
have a monitor for my NT box so it gets used over VNC, which is painful
enough just getting things to work...).

--
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


richter at ecos

Sep 1, 2000, 12:00 PM

Post #16 of 17 (3175 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

> For me, this had to do with some missing symbols in building
> libapreq of a while ago (although as Matt mentioned, he didn't
> find this recently for libapreq, so things may have changed
> since I tried it). However, there are some missing in AxKit.
> These symbols don't appear in ApacheModulePerl.lib, as built
> by mod_perl, so what seems to be required is to link in the
> *.obj files of the mod_perl build individually. It does
> seem a bit strange ... Did you initially find a similar
> problem with Embperl?
>

You have to tell the linker which symbol should be exported by the DLL (Unix
exports all symbols per default, while Win32 exports _no_ symbols by
default). I had make a quick broswe thru the mod_perl sources and the only
symbol that I find that is exported is

extern module MODULE_VAR_EXPORT perl_module;

in mod_perl.h and this would make sense, because Apache only needs this one
data structure which contains all entry points to mod_perl.

The macro MODULE_VAR_EXPORT is defined by Apache in src\os\win32\os.h, there
are more macros defined for exports.

If other modules, like AxKit requires more symbols, these symboles must be
exported by mod_perl. This can either be done by defining them in a .def
file (like for Symbol.dll) or by adding the correct declaration in the .h
file. (like API_EXPORT(type), where type is the return type of the function)

Hope this helps

Gerald


richter at ecos

Sep 1, 2000, 12:02 PM

Post #17 of 17 (3168 views)
Permalink
Re: Status of ActivePerl in CVS [In reply to]

> For some reason ApacheModulePerl.lib doesn't contain the symbols that are
> needed by AxKit for its compiled directives. So as usual for Win32
> programming I ended up searching for the strings, and every time I found
> one I added in the .obj file that it was found in. It turned out I needed
> every single *.obj file in modperl/src/modules/ApacheModulePerl/Release
> (assuming you build a Release, not debug build). My assumption is that
> either the symbols go amiss in building the ApacheModulePerl.lib somehow,
> or they get mangled somehow (I didn't look too deeply into it, as I don't
> have a monitor for my NT box so it gets used over VNC, which is painful
> enough just getting things to work...).
>
Unlike Unix, Win32 does not export any symbols by default in a dll. So it's
not suprising that the symbols are missing. See my other mail for more
details.

Gerald

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.