You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/03/19 20:56:43 UTC

win32 unresolved symbols in mp2

hi guys...

I'm trying to compile mp2 on win32 again.  this time with VC++ 6.0 on win2k.
 apache 2.0.49 compiled just fine out of the box - I did absolutely nothing
other than hit a button in VC++.

the most recent mod_perl CVS snapshot throws these errors at me:

modperl.def : error LNK2001: unresolved external symbol modperl_cmd_send_header

same for modperl_cmd_setup_env, modperl_cmd_taint_check, and modperl_cmd_warn.

at this point lots of files have compiled ok - modperl_flags,
modperl_directives, etc but it croaks on mod_perl.so.  I'm so close I can
feel it :)

anyway, all of those functions have been around for a while and they are in
the function tables, so I don't know.  if it matters, I'm using this
makepl_args.modperl

MP_DEBUG=1
MP_TRACE=1
MP_PROMPT_DEFAULT=1
MP_INST_APACHE2=1
MP_COMPAT_1X=0

with MP_AP_PREFIX on the command line.  my perl is activeperl 5.8.3 build
809 installed direct from activestate.  other than apache and VC++ it's a
fresh win2k install, updated to the latest service pack only (sp4?) - no
other security patches or upgrades (or software, really).

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Geoffrey Young wrote:
>>Yes -- the latest CVS mp2 with Apache 2.0.49 and Perl 5.8.3 fails for me 
>>unless ThreadsPerChild is increased.
>>
>>The final resolution was a fix to Apache itself by Bill Stoddard, which 
>>unfortunately didn't quite make it into 2.0.49.  It should be in 2.0.50, 
>>though, I presume:
>>http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/mpm/winnt/child.c?r1=1.32&r2=1.33
> 
> 
> ah, ok - it was up for backport but was missing a vote.  I've cast my vote,
> so hopefully it will be taken care of soonish.

ok, this has been backported, so current both HEAD and APACHE_2_0_BRANCH
should run the mod_perl test suite just fine (tested :).  please test
APACHE_2_0_BRANCH if you have a moment just to be sure we've fully resolved
the issue.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Yes -- the latest CVS mp2 with Apache 2.0.49 and Perl 5.8.3 fails for me 
> unless ThreadsPerChild is increased.
> 
> The final resolution was a fix to Apache itself by Bill Stoddard, which 
> unfortunately didn't quite make it into 2.0.49.  It should be in 2.0.50, 
> though, I presume:
> http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/mpm/winnt/child.c?r1=1.32&r2=1.33

ah, ok - it was up for backport but was missing a vote.  I've cast my vote,
so hopefully it will be taken care of soonish.

thanks!

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Steve Hay <st...@uk.radan.com>.
Randy Kobes wrote:

>On Mon, 22 Mar 2004, Geoffrey Young wrote:
>
>  
>
>> o ThreadsPerChild was set to 20, but the server wouldn't
>>run the tests unless I bumped it up.  I know this is a
>>known issue, but I thought it was resolved (though I
>>couldn't find the resolution in the archives).
>>    
>>
>
>I thought so too, for the latest Apache. When I tried it it
>worked OK - Steve, do you still have this problem?
>
Yes -- the latest CVS mp2 with Apache 2.0.49 and Perl 5.8.3 fails for me 
unless ThreadsPerChild is increased.

The final resolution was a fix to Apache itself by Bill Stoddard, which 
unfortunately didn't quite make it into 2.0.49.  It should be in 2.0.50, 
though, I presume:
http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/mpm/winnt/child.c?r1=1.32&r2=1.33

Stas also had a stop-gap solution for mp2 to workaround that bug which 
involved artificially increasing ThreadsPerChild by the number of Vhost 
listeners, but it wasn't applied since the issue is well-known and will 
be fixed soon in Apache 2.  It'll certainly be fixed in Apache long 
before "most" people start using mp2:
http://marc.theaimsgroup.com/?l=apache-modperl&m=107894518224706&w=2

(That's actually in the modperl@ list, rather than dev@, which might be 
why you couldn't find it.)

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>> o apr-util/uuid.t failed with something akin to "failed
>>to find libapr.dll" in a windows popup and "can't load
>>.../APR/APR.dll" from the command line.
> 
> 
> That needs the path to libapr.dll (C:\Apache2\bin?) to be in
> your PATH. Perhaps we should do that within the test script?

probably someplace, and the same for libaprutil.dll I would imagine.  as a
user I would expect the test suite to find everything I need to run the
tests, and apr is an integral part of apache 2.

>> o out_str_subreq_default failed, but I think it's a
>>platform newline issue, as the content looks the same to
>>me in verbose mode.  I'll try to look into it a bit more.
> 
> 
> I noticed that too, and it did look like a newline
> issue. I'll also take a look.
> 

I fiddled with some stuff but didn't see it. make me long for my days on tso
when I could just hit a button and see the bytewise characters (in EBCDIC,
but still :)

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 22 Mar 2004, Geoffrey Young wrote:

>
> > I spoke too soon - I think this is due to using
> > MP_COMPAT_1X=0 (without it, it links fine). In
> > src/modules/perl/modperl_cmd.c, taint_check, warn,
> > send_header, and setup_env are defined if MP_COMPAT_1X is
> > defined, and otherwise not, so I guess what's happening is
> > that these symbols are in the .def file, and without
> > MP_COMPAT_1X they're not being found.
>
> ok, after using the default MP_COMPAT_1X it compiled and
> tested ok.  just a few minor issues for me (if you care
> about a novice's win32 experience :)
>
>  o apr-util/uuid.t failed with something akin to "failed
> to find libapr.dll" in a windows popup and "can't load
> .../APR/APR.dll" from the command line.

That needs the path to libapr.dll (C:\Apache2\bin?) to be in
your PATH. Perhaps we should do that within the test script?

>  o ThreadsPerChild was set to 20, but the server wouldn't
> run the tests unless I bumped it up.  I know this is a
> known issue, but I thought it was resolved (though I
> couldn't find the resolution in the archives).

I thought so too, for the latest Apache. When I tried it it
worked OK - Steve, do you still have this problem?

>  o out_str_subreq_default failed, but I think it's a
> platform newline issue, as the content looks the same to
> me in verbose mode.  I'll try to look into it a bit more.

I noticed that too, and it did look like a newline
issue. I'll also take a look.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> I noticed that too that not everything got installed under
> Apache2/ in the Perl tree (although it was in the right
> place under blib/). However, I did get Apache2.pm and
> Apache-Test installed OK. Does the following help?

yup, that seemed to do the trick - Apache-Test and Apache2.pm were
installed, and everything seems to now live under Apache2/.

nice.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 22 Mar 2004, Geoffrey Young wrote:

> > other than that, all tests passed.  nice work guys.
>
> whoops, one last thing.  it seems that MP_INST_APACHE2 had the proper effect
> in my blib but that it didn't carry over to the install process.
>
> for instance, I have
>
>   C:\src\modperl-2.0\blib\lib\Apache2\Apache\Filter.pm
>
> but after 'nmake install' Filter.pm is in
>
>   C:\Perl\site\lib\Apache\Filter.pm
>
> also, Apache2.pm and all of Apache-Test only exists in my blib and was not
> installed into C:\Perl
>
> just fyi.  let me know if there are some environment things I can dump to
> help out.

I noticed that too that not everything got installed under
Apache2/ in the Perl tree (although it was in the right
place under blib/). However, I did get Apache2.pm and
Apache-Test installed OK. Does the following help?

=============================================================
Index: lib/ModPerl/MM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v
retrieving revision 1.31
diff -u -r1.31 MM.pm
--- lib/ModPerl/MM.pm	4 Mar 2004 06:01:06 -0000	1.31
+++ lib/ModPerl/MM.pm	24 Mar 2004 06:16:50 -0000
@@ -90,7 +90,7 @@
     if (build_config('MP_INST_APACHE2')) {
         while (my($k,$v) = each %$hash) {
             delete $hash->{$k};
-            $k =~ s:/Apache2$::;
+            $k =~ s{[/\\:]Apache2$}{};
             $hash->{$k} = $v;
         }
     }
================================================================

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

> other than that, all tests passed.  nice work guys.

whoops, one last thing.  it seems that MP_INST_APACHE2 had the proper effect
in my blib but that it didn't carry over to the install process.

for instance, I have

  C:\src\modperl-2.0\blib\lib\Apache2\Apache\Filter.pm

but after 'nmake install' Filter.pm is in

  C:\Perl\site\lib\Apache\Filter.pm

also, Apache2.pm and all of Apache-Test only exists in my blib and was not
installed into C:\Perl

just fyi.  let me know if there are some environment things I can dump to
help out.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> I spoke too soon - I think this is due to using
> MP_COMPAT_1X=0 (without it, it links fine). In
> src/modules/perl/modperl_cmd.c, taint_check, warn,
> send_header, and setup_env are defined if MP_COMPAT_1X is
> defined, and otherwise not, so I guess what's happening is
> that these symbols are in the .def file, and without
> MP_COMPAT_1X they're not being found.

ok, after using the default MP_COMPAT_1X it compiled and tested ok.  just a
few minor issues for me (if you care about a novice's win32 experience :)

 o apr-util/uuid.t failed with something akin to "failed to find libapr.dll"
in a windows popup and "can't load .../APR/APR.dll" from the command line.

 o ThreadsPerChild was set to 20, but the server wouldn't run the tests
unless I bumped it up.  I know this is a known issue, but I thought it was
resolved (though I couldn't find the resolution in the archives).

 o out_str_subreq_default failed, but I think it's a platform newline issue,
as the content looks the same to me in verbose mode.  I'll try to look into
it a bit more.

other than that, all tests passed.  nice work guys.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>I spoke too soon - I think this is due to using
>>MP_COMPAT_1X=0 (without it, it links fine). In
>>src/modules/perl/modperl_cmd.c, taint_check, warn,
>>send_header, and setup_env are defined if MP_COMPAT_1X is
>>defined, and otherwise not, so I guess what's happening is
>>that these symbols are in the .def file, and without
>>MP_COMPAT_1X they're not being found.
> 
> 
> oh, geez, I probably should have spotted that.  sorry.
> 
> 
>>Perhaps what could be done is if MP_COMPAT_1X isn't defined
>>that these symbols could be just noops? Otherwise, it should
>>be possible within ModPerl::WrapXS to change how the def
>>file is written, depending on the flags being passed in, but
>>this would be messier.
> 
> 
> well, I suspect that the former is probably undesirable - part of the reason
> for using the ifdef is to keep the symbol table small, right?
> 
> as for the latter solution, I had no idea how that .def file was generated.
>  but I recall trying to carry over MP_* args into ModPerl::Code and it was a
> mess, but that was a long time ago.  so maybe defining the functions as
> noops is the way to go.  do you think other platforms will have the same
> issues, or can we just define them as noops ifdef win32?

yes, I agree that we don't want to blow up a list of symbols if they aren't used.

A slick solution could include another tag for tables .pm format to include an 
optional hash key (MP_COMPAT_1X) for each such function entry, and have 
ModPerl::Code generate those entries only if MP_COMPAT_1X=1.

A quick and dirty solution is to hardcoded a list of these functions and 
exclude them from .def if MP_COMPAT_1X=1. I'd go with this one, as we probably 
won't have any new functions added in that area.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> I spoke too soon - I think this is due to using
> MP_COMPAT_1X=0 (without it, it links fine). In
> src/modules/perl/modperl_cmd.c, taint_check, warn,
> send_header, and setup_env are defined if MP_COMPAT_1X is
> defined, and otherwise not, so I guess what's happening is
> that these symbols are in the .def file, and without
> MP_COMPAT_1X they're not being found.

oh, geez, I probably should have spotted that.  sorry.

> 
> Perhaps what could be done is if MP_COMPAT_1X isn't defined
> that these symbols could be just noops? Otherwise, it should
> be possible within ModPerl::WrapXS to change how the def
> file is written, depending on the flags being passed in, but
> this would be messier.

well, I suspect that the former is probably undesirable - part of the reason
for using the ifdef is to keep the symbol table small, right?

as for the latter solution, I had no idea how that .def file was generated.
 but I recall trying to carry over MP_* args into ModPerl::Code and it was a
mess, but that was a long time ago.  so maybe defining the functions as
noops is the way to go.  do you think other platforms will have the same
issues, or can we just define them as noops ifdef win32?

--Geoff




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 20 Mar 2004, Randy Kobes wrote:

> On Fri, 19 Mar 2004, Geoffrey Young wrote:
>
> > the most recent mod_perl CVS snapshot throws these errors at me:
> >
> > modperl.def : error LNK2001: unresolved external symbol
> > modperl_cmd_send_header
> >
> > same for modperl_cmd_setup_env, modperl_cmd_taint_check,
> > and modperl_cmd_warn.
> >
> > at this point lots of files have compiled ok - modperl_flags,
> > modperl_directives, etc but it croaks on mod_perl.so.  I'm so close I can
> > feel it :)
> >
> > anyway, all of those functions have been around for a while and they are in
> > the function tables, so I don't know.  if it matters, I'm using this
> > makepl_args.modperl
> >
> > MP_DEBUG=1
> > MP_TRACE=1
> > MP_PROMPT_DEFAULT=1
> > MP_INST_APACHE2=1
> > MP_COMPAT_1X=0
> >
> > with MP_AP_PREFIX on the command line.  my perl is activeperl 5.8.3 build
> > 809 installed direct from activestate.  other than apache and VC++ it's a
> > fresh win2k install, updated to the latest service pack only (sp4?) - no
> > other security patches or upgrades (or software, really).
>
> Unfortunately, also with the cvs mp2, activeperl 5.8.3 and
> Apache/2.0.49, I don't see those errors.

I spoke too soon - I think this is due to using
MP_COMPAT_1X=0 (without it, it links fine). In
src/modules/perl/modperl_cmd.c, taint_check, warn,
send_header, and setup_env are defined if MP_COMPAT_1X is
defined, and otherwise not, so I guess what's happening is
that these symbols are in the .def file, and without
MP_COMPAT_1X they're not being found.

Perhaps what could be done is if MP_COMPAT_1X isn't defined
that these symbols could be just noops? Otherwise, it should
be possible within ModPerl::WrapXS to change how the def
file is written, depending on the flags being passed in, but
this would be messier.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: win32 unresolved symbols in mp2

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 19 Mar 2004, Geoffrey Young wrote:

> hi guys...
>
> I'm trying to compile mp2 on win32 again.  this time with VC++ 6.0 on win2k.
>  apache 2.0.49 compiled just fine out of the box - I did
> absolutely nothing other than hit a button in VC++.

Too bad Unix isn't as advanced :)

> the most recent mod_perl CVS snapshot throws these errors at me:
>
> modperl.def : error LNK2001: unresolved external symbol
> modperl_cmd_send_header
>
> same for modperl_cmd_setup_env, modperl_cmd_taint_check,
> and modperl_cmd_warn.
>
> at this point lots of files have compiled ok - modperl_flags,
> modperl_directives, etc but it croaks on mod_perl.so.  I'm so close I can
> feel it :)
>
> anyway, all of those functions have been around for a while and they are in
> the function tables, so I don't know.  if it matters, I'm using this
> makepl_args.modperl
>
> MP_DEBUG=1
> MP_TRACE=1
> MP_PROMPT_DEFAULT=1
> MP_INST_APACHE2=1
> MP_COMPAT_1X=0
>
> with MP_AP_PREFIX on the command line.  my perl is activeperl 5.8.3 build
> 809 installed direct from activestate.  other than apache and VC++ it's a
> fresh win2k install, updated to the latest service pack only (sp4?) - no
> other security patches or upgrades (or software, really).

Unfortunately, also with the cvs mp2, activeperl 5.8.3 and
Apache/2.0.49, I don't see those errors. And I tried it with
and without MP_DEBUG. Does doing an 'nmake clean' and then
reconfiguring help?

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org