You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Lack Mr G M <gm...@ggr.co.uk> on 2005/01/06 17:31:04 UTC

Missing symbol: mod_perl2-RC3

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

   Problems on Irix6.5.x (n32 ABI mode).  The test server fails to even start.
(The Apache2 server itself starts and runs OK without mod_perl.)

   When I compile with MP_DEBUG=1 set the test reports this:

92021:/local/GML/install/apache2/bin/httpd: rld: Fatal Error:
 attempted access to unresolvable symbol in
   /local/GML/Apache2/mod_perl-2.0.0-RC3/blib/arch/auto/Apache/ServerUtil/ServerUtil.so: Perl_Tstack_sp_ptr


2. Used Components and their Configuration:

*** mod_perl version 1.999020

*** using /local/GML/Apache2/mod_perl-2.0.0-RC3/lib/Apache/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_AP_PREFIX   => /local/GML/install/apache2
  MP_COMPAT_1X   => 
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1


*** /local/GML/install/apache2/bin/httpd -V
Server version: Apache/2.0.52
Server built:   Jan  6 2005 14:00:24
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D BIG_SECURITY_HOLE
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/local/GML/install/apache2"
 -D SUEXEC_BIN="/local/GML/install/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** (apr|apu)-config linking info

 -L/local/GML/install/apache2/lib -lapr-0 -lm -lsocket  -lpthread
 -L/local/GML/install/apache2/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat



*** /GWD/bioinfo/tools/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=irix, osvers=6.5, archname=Irix-n32-thread-multi
    uname='irix64 ukwsv1 6.5 04091957 ip27 '
    config_args='-dE'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc -n32', ccflags ='-DPTHREAD_H_FIRST -D_BSD_TYPES -D_BSD_TIME -woff 1184,1552 -I/GWD/bioinfo/tools/include -I/GWD/bioinfo/common/include -DLANGUAGE_C',
    optimize='-O3 -OPT:Olimit=0:space=ON',
    cppflags='-DPTHREAD_H_FIRST -D_BSD_TYPES -D_BSD_TIME -woff 1184,1552 -I/GWD/bioinfo/tools/include -I/GWD/bioinfo/common/include -DLANGUAGE_C'
    ccversion='MIPSpro Compilers: Version 7.4.2m', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc -n32', ldflags ='-Wl,-woff,84 -L/GWD/bioinfo/tools/lib -Wl,-rpath -Wl,/GWD/bioinfo/tools/lib'
    libpth=/GWD/bioinfo/tools/lib /usr/lib32 /lib32
    libs=-lgdbm -ldb -lm -lpthread
    perllibs=-lm -lpthread
    libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-n32 -shared -L/GWD/bioinfo/tools/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under irix
  Compiled at Jul 27 2004 18:23:59
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /GWD/bioinfo/tools/lib/perl5/5.8.5
    /GWD/bioinfo/common/lib/perl5/5.8.5
    /GWD/bioinfo/tools/lib/perl5/site_perl/5.8.5
    /GWD/bioinfo/common/lib/perl5/site_perl/5.8.5
    /GWD/bioinfo/common/lib/perl5/site_perl
    .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.05
LWP            : 5.800
mod_perl       : -


3. This is the core dump trace: (if you get a core dump):

   Not anything useful.  The missing symbol occurs very early on...

This report was generated by t/REPORT on Thu Jan  6 16:18:07 2005 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
modperl <at> perl.apache.org. To subscribe to the list send an empty
email to modperl-subscribe@perl.apache.org.


-------- Gordon Lack --------------- gml4410@ggr.co.uk  ------------
This message *may* reflect my personal opinion.  It is *not* intended
to reflect those of my employer, or anyone else.


Re: [mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Gordon Lack wrote:
> 
>> Gordon Lack wrote:
>>
>>>>>   While it now does unshift rather than push (so the entries end up at
>>>>> the front of @INC, not the back) it does so backwards!
>>>>>
>>>>>  eg:
>>>>>
>>>>> PerlPassEnv PERL5LIB /dir1:/dir2:/dir3

I've added a reference to this suggestion into the STATUS file. So whoever 
is going to work on the release of the next version of mp1 will test and 
merge it. Thanks Gordon.


-- 
__________________________________________________________________
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

Re: [mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Stas Bekman <st...@stason.org>.
Gordon Lack wrote:
> Gordon Lack wrote:
> 
>>>>   While it now does unshift rather than push (so the entries end up at
>>>>the front of @INC, not the back) it does so backwards!
>>>>
>>>>  eg:
>>>>
>>>> PerlPassEnv PERL5LIB /dir1:/dir2:/dir3
>>>
>>>You mean, PerlSetEnv, don't you? PerlPassEnv doesn't accept values.
>>
>>   Yes, I did - but you get the idea :-).
> 
> 
>    Related bug.

>    Using PERL5LIB in this way does not add architecture-specific
> sub-dirs to @INC (which setting PERL5LIB in the environment does do).

why not fixing that too? should be as easy as copying the relevant bits of 
code from the perl source (just grep for PERL5LIB).

>    Suggested fix:
> 
>   Document the use of:
> 
> <Perl>
>    use lib qw( /dir1 /dir2 /dir3 );
> /Perl>
> 
> instead if you wish to affect mod_perl, or just use SetEnv if you just
> want to affect CGI (but those scripts *should* be using use lib
> themselves....IMHO).


-- 
__________________________________________________________________
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

Re: [mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Gordon Lack <gm...@ggr.co.uk>.
Gordon Lack wrote:
> 
> > >    While it now does unshift rather than push (so the entries end up at
> > > the front of @INC, not the back) it does so backwards!
> > >
> > >   eg:
> > >
> > >  PerlPassEnv PERL5LIB /dir1:/dir2:/dir3
> >
> > You mean, PerlSetEnv, don't you? PerlPassEnv doesn't accept values.
> 
>    Yes, I did - but you get the idea :-).

   Related bug.

   Using PERL5LIB in this way does not add architecture-specific
sub-dirs to @INC (which setting PERL5LIB in the environment does do).

   Suggested fix:

  Document the use of:

<Perl>
   use lib qw( /dir1 /dir2 /dir3 );
/Perl>

instead if you wish to affect mod_perl, or just use SetEnv if you just
want to affect CGI (but those scripts *should* be using use lib
themselves....IMHO).


Re: [mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Gordon Lack <gm...@ggr.co.uk>.
> >    While it now does unshift rather than push (so the entries end up at
> > the front of @INC, not the back) it does so backwards!
> >
> >   eg:
> >
> >  PerlPassEnv PERL5LIB /dir1:/dir2:/dir3
> 
> You mean, PerlSetEnv, don't you? PerlPassEnv doesn't accept values.

   Yes, I did - but you get the idea :-).

> Sounds right. Did you forget to attach the patch? :)

   No, I hadn't written it at the time.  But I have now.

> Though I'm not sure how sensitive that change is. I mean someone who have
> been relying on the current implementation might get bitten by this change.

   The same could have been said of the fix at 1.27.


   Anyway, here is a fix.  rather than a patch it's the entire code of
the small perl_inc_unshift() function in src/modules/perl/perl_util.c
(line 789pp).

   I've tested the loop logic, but not actually put this into a runnign
mod_perl.  So I've only copied the perl logic (the newSV(), sv_setpvn(),
av_unshift() and av_store() calls) from the current code.  Also, I'm not
sure what should happen to an empty PERL5LIB setting or empty parts.  By
dfault the code will add empty variables - if this is wrong just add in
the code by activating the relevant ifdefs (and remove the ifdef
sections which aren't needed).




src/modules/perl/perl_util.c: 789



void perl_inc_unshift(char *p)
{
    char *wp, *ep;

    if(!p) return;

#ifdef IGNORE_EMPTY_PERL5LIB
    if (!*p) return;
#endif

    wp = p + strlen(p);  /* Points at terminating null */
    ep = wp - 1;         /* Points at final non-null */

    while (wp >= p) {
        SV *libdir = newSV(0);
        while(!((--wp == p-1) || (*wp == PERLLIB_SEP)));
#ifdef IGNORE_EMPTY_PERL5LIB_PARTS
        if (ep == wp) {
            ep=wp-1;
            continue;
        }
#endif
        sv_setpvn(libdir, wp+1, (STRLEN)(ep-wp));
        av_unshift(GvAV(incgv), 1);
        av_store(GvAV(incgv), 0, libdir);
        ep=wp-1;
    }
}


Re: [mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Stas Bekman <st...@stason.org>.
[when starting a new thread, please do *not* reply to a previous thread]

Gordon Lack wrote:
>    The Changes file notes:
> 
> 
>>PERL5LIB support now properly unshifts paths into @INC rather than push
> 
> 
> (added in 1.27)
> 
>    While it now does unshift rather than push (so the entries end up at
> the front of @INC, not the back) it does so backwards!
> 
>   eg:
> 
>  PerlPassEnv PERL5LIB /dir1:/dir2:/dir3

You mean, PerlSetEnv, don't you? PerlPassEnv doesn't accept values.

> will end up setting @INC to:
> 
>  /dir3
>  /dir2
>  /dir1
>  <pr...@INC>
> 
> (you can see this via Apache::Status)

Sounds right. Did you forget to attach the patch? :)

Though I'm not sure how sensitive that change is. I mean someone who have 
been relying on the current implementation might get bitten by this change.

-- 
__________________________________________________________________
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

[mp1] PERL5LIB handled backwards (mod_perl 1.27+)

Posted by Gordon Lack <gm...@ggr.co.uk>.
   The Changes file notes:

> PERL5LIB support now properly unshifts paths into @INC rather than push

(added in 1.27)

   While it now does unshift rather than push (so the entries end up at
the front of @INC, not the back) it does so backwards!

  eg:

 PerlPassEnv PERL5LIB /dir1:/dir2:/dir3

will end up setting @INC to:

 /dir3
 /dir2
 /dir1
 <pr...@INC>

(you can see this via Apache::Status)


Re: Bug(?) in mod_perl-2 RC3

Posted by Stas Bekman <st...@stason.org>.
Gordon Lack wrote:

>>Wow, irix. It's a first time I see anybody trying modperl on it.
> 
> 
>    Really?  I've had it running v1.25 on Apache1.3.x for years.

Sorry, I meant to say mp2.

>>Can you identify where the process spins? e.g. try the technique explained
>>in: 21.7.4.1. Using the Perl trace
>>http://modperlbook.org/html/ch21_07.html or some tracing tool.
>>
>>any difference if you put an eval {}  block around that line?
> 
> 
>    Well, I doubt it will make much difference given that it was reported for a different script.
> 
>    It all seems to be pointing to issues around (non-)blocking sockets?  The echo_block and echo_filter tests both refer to fixes on Apache2.0.52 for Open/NetBSD here.
> 
>    Anyway - here's what you requested (after adding t/conf/modperl_extra.pl):

[...]
>      Book::Startup::__ANON__('USR2')
>          called at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 22
>      eval {...} called at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 22

so it spins in the filter? Blocking? Or running it like mad? you can run:
http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlTrace_

MOD_PERL_TRACE=f t/TEST t/protocol/echo_block t/protocol/echo_filter

(see the URL above how to get the tracing going). That may give you some 
better ideas of what's going on underneath and where it spins.

Debugging by proxy is a way too frustrating, so if you could try to debug 
yourself, I'll gladly answer any questions you may need to ask to get 
yourself going.

I'd start with taking those tests out of the modperl suite, and putting 
them into a dedicated test-case - that will make things faster and easier 
to debug. You do that by copying (.pm|.t) files into:
http://perl.apache.org/~geoff/bug-reporting-skeleton-mp2.tar.gz

-- 
__________________________________________________________________
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

Re: Bug(?) in mod_perl-2 RC3

Posted by Gordon Lack <gm...@ggr.co.uk>.
> >    Web servers itself starts spinning on 100% CPU once this happens.
> >
> >    Log has this entry:
> >
> > [Thu Jan 06 18:52:18 2005] [error] APR::Socket::recv:
> >   (11) Resource temporarily unavailable at
> > /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_block.pm line 41
> 
> I suppose that's t/protocol/echo_block.t  (and not t/protocol/echo_filter), right?


   No - the test output at this stage looks like this:


t/protocol/echo_block...................# Failed test 3 in t/protocol/echo_block.t at line 22 fail #2
FAILED test 3
        Failed 1/3 tests, 66.67% okay
t/protocol/echo_filter..................

(there no no newline on that last line.)

> Wow, irix. It's a first time I see anybody trying modperl on it.

   Really?  I've had it running v1.25 on Apache1.3.x for years.

> Can you identify where the process spins? e.g. try the technique explained
> in: 21.7.4.1. Using the Perl trace
> http://modperlbook.org/html/ch21_07.html or some tracing tool.
> 
> any difference if you put an eval {}  block around that line?

   Well, I doubt it will make much difference given that it was reported for a different script.

   It all seems to be pointing to issues around (non-)blocking sockets?  The echo_block and echo_filter tests both refer to fixes on Apache2.0.52 for Open/NetBSD here.

   Anyway - here's what you requested (after adding t/conf/modperl_extra.pl):

   I removed all of the dirs (expect lib) from t which preceded protocol then ran "make test".  This is the resulting log (I've wrapped some bits, but the longer lines may still wrap...).

=====================================================================================


[Mon Jan 10 17:52:05 2005] [info]
   Init: Initializing OpenSSL library
[Mon Jan 10 17:52:05 2005] [info]
   Init: Seeding PRNG with 0 bytes of entropy
[Mon Jan 10 17:52:05 2005] [info]
   Init: Generating temporary RSA private keys (512/1024 bits)
[Mon Jan 10 17:52:06 2005] [info]
   Init: Generating temporary DH parameters (512/1024 bits)
[Mon Jan 10 17:52:06 2005] [warn]
   Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Jan 10 17:52:06 2005] [info]
   Init: Initializing (virtual) servers for SSL
[Mon Jan 10 17:52:06 2005] [info]
   Server: Apache/2.0.52, Interface: mod_ssl/2.0.52, Library: OpenSSL/0.9.7d
[Mon Jan 10 17:52:06 2005] [info]
   Init: Initializing OpenSSL library
[Mon Jan 10 17:52:06 2005] [info]
   Init: Seeding PRNG with 0 bytes of entropy
[Mon Jan 10 17:52:06 2005] [info]
   Init: Generating temporary RSA private keys (512/1024 bits)
[Mon Jan 10 17:52:07 2005] [info]
   Init: Generating temporary DH parameters (512/1024 bits)
[Mon Jan 10 17:52:07 2005] [info]
   Init: Initializing (virtual) servers for SSL
[Mon Jan 10 17:52:07 2005] [info]
   Server: Apache/2.0.52, Interface: mod_ssl/2.0.52, Library: OpenSSL/0.9.7d
[Mon Jan 10 17:52:07 2005] [notice]
   Digest: generating secret for digest authentication ...
[Mon Jan 10 17:52:07 2005] [notice]
   Digest: done
[Mon Jan 10 17:52:07 2005] [notice]
   Apache/2.0.52 (Unix) DAV/2 mod_ssl/2.0.52 OpenSSL/0.9.7d
     mod_perl/1.999.20 Perl/v5.8.5 configured -- resuming normal operations
[Mon Jan 10 17:52:07 2005] [info]
   Server built: Jan  6 2005 14:00:24
[Mon Jan 10 17:52:07 2005] [debug]
   prefork.c(955): AcceptMutex: sysvsem (default: sysvsem)
[Mon Jan 10 17:52:16 2005] [error]
   recv() has returned untainted data:
     at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_block.pm line 38.\n
[Mon Jan 10 17:52:41 2005] [error]
   Caught SIGUSR2! at
     /local/GML/Apache2/mod_perl-2.0.0-RC3/t/conf/modperl_extra.pl line 6
     Book::Startup::__ANON__('USR2')
         called at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 22
     eval {...} called at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 22
     TestProtocol::echo_filter::uc_filter('Apache::Filter=SCALAR(0x102b00d0)', 'APR::Brigade=SCALAR(0x102b0100)') called at
         /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 50
     eval {...} called at /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 50
     TestProtocol::echo_filter::handler('Apache::Connection=SCALAR(0x101ab0c8)') called at -e line 0
     eval {...} called at -e line 0
[Mon Jan 10 17:52:41 2005] [error]
   Apache::Filter::fflush: (500) Block not fully transferred at
     /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_filter.pm line 50
[Mon Jan 10 17:52:50 2005] [error]
   APR::Socket::recv: (11) Resource temporarily unavailable at
     /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/pseudo_http.pm line 118
[Mon Jan 10 17:52:50 2005] [error]
   APR::Socket::recv: (11) Resource temporarily unavailable at
     /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/pseudo_http.pm line 118

*** The following error entry is expected and harmless ***
[Mon Jan 10 17:52:50 2005] [info]
   removed PID file /local/GML/Apache2/mod_perl-2.0.0-RC3/t/logs/httpd.pid (pid=328342)
[Mon Jan 10 17:52:50 2005] [notice]
   caught SIGTERM, shutting down


Re: Bug(?) in mod_perl-2 RC3

Posted by Stas Bekman <st...@stason.org>.
Gordon Lack wrote:
>  
> 
> 
> ------------------------------------------------------------------------
> 
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
>    Testing web server hangs in t/protocol/echo_filter
> 
>    Web servers itself starts spinning on 100% CPU once this happens.
> 
>    Log has this entry:
> 
> [Thu Jan 06 18:52:18 2005] [error] APR::Socket::recv: 
>   (11) Resource temporarily unavailable at
> /local/GML/Apache2/mod_perl-2.0.0-RC3/t/protocol/TestProtocol/echo_block.pm line 41

I suppose that's t/protocol/echo_block.t  (and not 
t/protocol/echo_filter), right?

>     osname=irix, osvers=6.5, archname=Irix-n32-thread-multi

Wow, irix. It's a first time I see anybody trying modperl on it.

Can you identify where the process spins? e.g. try the technique explained 
in: 21.7.4.1. Using the Perl trace 
http://modperlbook.org/html/ch21_07.html or some tracing tool.

any difference if you put an eval {}  block around that line?


-- 
__________________________________________________________________
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

Bug(?) in mod_perl-2 RC3

Posted by Gordon Lack <gm...@ggr.co.uk>.
 

Re: Missing symbol: mod_perl2-RC3

Posted by Stas Bekman <st...@stason.org>.
Gordon Lack wrote:
>>Yes, it means that irix is a special case and needs to add this option. So
>>you have most of it solved. Now please take a look at
>>perl_config_lddlflags in lib/Apache/Build.pm, it should probably go there
>>(make a special case for IRIX). A patch would be gladly accepted.
> 
> 
>    It's ldopts() that needs the code.
> 
>    Here is a patch.  Tested on irix.  Added option at correct place.
> 
> ====================
> --- Build.pm.orig   Thu Jan  6 00:46:49 2005
> +++ Build.pm    Mon Jan 10 18:28:58 2005
> @@ -442,6 +442,16 @@
>  
>      $config->{ldflags} = $ldflags; #reset
>  
> +# Iff we are on Irix then we need to persuade the symbols in libperl.a
> +# to not be HIDDEN once we load them into mod_perl.so.  So we need to
> +# add -exports immediately before -lperl.
> +# This assumes we need this for all irix builds.
> +#
> +    if ($^O eq 'irix') {
> +       warn "Failed to fix Irix symbol exporting\n" unless
> +            ($ldopts =~ s/-lperl\b/-exports -lperl/);
> +    }
> +
>      $ldopts;
>  }

Thanks, committed with some minor tweaks.
http://svn.apache.org/viewcvs.cgi?view=rev&rev=124833

-- 
__________________________________________________________________
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

Re: Missing symbol: mod_perl2-RC3

Posted by Gordon Lack <gm...@ggr.co.uk>.
> Yes, it means that irix is a special case and needs to add this option. So
> you have most of it solved. Now please take a look at
> perl_config_lddlflags in lib/Apache/Build.pm, it should probably go there
> (make a special case for IRIX). A patch would be gladly accepted.

   It's ldopts() that needs the code.

   Here is a patch.  Tested on irix.  Added option at correct place.

====================
--- Build.pm.orig   Thu Jan  6 00:46:49 2005
+++ Build.pm    Mon Jan 10 18:28:58 2005
@@ -442,6 +442,16 @@
 
     $config->{ldflags} = $ldflags; #reset
 
+# Iff we are on Irix then we need to persuade the symbols in libperl.a
+# to not be HIDDEN once we load them into mod_perl.so.  So we need to
+# add -exports immediately before -lperl.
+# This assumes we need this for all irix builds.
+#
+    if ($^O eq 'irix') {
+       warn "Failed to fix Irix symbol exporting\n" unless
+            ($ldopts =~ s/-lperl\b/-exports -lperl/);
+    }
+
     $ldopts;
 }


Re: Missing symbol: mod_perl2-RC3

Posted by Gordon Lack <gm...@ggr.co.uk>.
> Yes, it means that irix is a special case and needs to add this option. So
> you have most of it solved. Now please take a look at
> perl_config_lddlflags in lib/Apache/Build.pm, it should probably go there

  No - that won't work.  The "-exports" option need to go immediately befofe -lperl.  Nowehere else.

  Am looking....


Re: Missing symbol: mod_perl2-RC3

Posted by Stas Bekman <st...@stason.org>.
Gordon Lack wrote:
>>>   When I compile with MP_DEBUG=1 set the test reports this:
>>>
>>>92021:/local/GML/install/apache2/bin/httpd: rld: Fatal Error:
>>> attempted access to unresolvable symbol in
>>>   /local/GML/......../ServerUtil.so: Perl_Tstack_sp_ptr
>>
>>Please take a look at:
>>http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_
>>
>>Is that the cause of the problem?
> 
> 
>    No - it isn't.  I know that because the good(?) news is that I've
> found out what the problem is.
> 
>    The symbol is in mod_perl.so, but is HIDDEN.  This seems to be
> because it has been obtained from a static archive (libperl.a).  [NOTE: 
> This last statement could be completely wrong - I'm basing this on a
> quick perusal of man pages, not knowledge]
> 
>    The solution (*very* basic at present) is to tell the loader to
> export symbols from libperl.a which it would otherwise hide.  To do this
> I fished out the loinker command which produced mod_perl.so and added a
> "-exports" option immediatley before "-lperl"  (this option only affects
> the next load).
> 
>    Hardly a usable solution, but I'll see what I can do as far as
> automation goes...

Yes, it means that irix is a special case and needs to add this option. So 
you have most of it solved. Now please take a look at 
perl_config_lddlflags in lib/Apache/Build.pm, it should probably go there 
(make a special case for IRIX). A patch would be gladly accepted.


-- 
__________________________________________________________________
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

Re: Missing symbol: mod_perl2-RC3

Posted by Gordon Lack <gm...@ggr.co.uk>.
> >    When I compile with MP_DEBUG=1 set the test reports this:
> >
> > 92021:/local/GML/install/apache2/bin/httpd: rld: Fatal Error:
> >  attempted access to unresolvable symbol in
> >    /local/GML/......../ServerUtil.so: Perl_Tstack_sp_ptr
> 
> Please take a look at:
> http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_
>
> Is that the cause of the problem?

   No - it isn't.  I know that because the good(?) news is that I've
found out what the problem is.

   The symbol is in mod_perl.so, but is HIDDEN.  This seems to be
because it has been obtained from a static archive (libperl.a).  [NOTE: 
This last statement could be completely wrong - I'm basing this on a
quick perusal of man pages, not knowledge]

   The solution (*very* basic at present) is to tell the loader to
export symbols from libperl.a which it would otherwise hide.  To do this
I fished out the loinker command which produced mod_perl.so and added a
"-exports" option immediatley before "-lperl"  (this option only affects
the next load).

   Hardly a usable solution, but I'll see what I can do as far as
automation goes...

   The server now starts for tests.  It seems to have failed a few, but
I haven't had a look at that yet.


Re: Missing symbol: mod_perl2-RC3

Posted by Stas Bekman <st...@stason.org>.
Lack Mr G M wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
>    Problems on Irix6.5.x (n32 ABI mode).  The test server fails to even start.
> (The Apache2 server itself starts and runs OK without mod_perl.)
> 
>    When I compile with MP_DEBUG=1 set the test reports this:
> 
> 92021:/local/GML/install/apache2/bin/httpd: rld: Fatal Error:
>  attempted access to unresolvable symbol in
>    /local/GML/Apache2/mod_perl-2.0.0-RC3/blib/arch/auto/Apache/ServerUtil/ServerUtil.so: Perl_Tstack_sp_ptr

Please take a look at:
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_relocation_errors__or__undefined_symbol_
Is that the cause of the problem?

-- 
__________________________________________________________________
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