You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "David E. Wheeler" <da...@kineticode.com> on 2010/04/05 20:39:17 UTC

Build Failure on Perl 5.12 RC3

Hey all,

I'm testing Perl 5.12 RC3 and ran into these errors when trying to build mod_perl 2 (mod_perl 1 built fine FWIW):

benedict ~/dev/perl/mod_perl-2.0> /usr/local/perl-5.12/bin/perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2-test MP_PROMPT_DEFAULT=1
Reading Makefile.PL args from @ARGV
   MP_AP_PREFIX = /usr/local/apache2-test
   MP_PROMPT_DEFAULT = 1
no conflicting prior mod_perl version found - good.
Configuring Apache/2.2.13 mod_perl/2.0.5-dev Perl/v5.12.0
Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
Checking if your kit is complete...
Looks good
Writing Makefile for Apache2::Reload
Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
Checking if your kit is complete...
Looks good
Writing Makefile for Apache2::SizeLimit
Subroutine MY::postamble redefined at ./Makefile.PL line 167.
Subroutine MY::constants redefined at ./Makefile.PL line 181.
[   info] generating script t/TEST
[   info] generating script ./t/cgi-bin/cookies.pl
[   info] generating script ./t/cgi-bin/next_available_port.pl
Checking if your kit is complete...
Looks good
[   info] generating script t/TEST
Writing Makefile for Apache::TestItSelf
Writing Makefile for Apache::Test
Checking for File::Spec...ok
Checking for Cwd...ok
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64
Writing Makefile for APR::Brigade
Writing Makefile for APR::Bucket
Writing Makefile for APR::BucketAlloc
Writing Makefile for APR::BucketType
Writing Makefile for APR::Date
Writing Makefile for APR::Error
Writing Makefile for APR::Finfo
Writing Makefile for APR::IpSubnet
Writing Makefile for APR::OS
Writing Makefile for APR::Pool
Writing Makefile for APR::SockAddr
Writing Makefile for APR::Socket
Writing Makefile for APR::Status
Writing Makefile for APR::String
Writing Makefile for APR::Table
Writing Makefile for APR::ThreadMutex
Writing Makefile for APR::ThreadRWLock
Writing Makefile for APR::URI
Writing Makefile for APR::UUID
Writing Makefile for APR::Util
Writing Makefile for APR
Writing Makefile for Apache2::Access
Writing Makefile for Apache2::CmdParms
Writing Makefile for Apache2::Command
Writing Makefile for Apache2::Connection
Writing Makefile for Apache2::ConnectionUtil
Writing Makefile for Apache2::Directive
Writing Makefile for Apache2::Filter
Writing Makefile for Apache2::FilterRec
Writing Makefile for Apache2::HookRun
Writing Makefile for Apache2::Log
Writing Makefile for Apache2::MPM
Writing Makefile for Apache2::Module
Writing Makefile for Apache2::Process
Writing Makefile for Apache2::RequestIO
Writing Makefile for Apache2::RequestRec
Writing Makefile for Apache2::RequestUtil
Writing Makefile for Apache2::Response
Writing Makefile for Apache2::ServerRec
Writing Makefile for Apache2::ServerUtil
Writing Makefile for Apache2::SubProcess
Writing Makefile for Apache2::SubRequest
Writing Makefile for Apache2::URI
Writing Makefile for Apache2::Util
Writing Makefile for Apache2
Writing Makefile for ModPerl::Global
Writing Makefile for ModPerl::Util
Writing Makefile for ModPerl
Writing Makefile for ModPerl::WrapXS
Writing Makefile for APR
Writing Makefile for APR::Const
Writing Makefile for APR::PerlIO
Writing Makefile for libaprext
Writing Makefile for APR_build
Writing Makefile for Apache2::Const
Writing Makefile for Apache2_build
Writing Makefile for ModPerl::Const
Writing Makefile for ModPerl
Writing Makefile for ModPerl::XS
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning] 
[warning]   LoadModule perl_module modules/mod_perl.so
[warning] 
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

benedict ~/dev/perl/mod_perl-2.0> make -j3
cd "src/modules/perl" && make
cc -I/Users/david/dev/perl/mod_perl-2.0/src/modules/perl -I/Users/david/dev/perl/mod_perl-2.0/xs -I/usr/local/apache2-test/include -I/usr/local/apache2-test/include  -I/usr/local/apache2-test/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE -DMOD_PERL -DMP_COMPAT_1X -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -O3  \
	-c mod_perl.c && mv mod_perl.o mod_perl.lo
cc -I/Users/david/dev/perl/mod_perl-2.0/src/modules/perl -I/Users/david/dev/perl/mod_perl-2.0/xs -I/usr/local/apache2-test/include -I/usr/local/apache2-test/include  -I/usr/local/apache2-test/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE -DMOD_PERL -DMP_COMPAT_1X -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -O3  \
	-c modperl_interp.c && mv modperl_interp.o modperl_interp.lo
In file included from /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/perl.h:2429,
                 from modperl_perl_includes.h:65,
                 from modperl_common_includes.h:24,
                 from mod_perl.h:21,
                 from mod_perl.c:17:
/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/handy.h:108:1: warning: "bool" redefined
In file included from /usr/include/mach-o/dyld.h:29,
                 from /usr/local/apache2-test/include/apr_portable.h:166,
                 from /usr/local/apache2-test/include/http_protocol.h:31,
                 from modperl_apache_includes.h:30,
                 from mod_perl.h:20,
                 from mod_perl.c:17:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdbool.h:36:1: warning: this is the location of the previous definition
In file included from /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/perl.h:2429,
                 from modperl_perl_includes.h:65,
                 from modperl_common_includes.h:24,
                 from mod_perl.h:21,
                 from modperl_interp.c:17:
/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/handy.h:108:1: warning: "bool" redefined
In file included from /usr/include/mach-o/dyld.h:29,
                 from /usr/local/apache2-test/include/apr_portable.h:166,
                 from /usr/local/apache2-test/include/http_protocol.h:31,
                 from modperl_apache_includes.h:30,
                 from mod_perl.h:20,
                 from modperl_interp.c:17:
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdbool.h:36:1: warning: this is the location of the previous definition
mod_perl.c: In function ‘modperl_shutdown’:
mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function)
mod_perl.c:62: error: (Each undeclared identifier is reported only once
mod_perl.c:62: error: for each function it appears in.)
mod_perl.c: In function ‘modperl_hook_post_config_last’:
mod_perl.c:718: error: ‘my_perl’ undeclared (first use in this function)
mod_perl.c: In function ‘modperl_child_exit’:
mod_perl.c:814: error: ‘my_perl’ undeclared (first use in this function)
mod_perl.c: In function ‘modperl_response_handler’:
mod_perl.c:1036: error: ‘my_perl’ undeclared (first use in this function)
mod_perl.c: In function ‘modperl_response_handler_cgi’:
mod_perl.c:1079: error: ‘my_perl’ undeclared (first use in this function)
make[1]: *** [mod_perl.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
cp lib/Apache2/PerlSections/Dump.pm blib/lib/Apache2/PerlSections/Dump.pm
cp lib/ModPerl/TestRun.pm blib/lib/ModPerl/TestRun.pm
make: *** [modperl_lib] Error 2
make: *** Waiting for unfinished jobs....
cp bin/mp2bug blib/script/mp2bug
cp lib/Apache2/compat.pm blib/lib/Apache2/compat.pm
/usr/local/perl-5.12/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/mp2bug
cp lib/Apache2/SourceTables.pm blib/lib/Apache2/SourceTables.pm
cp lib/ModPerl/Config.pm blib/lib/ModPerl/Config.pm
cp lib/ModPerl/FunctionMap.pm blib/lib/ModPerl/FunctionMap.pm
cp lib/ModPerl/Manifest.pm blib/lib/ModPerl/Manifest.pm
cp lib/APR/XSLoader.pm blib/lib/APR/XSLoader.pm
cp lib/Bundle/Apache2.pm blib/lib/Bundle/Apache2.pm
cp lib/ModPerl/Code.pm blib/lib/ModPerl/Code.pm
cp lib/ModPerl/CScan.pm blib/lib/ModPerl/CScan.pm
cp lib/Apache2/PerlSections.pm blib/lib/Apache2/PerlSections.pm
cp lib/mod_perl2.pm blib/lib/mod_perl2.pm
cp lib/ModPerl/MM.pm blib/lib/ModPerl/MM.pm
cp lib/ModPerl/ParseSource.pm blib/lib/ModPerl/ParseSource.pm
cp lib/ModPerl/BuildOptions.pm blib/lib/ModPerl/BuildOptions.pm
cp lib/typemap blib/arch/auto/Apache2/typemap
cp lib/ModPerl/MethodLookup.pm blib/lib/ModPerl/MethodLookup.pm
cp lib/Apache2/ParseSource.pm blib/lib/Apache2/ParseSource.pm
cp lib/ModPerl/WrapXS.pm blib/lib/ModPerl/WrapXS.pm
cp lib/ModPerl/BuildMM.pm blib/lib/ModPerl/BuildMM.pm
cp lib/Apache2/Resource.pm blib/lib/Apache2/Resource.pm
cp lib/ModPerl/MapUtil.pm blib/lib/ModPerl/MapUtil.pm
cp lib/ModPerl/TypeMap.pm blib/lib/ModPerl/TypeMap.pm
cp lib/Apache2/Build.pm blib/lib/Apache2/Build.pm
AutoSplitting blib/lib/Apache2/Build.pm (blib/lib/auto/Apache2/Build)
cp lib/Apache2/XSLoader.pm blib/lib/Apache2/XSLoader.pm
cp lib/ModPerl/TestReport.pm blib/lib/ModPerl/TestReport.pm
cp lib/Apache2/Status.pm blib/lib/Apache2/Status.pm
cp lib/ModPerl/StructureMap.pm blib/lib/ModPerl/StructureMap.pm
cp lib/Apache2/BuildConfig.pm blib/lib/Apache2/BuildConfig.pm
cp lib/Apache2/porting.pm blib/lib/Apache2/porting.pm

FYI, I built Perl with `sh Configure -des -Duseshrplib -Dusemultiplicity -Dprefix='/usr/local/perl-5.12'`. Deets:

# /usr/local/perl-5.12/bin/perl -V
Summary of my perl5 (revision 5 version 12 subversion 0) configuration:
   
  Platform:
    osname=darwin, osvers=10.3.0, archname=darwin-multi-2level
    uname='darwin benedict.local 10.3.0 darwin kernel version 10.3.0: fri feb 26 11:58:09 pst 2010; root:xnu-1504.3.12~1release_i386 i386 '
    config_args='-des -Duseshrplib -Dusemultiplicity -Dprefix=/usr/local/perl-5.12'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O3',
    cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 (Apple Inc. build 5646) (dot 1)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                        USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
                        USE_PERL_ATOF
  Locally applied patches:
	RC3
  Built under darwin
  Compiled at Apr  3 2010 14:13:48
  @INC:
    /usr/local/perl-5.12/lib/site_perl/5.12.0/darwin-multi-2level
    /usr/local/perl-5.12/lib/site_perl/5.12.0
    /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level
    /usr/local/perl-5.12/lib/5.12.0
    .

Thanks,

David

Re: Build Failure on Perl 5.12 RC3

Posted by "David E. Wheeler" <da...@kineticode.com>.
On Apr 6, 2010, at 11:42 AM, Fred Moyer wrote:

> Here's the rest of it [1], but I'm highly skeptical on some of these
> changes.  Is pTHX_ passed as the first argument in all cases, or the
> last?
> 
> I still get some errors with this [2].

Stefan said last night that it should be first.

Best,

David


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


Re: Build Failure on Perl 5.12 RC3

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Tue, Apr 6, 2010 at 11:35 AM, Philip M. Gollucci
<pg...@p6m7g8.com> wrote:
>> Perhaps, but I'm still understanding the implications of the code
>> changes I'm making.  Here's one:
>>
>> Index: src/modules/perl/mod_perl.c
>> ===================================================================
>> --- src/modules/perl/mod_perl.c (revision 930926)
>> +++ src/modules/perl/mod_perl.c (working copy)
>> @@ -53,7 +53,7 @@
>>  }
>>
>>  #ifndef USE_ITHREADS
>> -static apr_status_t modperl_shutdown(void *data)
>> +static apr_status_t modperl_shutdown(pTHX_ void *data)
>
> Thats definitely a correct change.

Here's the rest of it [1], but I'm highly skeptical on some of these
changes.  Is pTHX_ passed as the first argument in all cases, or the
last?

I still get some errors with this [2].

[1]
Index: src/modules/perl/mod_perl.c
===================================================================
--- src/modules/perl/mod_perl.c (revision 930926)
+++ src/modules/perl/mod_perl.c (working copy)
@@ -53,7 +53,7 @@
 }

 #ifndef USE_ITHREADS
-static apr_status_t modperl_shutdown(void *data)
+static apr_status_t modperl_shutdown(pTHX_ void *data)
 {
     modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
     PerlInterpreter *perl = (PerlInterpreter *)cdata->data;
@@ -669,7 +669,7 @@
 }

 static int modperl_hook_post_config_last(apr_pool_t *pconf, apr_pool_t *plog,
-                                         apr_pool_t *ptemp, server_rec *s)
+                                         apr_pool_t *ptemp,
server_rec *s,pTHX_ void *data )
 {
     /* in the threaded environment, no server_rec/process_rec
      * modifications should be done beyond this point */
@@ -784,7 +784,7 @@

 #endif /* USE_ITHREADS */

-static apr_status_t modperl_child_exit(void *data)
+static apr_status_t modperl_child_exit(pTHX_ void *data)
 {
     char *level = NULL;
     server_rec *s = (server_rec *)data;
@@ -1006,7 +1006,7 @@
     return retval;
 }

-int modperl_response_handler(request_rec *r)
+int modperl_response_handler(request_rec *r, pTHX_ void *data)
 {
     MP_dDCFG;
 #ifdef USE_ITHREADS
@@ -1053,7 +1053,7 @@
     return retval;
 }

-int modperl_response_handler_cgi(request_rec *r)
+int modperl_response_handler_cgi(request_rec *r, pTHX_ void *data)
 {
     MP_dDCFG;
     GV *h_stdin, *h_stdout;


[2]
/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdbool.h:36:1:
warning: this is the location of the previous definition
mod_perl.c: In function 'modperl_startup':
mod_perl.c:338: warning: passing argument 3 of
'apr_pool_cleanup_register' from incompatible pointer type
mod_perl.c: In function 'modperl_hook_child_init':
mod_perl.c:828: warning: passing argument 3 of
'apr_pool_cleanup_register' from incompatible pointer type
mod_perl.c: In function 'modperl_register_hooks':
mod_perl.c:852: warning: passing argument 1 of 'ap_hook_post_config'
from incompatible pointer type
mod_perl.c: At top level:
mod_perl.c:1010: error: conflicting types for 'modperl_response_handler'
mod_perl.h:138: error: previous declaration of
'modperl_response_handler' was here
mod_perl.c:1057: error: conflicting types for 'modperl_response_handler_cgi'
mod_perl.h:139: error: previous declaration of
'modperl_response_handler_cgi' was here
make[1]: *** [mod_perl.lo] Error 1
make: *** [modperl_lib] Error 2

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


Re: Build Failure on Perl 5.12 RC3

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> Perhaps, but I'm still understanding the implications of the code
> changes I'm making.  Here's one:
>
> Index: src/modules/perl/mod_perl.c
> ===================================================================
> --- src/modules/perl/mod_perl.c (revision 930926)
> +++ src/modules/perl/mod_perl.c (working copy)
> @@ -53,7 +53,7 @@
>   }
>
>   #ifndef USE_ITHREADS
> -static apr_status_t modperl_shutdown(void *data)
> +static apr_status_t modperl_shutdown(pTHX_ void *data)

Thats definitely a correct change.

I'm about to build a bunch of stuff and see if I can chip in.

-- 
------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Apache Infrastructure; Member, Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Sr. System Admin,                 Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.

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


Re: Build Failure on Perl 5.12 RC3

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Tue, Apr 6, 2010 at 11:01 AM, David E. Wheeler <da...@kineticode.com> wrote:
> Sorry, meant to have this thread on dev originally. Reposting.
>
> On Apr 5, 2010, at 6:20 PM, Fred Moyer wrote:
>
>> Builds ok here on OS X 10.6.3 (tests don't start yet though).  Wonder
>> what the difference in our setups
>
> Okay, Fred and I have been hacking on this for a few hours, and thanks to a tip from Stefan O'Rear on #p5p, we've been able to trace the basic problem.
>
> I can get mod_perl2 to build with Perl configured with:
>
>   sh Configure -des -Duseshrplib
>
> Or
>
>   sh Configure -des -Duseshrplib -Dusemultiplicity -Duseithreads
>
> But not
>
>   sh Configure -des -Duseshrplib -Dusemultiplicity
>
> That is, mod_perl will build with both multiplicity and ithreads or with neither, but not with multiplicity only. With multiplicity-only, I get:
>
>   mod_perl.c: In function ‘modperl_shutdown’:
>   mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function)
>   mod_perl.c:62: error: (Each undeclared identifier is reported only once
>   mod_perl.c:62: error: for each function it appears in.)
>
> Fred says this is the relevant code:
>
>   #ifndef USE_ITHREADS
>   static apr_status_t modperl_shutdown(void *data)
>   {
>       modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
>       PerlInterpreter *perl = (PerlInterpreter *)cdata->data;
>       void **handles;
>
>       handles = modperl_xs_dl_handles_get(aTHX);
>
> And what Stefan says is: “you need to change your function declaration from ...(void *arg) to ...(pTHX_  void *arg)”.
>
> I believe Fred managed to get past some of these errors by doing something like this. Fred, can you confirm?

Perhaps, but I'm still understanding the implications of the code
changes I'm making.  Here's one:

Index: src/modules/perl/mod_perl.c
===================================================================
--- src/modules/perl/mod_perl.c (revision 930926)
+++ src/modules/perl/mod_perl.c (working copy)
@@ -53,7 +53,7 @@
 }

 #ifndef USE_ITHREADS
-static apr_status_t modperl_shutdown(void *data)
+static apr_status_t modperl_shutdown(pTHX_ void *data)


>
> So there you have it. If you build perl with
>
>   sh Configure -des -Duseshrplib -Dusemultiplicity
>
> and build mod_perl 2 against that, you should be able to replicate this issue.
>
> Anyone familiar with this stuff and able to fix? I'd love to see mod_perl 2.05 drop when Perl 5.12.0 final drops (next week, I believe).
>
> Thanks,
>
> David
>
> PS: I think the apreq stuff needs to be hit with the same multiplicity cluestick -- anyone know that code?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
>

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


Re: Build Failure on Perl 5.12 RC3

Posted by "David E. Wheeler" <da...@kineticode.com>.
Sorry, meant to have this thread on dev originally. Reposting.

On Apr 5, 2010, at 6:20 PM, Fred Moyer wrote:

> Builds ok here on OS X 10.6.3 (tests don't start yet though).  Wonder
> what the difference in our setups 

Okay, Fred and I have been hacking on this for a few hours, and thanks to a tip from Stefan O'Rear on #p5p, we've been able to trace the basic problem.

I can get mod_perl2 to build with Perl configured with:

   sh Configure -des -Duseshrplib

Or

   sh Configure -des -Duseshrplib -Dusemultiplicity -Duseithreads

But not

   sh Configure -des -Duseshrplib -Dusemultiplicity

That is, mod_perl will build with both multiplicity and ithreads or with neither, but not with multiplicity only. With multiplicity-only, I get:

   mod_perl.c: In function ‘modperl_shutdown’:
   mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function)
   mod_perl.c:62: error: (Each undeclared identifier is reported only once
   mod_perl.c:62: error: for each function it appears in.)

Fred says this is the relevant code:

   #ifndef USE_ITHREADS
   static apr_status_t modperl_shutdown(void *data)
   {
       modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
       PerlInterpreter *perl = (PerlInterpreter *)cdata->data;
       void **handles;

       handles = modperl_xs_dl_handles_get(aTHX);

And what Stefan says is: “you need to change your function declaration from ...(void *arg) to ...(pTHX_  void *arg)”.

I believe Fred managed to get past some of these errors by doing something like this. Fred, can you confirm?

So there you have it. If you build perl with

   sh Configure -des -Duseshrplib -Dusemultiplicity

and build mod_perl 2 against that, you should be able to replicate this issue.

Anyone familiar with this stuff and able to fix? I'd love to see mod_perl 2.05 drop when Perl 5.12.0 final drops (next week, I believe).

Thanks,

David

PS: I think the apreq stuff needs to be hit with the same multiplicity cluestick -- anyone know that code?


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


Re: Build Failure on Perl 5.12 RC3

Posted by "David E. Wheeler" <da...@kineticode.com>.
On Apr 5, 2010, at 6:20 PM, Fred Moyer wrote:

> Builds ok here on OS X 10.6.3 (tests don't start yet though).  Wonder
> what the difference in our setups 

Okay, Fred and I have been hacking on this for a few hours, and thanks to a tip from Stefan O'Rear on #p5p, we've been able to trace the basic problem.

I can get mod_perl2 to build with Perl configured with:

    sh Configure -des -Duseshrplib

Or

    sh Configure -des -Duseshrplib -Dusemultiplicity -Duseithreads

But not

    sh Configure -des -Duseshrplib -Dusemultiplicity

That is, mod_perl will build with both multiplicity and ithreads or with neither, but not with multiplicity only. With multiplicity-only, I get:

    mod_perl.c: In function ‘modperl_shutdown’:
    mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function)
    mod_perl.c:62: error: (Each undeclared identifier is reported only once
    mod_perl.c:62: error: for each function it appears in.)

Fred says this is the relevant code:

    #ifndef USE_ITHREADS
    static apr_status_t modperl_shutdown(void *data)
    {
        modperl_cleanup_data_t *cdata = (modperl_cleanup_data_t *)data;
        PerlInterpreter *perl = (PerlInterpreter *)cdata->data;
        void **handles;
    
        handles = modperl_xs_dl_handles_get(aTHX);

And what Stefan says is: “you need to change your function declaration from ...(void *arg) to ...(pTHX_  void *arg)”.

I believe Fred managed to get past some of these errors by doing something like this. Fred, can you confirm?

So there you have it. If you build perl with

    sh Configure -des -Duseshrplib -Dusemultiplicity

and build mod_perl 2 against that, you should be able to replicate this issue.

Anyone familiar with this stuff and able to fix? I'd love to see mod_perl 2.05 drop when Perl 5.12.0 final drops (next week, I believe).

Thanks,

David

PS: I think the apreq stuff needs to be hit with the same multiplicity cluestick -- anyone know that code?


Re: Build Failure on Perl 5.12 RC3

Posted by Fred Moyer <fr...@redhotpenguin.com>.
Builds ok here on OS X 10.6.3 (tests don't start yet though).  Wonder
what the difference in our setups is.

phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ perl Makefile.PL
MP_AP_PREFIX=$HOME/dev/sl/httpd2/ MP_PROMPT_DEFAULT=1
Reading Makefile.PL args from @ARGV
   MP_AP_PREFIX = /Users/phred/dev/sl/httpd2
   MP_PROMPT_DEFAULT = 1
no conflicting prior mod_perl version found - good.
Configuring Apache/2.2.14 mod_perl/2.0.5-dev Perl/v5.12.0
Writing Makefile for Apache2::Reload
Writing Makefile for Apache2::SizeLimit
Subroutine MY::postamble redefined at ./Makefile.PL line 167.
Subroutine MY::constants redefined at ./Makefile.PL line 181.
generating script t/TEST
generating script ./t/cgi-bin/cookies.pl
generating script ./t/cgi-bin/next_available_port.pl
generating script t/TEST
Writing Makefile for Apache::TestItSelf
Writing Makefile for Apache::Test
Checking for File::Spec...ok
Checking for Cwd...ok
generating script t/TEST
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64

On Mon, Apr 5, 2010 at 11:39 AM, David E. Wheeler <da...@kineticode.com> wrote:
> Hey all,
>
> I'm testing Perl 5.12 RC3 and ran into these errors when trying to build mod_perl 2 (mod_perl 1 built fine FWIW):
>
> benedict ~/dev/perl/mod_perl-2.0> /usr/local/perl-5.12/bin/perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2-test MP_PROMPT_DEFAULT=1
> Reading Makefile.PL args from @ARGV
>   MP_AP_PREFIX = /usr/local/apache2-test
>   MP_PROMPT_DEFAULT = 1
> no conflicting prior mod_perl version found - good.
> Configuring Apache/2.2.13 mod_perl/2.0.5-dev Perl/v5.12.0
> Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
> Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
> Checking if your kit is complete...
> Looks good
> Writing Makefile for Apache2::Reload
> Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
> Use of uninitialized value in join or string at lib/Apache2/Build.pm line 900.
> Checking if your kit is complete...
> Looks good
> Writing Makefile for Apache2::SizeLimit
> Subroutine MY::postamble redefined at ./Makefile.PL line 167.
> Subroutine MY::constants redefined at ./Makefile.PL line 181.
> [   info] generating script t/TEST
> [   info] generating script ./t/cgi-bin/cookies.pl
> [   info] generating script ./t/cgi-bin/next_available_port.pl
> Checking if your kit is complete...
> Looks good
> [   info] generating script t/TEST
> Writing Makefile for Apache::TestItSelf
> Writing Makefile for Apache::Test
> Checking for File::Spec...ok
> Checking for Cwd...ok
> [   info] generating script t/TEST
> Checking if your kit is complete...
> Looks good
> Writing Makefile for ModPerl::Registry
> Writing Makefile for APR::Base64
> Writing Makefile for APR::Brigade
> Writing Makefile for APR::Bucket
> Writing Makefile for APR::BucketAlloc
> Writing Makefile for APR::BucketType
> Writing Makefile for APR::Date
> Writing Makefile for APR::Error
> Writing Makefile for APR::Finfo
> Writing Makefile for APR::IpSubnet
> Writing Makefile for APR::OS
> Writing Makefile for APR::Pool
> Writing Makefile for APR::SockAddr
> Writing Makefile for APR::Socket
> Writing Makefile for APR::Status
> Writing Makefile for APR::String
> Writing Makefile for APR::Table
> Writing Makefile for APR::ThreadMutex
> Writing Makefile for APR::ThreadRWLock
> Writing Makefile for APR::URI
> Writing Makefile for APR::UUID
> Writing Makefile for APR::Util
> Writing Makefile for APR
> Writing Makefile for Apache2::Access
> Writing Makefile for Apache2::CmdParms
> Writing Makefile for Apache2::Command
> Writing Makefile for Apache2::Connection
> Writing Makefile for Apache2::ConnectionUtil
> Writing Makefile for Apache2::Directive
> Writing Makefile for Apache2::Filter
> Writing Makefile for Apache2::FilterRec
> Writing Makefile for Apache2::HookRun
> Writing Makefile for Apache2::Log
> Writing Makefile for Apache2::MPM
> Writing Makefile for Apache2::Module
> Writing Makefile for Apache2::Process
> Writing Makefile for Apache2::RequestIO
> Writing Makefile for Apache2::RequestRec
> Writing Makefile for Apache2::RequestUtil
> Writing Makefile for Apache2::Response
> Writing Makefile for Apache2::ServerRec
> Writing Makefile for Apache2::ServerUtil
> Writing Makefile for Apache2::SubProcess
> Writing Makefile for Apache2::SubRequest
> Writing Makefile for Apache2::URI
> Writing Makefile for Apache2::Util
> Writing Makefile for Apache2
> Writing Makefile for ModPerl::Global
> Writing Makefile for ModPerl::Util
> Writing Makefile for ModPerl
> Writing Makefile for ModPerl::WrapXS
> Writing Makefile for APR
> Writing Makefile for APR::Const
> Writing Makefile for APR::PerlIO
> Writing Makefile for libaprext
> Writing Makefile for APR_build
> Writing Makefile for Apache2::Const
> Writing Makefile for Apache2_build
> Writing Makefile for ModPerl::Const
> Writing Makefile for ModPerl
> Writing Makefile for ModPerl::XS
> Writing Makefile for mod_perl2
> [warning] mod_perl dso library will be built as mod_perl.so
> [warning] You'll need to add the following to httpd.conf:
> [warning]
> [warning]   LoadModule perl_module modules/mod_perl.so
> [warning]
> [warning] depending on your build, mod_perl might not live in
> [warning] the modules/ directory.
>
> benedict ~/dev/perl/mod_perl-2.0> make -j3
> cd "src/modules/perl" && make
> cc -I/Users/david/dev/perl/mod_perl-2.0/src/modules/perl -I/Users/david/dev/perl/mod_perl-2.0/xs -I/usr/local/apache2-test/include -I/usr/local/apache2-test/include  -I/usr/local/apache2-test/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE -DMOD_PERL -DMP_COMPAT_1X -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -O3  \
>        -c mod_perl.c && mv mod_perl.o mod_perl.lo
> cc -I/Users/david/dev/perl/mod_perl-2.0/src/modules/perl -I/Users/david/dev/perl/mod_perl-2.0/xs -I/usr/local/apache2-test/include -I/usr/local/apache2-test/include  -I/usr/local/apache2-test/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE -DMOD_PERL -DMP_COMPAT_1X -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -O3  \
>        -c modperl_interp.c && mv modperl_interp.o modperl_interp.lo
> In file included from /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/perl.h:2429,
>                 from modperl_perl_includes.h:65,
>                 from modperl_common_includes.h:24,
>                 from mod_perl.h:21,
>                 from mod_perl.c:17:
> /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/handy.h:108:1: warning: "bool" redefined
> In file included from /usr/include/mach-o/dyld.h:29,
>                 from /usr/local/apache2-test/include/apr_portable.h:166,
>                 from /usr/local/apache2-test/include/http_protocol.h:31,
>                 from modperl_apache_includes.h:30,
>                 from mod_perl.h:20,
>                 from mod_perl.c:17:
> /usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdbool.h:36:1: warning: this is the location of the previous definition
> In file included from /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/perl.h:2429,
>                 from modperl_perl_includes.h:65,
>                 from modperl_common_includes.h:24,
>                 from mod_perl.h:21,
>                 from modperl_interp.c:17:
> /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level/CORE/handy.h:108:1: warning: "bool" redefined
> In file included from /usr/include/mach-o/dyld.h:29,
>                 from /usr/local/apache2-test/include/apr_portable.h:166,
>                 from /usr/local/apache2-test/include/http_protocol.h:31,
>                 from modperl_apache_includes.h:30,
>                 from mod_perl.h:20,
>                 from modperl_interp.c:17:
> /usr/lib/gcc/i686-apple-darwin10/4.2.1/include/stdbool.h:36:1: warning: this is the location of the previous definition
> mod_perl.c: In function ‘modperl_shutdown’:
> mod_perl.c:62: error: ‘my_perl’ undeclared (first use in this function)
> mod_perl.c:62: error: (Each undeclared identifier is reported only once
> mod_perl.c:62: error: for each function it appears in.)
> mod_perl.c: In function ‘modperl_hook_post_config_last’:
> mod_perl.c:718: error: ‘my_perl’ undeclared (first use in this function)
> mod_perl.c: In function ‘modperl_child_exit’:
> mod_perl.c:814: error: ‘my_perl’ undeclared (first use in this function)
> mod_perl.c: In function ‘modperl_response_handler’:
> mod_perl.c:1036: error: ‘my_perl’ undeclared (first use in this function)
> mod_perl.c: In function ‘modperl_response_handler_cgi’:
> mod_perl.c:1079: error: ‘my_perl’ undeclared (first use in this function)
> make[1]: *** [mod_perl.lo] Error 1
> make[1]: *** Waiting for unfinished jobs....
> cp lib/Apache2/PerlSections/Dump.pm blib/lib/Apache2/PerlSections/Dump.pm
> cp lib/ModPerl/TestRun.pm blib/lib/ModPerl/TestRun.pm
> make: *** [modperl_lib] Error 2
> make: *** Waiting for unfinished jobs....
> cp bin/mp2bug blib/script/mp2bug
> cp lib/Apache2/compat.pm blib/lib/Apache2/compat.pm
> /usr/local/perl-5.12/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/mp2bug
> cp lib/Apache2/SourceTables.pm blib/lib/Apache2/SourceTables.pm
> cp lib/ModPerl/Config.pm blib/lib/ModPerl/Config.pm
> cp lib/ModPerl/FunctionMap.pm blib/lib/ModPerl/FunctionMap.pm
> cp lib/ModPerl/Manifest.pm blib/lib/ModPerl/Manifest.pm
> cp lib/APR/XSLoader.pm blib/lib/APR/XSLoader.pm
> cp lib/Bundle/Apache2.pm blib/lib/Bundle/Apache2.pm
> cp lib/ModPerl/Code.pm blib/lib/ModPerl/Code.pm
> cp lib/ModPerl/CScan.pm blib/lib/ModPerl/CScan.pm
> cp lib/Apache2/PerlSections.pm blib/lib/Apache2/PerlSections.pm
> cp lib/mod_perl2.pm blib/lib/mod_perl2.pm
> cp lib/ModPerl/MM.pm blib/lib/ModPerl/MM.pm
> cp lib/ModPerl/ParseSource.pm blib/lib/ModPerl/ParseSource.pm
> cp lib/ModPerl/BuildOptions.pm blib/lib/ModPerl/BuildOptions.pm
> cp lib/typemap blib/arch/auto/Apache2/typemap
> cp lib/ModPerl/MethodLookup.pm blib/lib/ModPerl/MethodLookup.pm
> cp lib/Apache2/ParseSource.pm blib/lib/Apache2/ParseSource.pm
> cp lib/ModPerl/WrapXS.pm blib/lib/ModPerl/WrapXS.pm
> cp lib/ModPerl/BuildMM.pm blib/lib/ModPerl/BuildMM.pm
> cp lib/Apache2/Resource.pm blib/lib/Apache2/Resource.pm
> cp lib/ModPerl/MapUtil.pm blib/lib/ModPerl/MapUtil.pm
> cp lib/ModPerl/TypeMap.pm blib/lib/ModPerl/TypeMap.pm
> cp lib/Apache2/Build.pm blib/lib/Apache2/Build.pm
> AutoSplitting blib/lib/Apache2/Build.pm (blib/lib/auto/Apache2/Build)
> cp lib/Apache2/XSLoader.pm blib/lib/Apache2/XSLoader.pm
> cp lib/ModPerl/TestReport.pm blib/lib/ModPerl/TestReport.pm
> cp lib/Apache2/Status.pm blib/lib/Apache2/Status.pm
> cp lib/ModPerl/StructureMap.pm blib/lib/ModPerl/StructureMap.pm
> cp lib/Apache2/BuildConfig.pm blib/lib/Apache2/BuildConfig.pm
> cp lib/Apache2/porting.pm blib/lib/Apache2/porting.pm
>
> FYI, I built Perl with `sh Configure -des -Duseshrplib -Dusemultiplicity -Dprefix='/usr/local/perl-5.12'`. Deets:
>
> # /usr/local/perl-5.12/bin/perl -V
> Summary of my perl5 (revision 5 version 12 subversion 0) configuration:
>
>  Platform:
>    osname=darwin, osvers=10.3.0, archname=darwin-multi-2level
>    uname='darwin benedict.local 10.3.0 darwin kernel version 10.3.0: fri feb 26 11:58:09 pst 2010; root:xnu-1504.3.12~1release_i386 i386 '
>    config_args='-des -Duseshrplib -Dusemultiplicity -Dprefix=/usr/local/perl-5.12'
>    hint=recommended, useposix=true, d_sigaction=define
>    useithreads=undef, usemultiplicity=define
>    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
>    use64bitint=define, use64bitall=define, uselongdouble=undef
>    usemymalloc=n, bincompat5005=undef
>  Compiler:
>    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
>    optimize='-O3',
>    cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
>    ccversion='', gccversion='4.2.1 (Apple Inc. build 5646) (dot 1)', gccosandvers=''
>    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
>    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
>    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
>    alignbytes=8, prototype=define
>  Linker and Libraries:
>    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib'
>    libpth=/usr/local/lib /usr/lib
>    libs=-ldbm -ldl -lm -lutil -lc
>    perllibs=-ldl -lm -lutil -lc
>    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, libperl=libperl.dylib
>    gnulibc_version=''
>  Dynamic Linking:
>    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
>    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'
>
>
> Characteristics of this binary (from libperl):
>  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
>                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
>                        USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
>                        USE_PERL_ATOF
>  Locally applied patches:
>        RC3
>  Built under darwin
>  Compiled at Apr  3 2010 14:13:48
>  @INC:
>    /usr/local/perl-5.12/lib/site_perl/5.12.0/darwin-multi-2level
>    /usr/local/perl-5.12/lib/site_perl/5.12.0
>    /usr/local/perl-5.12/lib/5.12.0/darwin-multi-2level
>    /usr/local/perl-5.12/lib/5.12.0
>    .
>
> Thanks,
>
> David