You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Dintelmann, Peter" <Pe...@Dresdner-Bank.com> on 2007/10/26 14:57:01 UTC
building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
The "make" step of building mod_perl-2.0.3 with Perl 5.10.0
(DEVEL32096) on Solaris 8 in 64-bit fails with the following
message:
$ make
cd "src/modules/perl" && make
gcc -I/var/tmp/peter/mod_perl-2.0.3/src/modules/perl -I/var/tmp/peter/mod_perl-2.0.3/xs -I/opt/MISperl/httpd2/include -I/opt/MISperl/httpd2/include -I/opt/MISperl/httpd2/include -D_REENTRANT -mcpu=v9 -m64 -fno-strict-aliasing -pipe -I/var/tmp/static/include -I/opt/MISperl/perl/lib/5.10.0/sun4-solaris-thread-multi-64/CORE -DMOD_PERL -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -DAP_HAVE_DESIGNATED_INITIALIZER -O2 -fPIC \
-c mod_perl.c && mv mod_perl.o mod_perl.lo
mod_perl.c: In function `modperl_sys_term':
mod_perl.c:599: error: `my_perl' undeclared (first use in this function)
mod_perl.c:599: error: (Each undeclared identifier is reported only once
mod_perl.c:599: error: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `mod_perl.lo'
Current working directory /var/tmp/peter/mod_perl-2.0.3/src/modules/perl
*** Error code 1
make: Fatal error: Command failed for target `modperl_lib'
The referenced line 599 in mod_perl.c reads
$ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
PERL_SYS_TERM();
thus I cced this to p5p.
-----
Perl was configured with
./Configure \
-Dprefix=/opt/MISperl/perl \
-Uinstallusrbinperl \
-Dcc=gcc \
-Doptimize=-O2 \
-Dlocincpth=/var/tmp/static/include \
-Dloclibpth=/var/tmp/static/lib \
-Duseshrplib \
-Duseperlio \
-Dusethreads \
-Duselargefiles \
-Duse64bitall \
-Dusesitecustomize \
-des
httpd-2.0.61 was configured with
CC='gcc -m64' CFLAGS='-O2' ./configure \
--prefix=/opt/MISperl/httpd2 \
--enable-layout=Apache \
--with-program-name=httpd2 \
--enable-pie \
--with-included-apr \
--with-mpm=worker \
--enable-mods-shared=most \
--enable-logio=shared \
--enable-proxy=shared \
--disable-ssl \
--enable-deflate \
--with-z=/usr/local
mod_perl was configured with
LD_LIBRARY_PATH=/usr/local/lib/sparcv9 \
/opt/MISperl/perl/bin/perl Makefile.PL \
MP_APXS=/opt/MISperl/httpd2/bin/apxs \
MP_COMPAT_1X=0
The LD_LIBRARY_PATH gurantees that libgcc_s.so is found.
RE: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by Jan Dubois <ja...@activestate.com>.
PerlIO_teardown() calls PerlIO_debug(), which doesn't take an aTHX
argument, but assumes the TLS still points to a valid interpreter (it
contains a dTHX macro call). This seems like a bad assumption to me;
calling PERL_SYS_TERM before all interpreters have been destroyed is
a bug. Therefore I think PERL_SYS_TERM shouldn't require an aTHX,
and PerlIO_teardown either shouldn't call PerlIO_debug, or
PerlIO_debug needs to be written to work without having an
interpreter still being alive.
Cheers,
-Jan
On Fri, 02 Nov 2007, Dave Mitchell wrote:
> [ snip description of problems compiling mod_perl now that PERL_SYS_TERM
> expects a my_perl in scope ]
>
> It appears that PERL_SYS_TERM first started needing a context with
>
> Change 29060 by rgs@benny on 2006/10/20 10:20:18
>
> More leak fixes, by Jarkko
>
> ...
>
> -#define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; MALLOC_TERM
> +# define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
>
> ...
>
> +# define PERLIO_TERM PerlIO_teardown(aTHX)
>
> ...
>
> +void PerlIO_teardown(pTHX) /* Call only from PERL_SYS_TERM(). */
> +{
> +#ifdef DEBUGGING
> + {
> + /* By now all filehandles should have been closed, so any
> + * stray (non-STD-)filehandles indicate *possible* (PerlIO)
> + * errors. */
> + int i;
> + for (i = 3; i < PL_perlio_fd_refcnt_size; i++) {
> + if (PL_perlio_fd_refcnt[i])
> + PerlIO_debug("PerlIO_cleanup: fd %d refcnt=%d\n",
> + i, PL_perlio_fd_refcnt[i]);
> + }
> + }
> +#endif
>
> perlembed.pod is silent about whether PERL_SYS_TERM needs a context,
> but at least one example shows it used in a function where there isn't a
> my_perl variable defined, so I think requiring a context is a bug.
>
> Jarkko, is there any reason why PerlIO_teardown needs an aTHX?
> As far as I can see none of its body uses my_perl.
>
>
> --
> In England there is a special word which means the last sunshine
> of the summer. That word is "spring".
AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by "Dintelmann, Peter" <Pe...@Dresdner-Bank.com>.
The current mod_perl/2.0.4-dev snapshot compiles
correctly with Perl 5.10.0 DEVEL 32209.
> -----Ursprüngliche Nachricht-----
> Von: Dintelmann, Peter
> Gesendet: Montag, 29. Oktober 2007 12:39
> An: Philippe M. Chiasson; Dave Mitchell
> Cc: Mod_Perl Mailingliste (E-Mail); Perl 5 Porters (E-Mail)
> Betreff: AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Philippe M. Chiasson [mailto:gozer@ectoplasm.org]
> > Gesendet: Samstag, 27. Oktober 2007 09:15
> > An: Dave Mitchell
> > Cc: Dintelmann, Peter; Mod_Perl Mailingliste (E-Mail); Perl
> 5 Porters
> > (E-Mail)
> > Betreff: Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
> >
> >
> > Dave Mitchell wrote:
> > > On Fri, Oct 26, 2007 at 02:57:01PM +0200, Dintelmann, Peter wrote:
> > >> mod_perl.c: In function `modperl_sys_term':
> > >> mod_perl.c:599: error: `my_perl' undeclared (first use in
> > this function)
> > > ...
> > >> The referenced line 599 in mod_perl.c reads
> > >>
> > >> $ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
> > >> PERL_SYS_TERM();
> > >
> > > That's odd.
> >
> > I've just built successfully against 32195:
>
> lucky man...
>
> The problem persists for me with a complete
> fresh install of 32199 :-(
>
>
> $ uname -a
> SunOS ffzn0ybf 5.8 Generic_117350-46 sun4u sparc SUNW,Ultra-4
>
> $ gcc -v
> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/specs
> Configured with: ../configure --with-as=/usr/ccs/bin/as
> --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
> Thread model: posix
> gcc version 3.4.6
>
> $ /opt/MISperl/perl/bin/perl -V
> Summary of my perl5 (revision 5 version 10 subversion 0 patch
> 32199) configuration:
> Platform:
> osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64
> uname='sunos ffzn0ybf 5.8 generic_117350-46 sun4u sparc
> sunw,ultra-4 '
> config_args='-Dprefix=/opt/MISperl/perl
> -Uinstallusrbinperl -Dcc=gcc -Doptimize=-O2
> -Dlocincpth=/var/tmp/static/include
> -Dloclibpth=/var/tmp/static/lib -Duseshrplib -Duseperlio
> -Dusethreads -Duselargefiles -Duse64bitall -Dusesitecustomize -des'
> hint=recommended, useposix=true, d_sigaction=define
> useithreads=define, usemultiplicity=define
> useperlio=define, d_sfio=undef, uselargefiles=define,
> usesocks=undef
> use64bitint=define, use64bitall=define, uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='gcc', ccflags ='-D_REENTRANT -mcpu=v9 -m64
> -fno-strict-aliasing -pipe -I/var/tmp/static/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O2',
> cppflags='-D_REENTRANT -mcpu=v9 -m64 -fno-strict-aliasing
> -pipe -I/var/tmp/static/include'
> ccversion='', gccversion='3.4.6', gccosandvers='solaris2.8'
> intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
> 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='gcc', ldflags =' -m64 -L/usr/lib/sparcv9
> -L/var/tmp/static/lib '
> libpth=/usr/lib/sparcv9 /var/tmp/static/lib /usr/lib
> /usr/ccs/lib /usr/local/lib
> libs=-lsocket -lnsl -lgdbm -ldl -lm -lpthread -lc
> perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
> libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true,
> libperl=libperl.so
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
> ccdlflags=' -R
> /opt/MISperl/perl/lib/5.10.0/sun4-solaris-thread-multi-64/CORE'
> cccdlflags='-fPIC', lddlflags=' -G -m64
> -L/usr/lib/sparcv9 -L/var/tmp/static/lib'
>
>
> 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_ITHREADS USE_LARGE_FILES
> USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
> Locally applied patches:
> DEVEL
> Built under solaris
> Compiled at Oct 29 2007 10:17:07
> @INC:
> /opt/MISperl/perl/lib/5.10.0/sun4-solaris-thread-multi-64
> /opt/MISperl/perl/lib/5.10.0
>
> /opt/MISperl/perl/lib/site_perl/5.10.0/sun4-solaris-thread-multi-64
> /opt/MISperl/perl/lib/site_perl/5.10.0
> .
>
AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by "Dintelmann, Peter" <Pe...@Dresdner-Bank.com>.
> -----Ursprüngliche Nachricht-----
> Von: Dintelmann, Peter
> Gesendet: Montag, 29. Oktober 2007 12:39
> An: Philippe M. Chiasson; Dave Mitchell
> Cc: Mod_Perl Mailingliste (E-Mail); Perl 5 Porters (E-Mail)
> Betreff: AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Philippe M. Chiasson [mailto:gozer@ectoplasm.org]
> > Gesendet: Samstag, 27. Oktober 2007 09:15
> > An: Dave Mitchell
> > Cc: Dintelmann, Peter; Mod_Perl Mailingliste (E-Mail); Perl
> 5 Porters
> > (E-Mail)
> > Betreff: Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
> >
> >
> > Dave Mitchell wrote:
> > > On Fri, Oct 26, 2007 at 02:57:01PM +0200, Dintelmann, Peter wrote:
> > >> mod_perl.c: In function `modperl_sys_term':
> > >> mod_perl.c:599: error: `my_perl' undeclared (first use in
> > this function)
> > > ...
> > >> The referenced line 599 in mod_perl.c reads
> > >>
> > >> $ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
> > >> PERL_SYS_TERM();
> > >
> > > That's odd.
> >
> > I've just built successfully against 32195:
>
> lucky man...
>
> The problem persists for me with a complete
> fresh install of 32199 :-(
BTW, I have exactly the same error on Linux 2.4.20
with 32199, httpd-2.0.61 when building mod_perl-2.0.3.
AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by "Dintelmann, Peter" <Pe...@Dresdner-Bank.com>.
> -----Ursprüngliche Nachricht-----
> Von: Philippe M. Chiasson [mailto:gozer@ectoplasm.org]
> Gesendet: Samstag, 27. Oktober 2007 09:15
> An: Dave Mitchell
> Cc: Dintelmann, Peter; Mod_Perl Mailingliste (E-Mail); Perl 5 Porters
> (E-Mail)
> Betreff: Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
>
>
> Dave Mitchell wrote:
> > On Fri, Oct 26, 2007 at 02:57:01PM +0200, Dintelmann, Peter wrote:
> >> mod_perl.c: In function `modperl_sys_term':
> >> mod_perl.c:599: error: `my_perl' undeclared (first use in
> this function)
> > ...
> >> The referenced line 599 in mod_perl.c reads
> >>
> >> $ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
> >> PERL_SYS_TERM();
> >
> > That's odd.
>
> I've just built successfully against 32195:
lucky man...
The problem persists for me with a complete
fresh install of 32199 :-(
$ uname -a
SunOS ffzn0ybf 5.8 Generic_117350-46 sun4u sparc SUNW,Ultra-4
$ gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
$ /opt/MISperl/perl/bin/perl -V
Summary of my perl5 (revision 5 version 10 subversion 0 patch 32199) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64
uname='sunos ffzn0ybf 5.8 generic_117350-46 sun4u sparc sunw,ultra-4 '
config_args='-Dprefix=/opt/MISperl/perl -Uinstallusrbinperl -Dcc=gcc -Doptimize=-O2 -Dlocincpth=/var/tmp/static/include -Dloclibpth=/var/tmp/static/lib -Duseshrplib -Duseperlio -Dusethreads -Duselargefiles -Duse64bitall -Dusesitecustomize -des'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -mcpu=v9 -m64 -fno-strict-aliasing -pipe -I/var/tmp/static/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -mcpu=v9 -m64 -fno-strict-aliasing -pipe -I/var/tmp/static/include'
ccversion='', gccversion='3.4.6', gccosandvers='solaris2.8'
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
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='gcc', ldflags =' -m64 -L/usr/lib/sparcv9 -L/var/tmp/static/lib '
libpth=/usr/lib/sparcv9 /var/tmp/static/lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -lgdbm -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /opt/MISperl/perl/lib/5.10.0/sun4-solaris-thread-multi-64/CORE'
cccdlflags='-fPIC', lddlflags=' -G -m64 -L/usr/lib/sparcv9 -L/var/tmp/static/lib'
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_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
Locally applied patches:
DEVEL
Built under solaris
Compiled at Oct 29 2007 10:17:07
@INC:
/opt/MISperl/perl/lib/5.10.0/sun4-solaris-thread-multi-64
/opt/MISperl/perl/lib/5.10.0
/opt/MISperl/perl/lib/site_perl/5.10.0/sun4-solaris-thread-multi-64
/opt/MISperl/perl/lib/site_perl/5.10.0
.
Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Dave Mitchell wrote:
> On Fri, Oct 26, 2007 at 02:57:01PM +0200, Dintelmann, Peter wrote:
>> mod_perl.c: In function `modperl_sys_term':
>> mod_perl.c:599: error: `my_perl' undeclared (first use in this function)
> ...
>> The referenced line 599 in mod_perl.c reads
>>
>> $ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
>> PERL_SYS_TERM();
>
> That's odd.
I've just built successfully against 32195:
*** /perl5.10.0 -V
Summary of my perl5 (revision 5 version 10 subversion 0 patch 32195) configuration:
Platform:
osname=darwin, osvers=9.0.0, archname=darwin-thread-multi-2level
uname='darwin shenlong 9.0.0 darwin kernel version 9.0.0: tue oct 9 21:35:55 pdt 2007; root:xnu-1228~1release_i386 i386 i386 '
config_args='-des -Dusedevel -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
------------------------------------------------------------------------
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Re: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
Posted by Dave Mitchell <da...@iabyn.com>.
On Fri, Oct 26, 2007 at 02:57:01PM +0200, Dintelmann, Peter wrote:
> mod_perl.c: In function `modperl_sys_term':
> mod_perl.c:599: error: `my_perl' undeclared (first use in this function)
...
> The referenced line 599 in mod_perl.c reads
>
> $ perl -nle 'print if $.==599' src/modules/perl/mod_perl.c
> PERL_SYS_TERM();
That's odd.
I very recent change I made to bleed was that before you had:
#define PERL_SYS_TERM() \
HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM;
and now you have:
#define PERL_SYS_TERM() Perl_sys_term(aTHX)
Perl_sys_term(pTHX)
{
...
PERL_SYS_TERM_BODY();
}
#define PERL_SYS_TERM_BODY() \
HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM;
So, now the call to Perl_sys_term (via the PERL_SYS_TERM macro) requires,
in threaded/multiplicity builds, for the caller to have the my_perl
variable available. However, I didn't see that as a problem, as before,
the PERL_SYS_TERM marco invoked PERLIO_TERM, which is defined (more or
less) as:
PerlIO_teardown(aTHX)
so even before my change, the caller should have been required to provide
a my_perl var, either via a pTHX, or explicitly via dTHX.
--
"You may not work around any technical limitations in the software"
-- Windows Vista license