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/11/01 15:08:41 UTC
AW: building mod_perl-2.0.3 with Perl 5.10.0 (DEVEL32096)
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
> .
>
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".