You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by tim fulcher <fu...@drink.bt.co.uk> on 2001/02/14 17:27:57 UTC

Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP 4.0.4pl1 OK ?

Hi

Has anybody managed to get the combination in the title coexisting
happily ? My platform is Solaris 2.6 and my perl config is listed right
at the bottom of this message.

Evrything compiles without complaint. PHP works fine, Sablotron (via
Perl & PHP) works fine, but any script using XML::Parser or XML::XPath
itself just bombs. Outside of mod_perl the scripts run fine. I've got
the latest versions (Parser 2.30 & XPath 1.04). A couple of backtraces I
got from gdb running scripts are below. If I comment out the LoadModule
/ AddModule for php4 in httpd.conf  the scripts work.

A script using XML::XPath gives

(gdb) run -X -D -f /export/tools/apache/conf/httpd.conf -d
/export/tools/apache/perl
Starting program: /export/tools/apache/bin/./httpd -X -D -f
/export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl

Program received signal SIGSEGV, Segmentation fault.
0xef396200 in XML_ErrorString () from /usr/local/lib/libxmlparse.so.1
(gdb) bt
#0  0xef396200 in XML_ErrorString () from
/usr/local/lib/libxmlparse.so.1
#1  0xef396088 in XML_ErrorString () from
/usr/local/lib/libxmlparse.so.1
#2  0xef3918fc in XML_SetBase () from /usr/local/lib/libxmlparse.so.1
#3  0xef48d14c in my_fclose (fd=0x8fa340, MyFlags=-280440836) at
my_fopen.c:68
#4  0x13303c in Perl_pp_entersub ()
#5  0x12c03c in Perl_runops_standard ()
#6  0xe1b60 in S_call_body ()
#7  0xe186c in perl_call_sv ()
#8  0x49314 in perl_call_handler ()
#9  0x48964 in perl_run_stacked_handlers ()
#10 0x46594 in perl_handler ()
#11 0xa9738 in ap_invoke_handler ()
#12 0xc66c0 in process_request_internal ()
#13 0xc6744 in ap_process_request ()
#14 0xb9d60 in child_main ()
#15 0xb9ff4 in make_child ()
#16 0xba210 in startup_children ()
#17 0xbac00 in standalone_main ()
#18 0xbb7fc in main ()

A script using just XML::Parser gives

gdb)  run -X -D -f /export/tools/apache/conf/httpd.conf -d
/export/tools/apache/perl
Starting program: /export/tools/apache/bin/./httpd -X -D -f
/export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl

Program received signal SIGBUS, Bus error.
0x9970a0 in ?? ()
(gdb) Starting program: /export/tools/apache/bin/./httpd -X -D -f
/export/tools/apache/conf/httpd.conf -d /export/tools/apache/perl
Undefined command: "Starting".  Try "help".
(gdb) bt
#0  0x9970a0 in ?? ()
#1  0xef484e30 in ttyname_r (__fildes=1870872, __buf=0x1c4ea8 "",
__size=9707920)
    at /usr/include/unistd.h:769
#2  0xef48a1b0 in XS_XML__Parser__Expat_ParseStream () at mf_pack.c:196
#3  0x13303c in Perl_pp_entersub ()
#4  0x12c03c in Perl_runops_standard ()
#5  0xe1b60 in S_call_body ()
#6  0xe186c in perl_call_sv ()
#7  0x49314 in perl_call_handler ()
#8  0x48964 in perl_run_stacked_handlers ()
#9  0x46594 in perl_handler ()
#10 0xa9738 in ap_invoke_handler ()
#11 0xc66c0 in process_request_internal ()
#12 0xc6744 in ap_process_request ()
#13 0xb9d60 in child_main ()
#14 0xb9ff4 in make_child ()
#15 0xba210 in startup_children ()
#16 0xbac00 in standalone_main ()
#17 0xbb7fc in main ()


modperl build:

perl Makefile.PL  PERL_DEBUG=1 USE_APACI=1 DO_HTTPD=1 PREP_HTTPD=1
EVERYTHING=1
PERL_USELARGEFILES=0
make
make install

then built Apache as
./configure --with-layout=Apache --prefix=/export/tools/apache
--activate-module=src/modules/perl/libperl.a \
--enable-module=most --enable-shared=auth_anon --disable-rule=EXPAT
make
make install

finally build PHP4 as

./configure --with-apxs=/export/tools/apache/bin/apxs
--prefix=/export/tools --with-ldap --disable-xml \
--with-sablot=/export/tools/Sablot-0.44
make install

If I do strings /export/tools/apache/bin/httpd | grep -i XML I get
nothing.

Any similar experiences or suggestion would be appreciated. Right now
I'm so jaded by all this I might quit & go stack shelves at Tescos :-/


Tim


Perl config -

humber-45> perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:

  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos humber 5.6 generic_105181-15 sun4m sparc
sunw,sparcstation-20 '
    config_args='-Dcc=gcc -B/usr/ccs/bin/'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define
    use64bitint=undef use64bitall=undef uselongdouble=undef
usesocks=undef
  Compiler:
    cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=2.95.1 19990816
(release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    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, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Feb  7 2001 13:56:24
  @INC:
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .


Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?

Posted by Robert Landrum <rl...@capitoladvantage.com>.
Try setting LD_LIBRARY_PATH to wherever your xml lib is located. 
Another possiblity is that you're using the old Sablotron.so (0.44) 
rather than the newer one...

I've never used Sablotron, but I've had similar problems with ld.so 
and oracle (libclntsh.so).  In almost every case, setting the 
LD_LIBRARY_PATH to the correct path fixes the error.

Robert Landrum


>Matt Sergeant wrote:
>
>> On Wed, 14 Feb 2001, tim fulcher wrote:
>>
>> > Hi
>> >
>> > finally build PHP4 as
>> >
>> > ./configure --with-apxs=/export/tools/apache/bin/apxs
>> > --prefix=/export/tools --with-ldap --disable-xml \
>> > --with-sablot=/export/tools/Sablot-0.44
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> This is most likely your problem. Try with Sablot 0.50 which links to the
>> same expat as XML::Parser
>
>That would be my approach .... except I can't get XML::Sablotron to work
>against 0.5  :-/
>Sablotron itself builds OK and works (well a noddy test with sabcmd
>succeeds). Indeed XML::Sablotron make works but then I get an error with make
>test
>
>humber-1033> make test
>PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
>-I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0
>test.pl
>1..10
>Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module
>XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file
>blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData:
>referenced symbol not found at
>/usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200.
> at test.pl line 91
>Compilation failed in require at test.pl line 91.
>BEGIN failed--compilation aborted at test.pl line 91.
>make: *** [test_dynamic] Error 255
>
>I was sticking with 0.44 because at least it worked. In fact if you think
>Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton
>operated just fine under mod_perl ?
>
>Thanks for the suggestion though
>
>
>Tim


--
"Only two things are infinite: The universe, and human stupidity. And I'm not
sure about the former." --Albert Einstein

APXS was Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 &PHP4.0.4pl1 OK ?

Posted by tim fulcher <fu...@drink.bt.co.uk>.
Thanks to all who have responded so far.

OK then. I've managed to build PHP and XML::Sablotron against Sablotron 0.5
Both  PHP and Perl (in & outside of modperl) work fine on the tests so far.

[ FWIW , the XML::Sablotron works fine again the precompiled binary installation of
Sablotron but not against the libraries built from source. To throw a wrench in the
works, the binary version of sabcmd has a library dependency not present in the
source version. Whatever... ]

So now then, in theory, I have no use of the old Expat anywhere.

But... still no joy !

the last few lines of the back trace are different, but still much the same.
Program received signal SIGSEGV, Segmentation fault.
0x135280 in Perl_sv_setiv ()
(gdb) bt
#0  0x135280 in Perl_sv_setiv ()
#1  0x60088 in XS_Apache__Server_loglevel ()
#2  0xef164e30 in parse_stream ()
   from
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/XML/Parser/Expat/Expat.so
#3  0xef16a1b0 in XS_XML__Parser__Expat_ParseStream ()
   from
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/XML/Parser/Expat/Expat.so
#4  0x13303c in Perl_pp_entersub ()
#5  0x12c03c in Perl_runops_standard ()

Its found the right place to look if nothing else. :-)

I'm beginning to wonder if it is anything to do with XML::Parser at all, that just
happens to be a case which causes it to fail. I confess to only having a vague
understanding of XS, but my gut feel is that it ain't happening properly. Something
peculiar I did notice  though.
When I compile any apache module (PHP, auth_ldap)  against APXS I notice these
flags are always passed in

gcc -c- g -02 -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=260 -DMOD_PERL -DUSE_PERL_SSI
-DUSE_EXPAT
                                ^^^^^^^^^^^^^
Why is that still there, when Apache was built with --disable-rule=EXPAT ?

Tim


Matt Sergeant wrote:

> On Wed, 14 Feb 2001, tim fulcher wrote:
>
> > Matt Sergeant wrote:
> >
> > > On Wed, 14 Feb 2001, tim fulcher wrote:
> > >
> > > > Hi
> > > >
> > > > finally build PHP4 as
> > > >
> > > > ./configure --with-apxs=/export/tools/apache/bin/apxs
> > > > --prefix=/export/tools --with-ldap --disable-xml \
> > > > --with-sablot=/export/tools/Sablot-0.44
> > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > >
> > > This is most likely your problem. Try with Sablot 0.50 which links to the
> > > same expat as XML::Parser
> >
> > I was sticking with 0.44 because at least it worked. In fact if you think
> > Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton
> > operated just fine under mod_perl ?
>
> *shrug*... Its all a mystery to me :-)
>
> Try the PHP lists.


Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 14 Feb 2001, tim fulcher wrote:

> Matt Sergeant wrote:
>
> > On Wed, 14 Feb 2001, tim fulcher wrote:
> >
> > > Hi
> > >
> > > finally build PHP4 as
> > >
> > > ./configure --with-apxs=/export/tools/apache/bin/apxs
> > > --prefix=/export/tools --with-ldap --disable-xml \
> > > --with-sablot=/export/tools/Sablot-0.44
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > This is most likely your problem. Try with Sablot 0.50 which links to the
> > same expat as XML::Parser
>
> That would be my approach .... except I can't get XML::Sablotron to work
> against 0.5  :-/
> Sablotron itself builds OK and works (well a noddy test with sabcmd
> succeeds). Indeed XML::Sablotron make works but then I get an error with make
> test
>
> humber-1033> make test
> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0
> test.pl
> 1..10
> Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module
> XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file
> blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData:
> referenced symbol not found at
> /usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200.
>  at test.pl line 91
> Compilation failed in require at test.pl line 91.
> BEGIN failed--compilation aborted at test.pl line 91.
> make: *** [test_dynamic] Error 255
>
> I was sticking with 0.44 because at least it worked. In fact if you think
> Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton
> operated just fine under mod_perl ?

*shrug*... Its all a mystery to me :-)

Try the PHP lists.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?

Posted by Robin Berjon <ro...@knowscape.com>.
At 19:23 14/02/2001 +0000, tim fulcher wrote:
>Matt Sergeant wrote:
>> > --with-sablot=/export/tools/Sablot-0.44
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> This is most likely your problem. Try with Sablot 0.50 which links to the
>> same expat as XML::Parser
>
>That would be my approach .... except I can't get XML::Sablotron to work
>against 0.5  :-/
>Sablotron itself builds OK and works (well a noddy test with sabcmd
>succeeds). Indeed XML::Sablotron make works but then I get an error with make
>test

I had the same problem. Downloading the sablotron 0.5 binary instead of
building from source fixed the problem. Nobody can seem to track down the
problem with the 0.5 source (I haven't tried, not my cup of tea, but others
have) but it seems that the binary is built against a different source that
works (at least that was the conclusion that I saw reached).

-- robin b.
"Oh no not again !" said the bowl of petunias


Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP4.0.4pl1 OK ?

Posted by tim fulcher <fu...@drink.bt.co.uk>.
Matt Sergeant wrote:

> On Wed, 14 Feb 2001, tim fulcher wrote:
>
> > Hi
> >
> > finally build PHP4 as
> >
> > ./configure --with-apxs=/export/tools/apache/bin/apxs
> > --prefix=/export/tools --with-ldap --disable-xml \
> > --with-sablot=/export/tools/Sablot-0.44
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> This is most likely your problem. Try with Sablot 0.50 which links to the
> same expat as XML::Parser

That would be my approach .... except I can't get XML::Sablotron to work
against 0.5  :-/
Sablotron itself builds OK and works (well a noddy test with sabcmd
succeeds). Indeed XML::Sablotron make works but then I get an error with make
test

humber-1033> make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0
test.pl
1..10
Can't load 'blib/arch/auto/XML/Sablotron/Sablotron.so' for module
XML::Sablotron: ld.so.1: /usr/bin/perl: fatal: relocation error: file
blib/arch/auto/XML/Sablotron/Sablotron.so: symbol SablotGetInstanceData:
referenced symbol not found at
/usr/local/lib/perl5/5.6.0/sun4-solaris/DynaLoader.pm line 200.
 at test.pl line 91
Compilation failed in require at test.pl line 91.
BEGIN failed--compilation aborted at test.pl line 91.
make: *** [test_dynamic] Error 255

I was sticking with 0.44 because at least it worked. In fact if you think
Sablotron 0.44 was the problem with my earlier builds, howcome XML::Sabloton
operated just fine under mod_perl ?

Thanks for the suggestion though


Tim


Re: Is *anybody* running perl 5.6, modperl_1.25, apache_1.3.17 & PHP 4.0.4pl1 OK ?

Posted by Matt Sergeant <ma...@sergeant.org>.
On Wed, 14 Feb 2001, tim fulcher wrote:

> Hi
>
> finally build PHP4 as
>
> ./configure --with-apxs=/export/tools/apache/bin/apxs
> --prefix=/export/tools --with-ldap --disable-xml \
> --with-sablot=/export/tools/Sablot-0.44
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is most likely your problem. Try with Sablot 0.50 which links to the
same expat as XML::Parser.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\