Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Installing XML::Parser (with expat)

by derby (Abbot)
on Feb 13, 2007 at 18:57 UTC ( [id://599744]=note: print w/replies, xml ) Need Help??


in reply to Installing XML::Parser (with expat)

Your Expat.so depends on external libraries (libexpat.so). Do an

ldd /home/reliant/shaw/perlmodules/sun4-solaris/auto/XML/Parser/Expat/Expat.so

to see what libraries your version is dependent upon. You then either need to update your LD_LIBRARY_PATH to include the libexpat.so directory (or update whatever conf file Solaris uses to control library loading - on linux it's /etc/ld.so.conf).

-derby

Replies are listed 'Best First'.
Re^2: Installing XML::Parser (with expat)
by dorko (Prior) on Feb 13, 2007 at 22:04 UTC
    derby,

    I appreciate your help. I think I've done what you've suggested.

    ldd /home/reliant/shaw/perlmodules/sun4-solaris/auto/XML/Parser/Expat/ +Expat.so libexpat.so.1 => /home/reliant/shaw/.local/lib/libexpa +t.so.1 libc.so.1 => /usr/lib/libc.so.1 libgcc_s.so.1 => /local/gnu/lib//libgcc_s.so.1 libdl.so.1 => /usr/lib/libdl.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1

    So I modified my script to add /local/gnu/lib, /home/reliant/shaw/.local/lib, /usr/lib and /usr/platform/SUNW,Ultra-80/lib to the LD_LIBRARY_PATH environment variable. The new script reads:

    #!/usr/bin/perl use strict; use warnings; use CGI qw/:standard/; print header; use CGI::Carp qw(fatalsToBrowser); print `LD_LIBRARY_PATH="/local/gnu/lib/:/local/lib/:\$LD_LIBRARY_PATH" +`; print `EXPORT LD_LIBRARY_PATH`; use lib ('/home/reliant/shaw/perlmodules'); use lib ('/home/reliant/shaw/perlmodules/sun4-solaris'); print "<pre>"; use Data::Dumper; print Dumper \%ENV; $ENV{'LD_LIBRARY_PATH'} .= ':/local/gnu/lib:/home/reliant/shaw/.local/ +lib:/usr/lib:/usr/platform/SUNW,Ultra-80/lib'; print `env`; require XML::Simple; require XML::Parser;

    It's output is:

    $VAR1 = { 'SCRIPT_NAME' => '/webct/admin/brenttest.pl', 'SERVER_NAME' => 'webct2.ucf.edu', 'SERVER_ADMIN' => 'webct@reliant.ucf.edu', 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate', 'LD_LIBRARY_PATH' => '/webct/webct-3.6.0.18/webct/webct/gene +ric/bin', 'HTTP_CONNECTION' => 'keep-alive', 'REQUEST_METHOD' => 'GET', 'HTTP_ACCEPT' => 'text/xml,application/xml,application/xhtml ++xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'SCRIPT_FILENAME' => '/webct/webct-3.6.0.18/webct/webct/gene +ric/admin/brenttest.pl', 'SERVER_SOFTWARE' => 'Apache/2.0.52 (Unix) mod_jk/1.2.6 DAV/ +2', 'webct_root' => '/webct/webct-3.6.0.18/webct', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'REMOTE_USER' => 'admin', 'AUTH_TYPE' => 'Basic', 'TZ' => 'US/Eastern', 'QUERY_STRING' => '', 'REMOTE_PORT' => '2149', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows; U; Windows NT 5. +1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9', 'SERVER_PORT' => '8900', 'SERVER_SIGNATURE' => ' Apache/2.0.52 (Unix) mod_jk/1.2.6 DAV/2 Server at webct2.ucf.edu Port +8900 ', 'HTTP_CACHE_CONTROL' => 'max-age=0', 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', 'HTTP_COOKIE' => 'https%3a%2f%2fmy.ucf.edu%2fpsp%2fpaprod%2f +employee%2fempl%2frefresh=list: %3ftab%3dmypage2|%3ftab%3dmypage3|||| +||; SignOnDefault=b0111614; net107-80-PORTAL-PSJSESSIONID=FQfvcFGmJWD +PGqLT3QhzW7mQQFcp2f7k!-877246909; FIN6-80-PORTAL-PSJSESSIONID=FQfvyyb +gR9YdJBBpX01VNYRvBV2crSWr!-698869452', 'REMOTE_ADDR' => '10.173.87.94', 'HTTP_KEEP_ALIVE' => '300', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'PATH' => '/webct/webct-3.6.0.18/webct/jre/bin:/bin:/usr/bin +:/usr/ucb:/usr/bin/X11:/usr/local/bin:/usr/local/bin', 'REQUEST_URI' => '/webct/admin/brenttest.pl', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_ADDR' => '132.170.240.141', 'DOCUMENT_ROOT' => '/webct/webct-3.6.0.18/webct/user', 'HTTP_HOST' => 'reliant.ucf.edu:8900' }; TZ=US/Eastern webct_root=/webct/webct-3.6.0.18/webct LD_LIBRARY_PATH=/webct/webct-3.6.0.18/webct/webct/generic/bin:/local/g +nu/lib:/home/reliant/shaw/.local/lib:/usr/lib:/usr/platform/SUNW,Ultr +a-80/lib HTTP_HOST=reliant.ucf.edu:8900 HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8 +.0.9) Gecko/20061206 Firefox/1.5.0.9 HTTP_ACCEPT=text/xml,application/xml,application/xhtml+xml,text/html;q +=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5 HTTP_ACCEPT_ENCODING=gzip,deflate HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_KEEP_ALIVE=300 HTTP_CONNECTION=keep-alive HTTP_COOKIE=https%3a%2f%2fmy.ucf.edu%2fpsp%2fpaprod%2femployee%2fempl% +2frefresh=list: %3ftab%3dmypage2|%3ftab%3dmypage3||||||; SignOnDefaul +t=b0111614; net107-80-PORTAL-PSJSESSIONID=FQfvcFGmJWDPGqLT3QhzW7mQQFc +p2f7k!-877246909; FIN6-80-PORTAL-PSJSESSIONID=FQfvyybgR9YdJBBpX01VNYR +vBV2crSWr!-698869452 HTTP_CACHE_CONTROL=max-age=0 PATH=/webct/webct-3.6.0.18/webct/jre/bin:/bin:/usr/bin:/usr/ucb:/usr/b +in/X11:/usr/local/bin:/usr/local/bin SERVER_SIGNATURE= Apache/2.0.52 (Unix) mod_jk/1.2.6 DAV/2 Server at webct2.ucf.edu Port +8900 SERVER_SOFTWARE=Apache/2.0.52 (Unix) mod_jk/1.2.6 DAV/2 SERVER_NAME=webct2.ucf.edu SERVER_ADDR=132.170.240.141 SERVER_PORT=8900 REMOTE_ADDR=10.173.87.94 DOCUMENT_ROOT=/webct/webct-3.6.0.18/webct/user SERVER_ADMIN=webct@reliant.ucf.edu SCRIPT_FILENAME=/webct/webct-3.6.0.18/webct/webct/generic/admin/brentt +est.pl REMOTE_PORT=2149 REMOTE_USER=admin AUTH_TYPE=Basic GATEWAY_INTERFACE=CGI/1.1 SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET QUERY_STRING= REQUEST_URI=/webct/admin/brenttest.pl SCRIPT_NAME=/webct/admin/brenttest.pl Content-type: text/html Software error: Can't load '/home/reliant/shaw/perlmodules/sun4-solaris/auto/XML/Parse +r/Expat/Expat.so' for module XML::Parser::Expat: ld.so.1: perl: fatal +: libgcc_s.so.1: open failed: No such file or directory at /usr/local +/lib/perl5/5.8.0/sun4-solaris/DynaLoader.pm line 229. at /home/reliant/shaw/perlmodules/sun4-solaris/XML/Parser.pm line 14 Compilation failed in require at /home/reliant/shaw/perlmodules/sun4-s +olaris/XML/Parser.pm line 14. BEGIN failed--compilation aborted at /home/reliant/shaw/perlmodules/su +n4-solaris/XML/Parser.pm line 18. For help, please send mail to the webmaster (webct@reliant.ucf.edu), g +iving this error message and the time and date of the error. Content-type: text/html Software error: [Tue Feb 13 16:57:21 2007] brenttest.pl: Can't load '/home/reliant/sha +w/perlmodules/sun4-solaris/auto/XML/Parser/Expat/Expat.so' for module + XML::Parser::Expat: ld.so.1: perl: fatal: libgcc_s.so.1: open failed +: No such file or directory at /usr/local/lib/perl5/5.8.0/sun4-solari +s/DynaLoader.pm line 229. [Tue Feb 13 16:57:21 2007] brenttest.pl: at /home/reliant/shaw/perlmo +dules/sun4-solaris/XML/Parser.pm line 14 [Tue Feb 13 16:57:21 2007] brenttest.pl: Compilation failed in require + at /home/reliant/shaw/perlmodules/sun4-solaris/XML/Parser.pm line 14 +. [Tue Feb 13 16:57:21 2007] brenttest.pl: BEGIN failed--compilation abo +rted at /home/reliant/shaw/perlmodules/sun4-solaris/XML/Parser.pm lin +e 18. Compilation failed in require at /webct/webct-3.6.0.18/webct/webct/gen +eric/admin/brenttest.pl line 21. For help, please send mail to the webmaster, giving this error message + and the time and date of the error.

    It looks like the environment variable LD_LIBRARY_PATH is being updated with the new directories, but it's not having any impact.

    Anyone else have any suggestions?

    Cheers,

    Brent

    -- Yeah, I'm a Delt.

      print `LD_LIBRARY_PATH="/local/gnu/lib/:/local/lib/:\$LD_LIBRARY_PATH" +`; print `EXPORT LD_LIBRARY_PATH`;

      That's not going to work. That will set the environment var in your subshell but when you return from the backtick call the variable will be gone. See programatically setting the LD_LIBRARY_PATH (especially the comment from tye)

      -derby
      Do ldd from CGI then compare

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://599744]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-25 16:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found