0

I've run into a problem when using XML::Parser under our modperl setup in production (on AIX 5.3). It works fine in development but fails on production with the following error:

    [Tue Apr 03 08:44:03 2012] [error] Can't load '/wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so' for mo
ule XML::Parser::Expat: Could not load module /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so.\n\tDepe
dent module /wload/es1p/app/usr/local/apache2/lib/libexpat.a(libexpat.so.1) could not be loaded.\n\tMember libexpat.so.1 is not fou
d in archive \nCould not load module /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so.\n\tDependent mod
le /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/auto/XML/Parser/Expat/Expat.so could not be loaded. at /wload/es1p/app/perl/lib/5.
0.1/aix/DynaLoader.pm line 200.\n at /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 18\nCompilation failed in req
ire at /wload/es1p/app/perl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 18.\nBEGIN failed--compilation aborted at /wload/es1p/app/p
rl/lib/site_perl/5.10.1/aix/XML/Parser.pm line 22.\nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/
Path/XMLParser.pm line 7.\nBEGIN failed--compilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath/XMLParser.pm li
e 7.\nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath.pm line 13.\nBEGIN failed--compilation a
orted at /wload/es1p/app/perl/lib/site_perl/5.10.1/XML/XPath.pm line 13.\nCompilation failed in require at /wload/es1p/app/perl/lib
site_perl/5.10.1/Net/SAML2/IdP.pm line 23.\nBEGIN failed--compilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML
/IdP.pm line 23.\nCompilation failed in require at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML2.pm line 69.\nBEGIN failed--c
mpilation aborted at /wload/es1p/app/perl/lib/site_perl/5.10.1/Net/SAML2.pm line 69.\nCompilation failed in require at /wload/es1p/
pp/usr/local/apache2/perl-bin/sso.pl line 4.\nBEGIN failed--compilation aborted at /wload/es1p/app/usr/local/apache2/perl-bin/sso.pl

The expat/expat-devel libraries were installed into /opt/freeware/lib using a package (the same one on dev and live) and both show the same output from ldd Expat.so:

Expat.so needs:
     /usr/lib/libc.a(shr.o)
     /opt/freeware/lib/libexpat.a(libexpat.so.1)
     /unix
     /usr/lib/libcrypt.a(shr.o)

I've tried setting up LIBPATH both in our dotfiles and in our mod_env configuration but with no luck. I'm not expecting someone to know the exact answer but I've run out of ideas as to what I can try so I'm hoping for some suggestions to try out.

EDIT: I should also point out that the same script using XML::Parser works perfectly as a normal cgi-bin script on our live server.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Nick
  • 2,418
  • 16
  • 20

1 Answers1

0

One thought: Maybe there are two different XML::Parser installed on your prod server. Your CGI pick one and your script pick the another?

Print out the @INC from script (on prod and dev) and from your working CGI and compare the result.

regards,

user1126070
  • 5,059
  • 1
  • 16
  • 15