Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Dynamic dependencies

by Bruni007 (Initiate)
on Nov 06, 2008 at 13:51 UTC ( [id://721984]=perlquestion: print w/replies, xml ) Need Help??

Bruni007 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Under AIX, I have created a script which is checking URL status. Problems come when I want to check HTTPS URL status... To have my script working with HTTPS URLs, I must set the LIBPATH variable correctly :
# LIBPATH=/opt/freeware/lib # ./check_url.pl https://myexample.com SUCCESS 200 OK
If the LIBPATH variable is not set, then....
# LIBPATH="" # check_url.pl https://myexample.com Can't load '/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/C +rypt/SSLeay/SSLeay.so' for module Crypt::SSLeay: 0509-022 Cannot loa +d module /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/Cry +pt/SSLeay/SSLeay.so. 0509-150 Dependent module /usr/lib/libcrypto.a(libcrypto.so. +0.9.7) could not be loaded. 0509-152 Member libcrypto.so.0.9.7 is not found in archive 0509-022 Cannot load module /usr/opt/perl5/lib/site_perl/5.8.2 +/aix-thread-multi/auto/Crypt/SSLeay/SSLeay.so. 0509-150 Dependent module /usr/opt/perl5/lib/site_perl/5.8.2 +/aix-thread-multi/auto/Crypt/SSLeay/SSLeay.so could not be loaded. at + /usr/opt/perl5/lib/5.8.2/aix-thread-multi/DynaLoader.pm line 229. at scripts/check_url.pl line 22 Compilation failed in require at scripts/check_url.pl line 22. BEGIN failed--compilation aborted at scripts/check_url.pl line 22.
I've been reading about dynamic dependencies and I think that this is related to that. Does anyone of you is aware of a way to tell PERL that he should use this file /opt/freeware/lib/libcrypto.a instead of /usr/lib/libcrypto.a

Can I make it work with Dynaloader, if yes...I cannot figure out how !?

By the way, I've tried to set the LIBPATH variable at the beginning of my script, but it doesn't change anything...

My script has always been working fine, but since Openssl has been upgraded to a new version, I have this error message. I've been told that what I need from the libcrypto.a file has been removed from the libcrypto.a file coming with the new Openssl version. That's why we kept the old version installed...I just need to tell my script to go get the right one.

I hope that I am clear enough, all of this is pretty new to me!

Replies are listed 'Best First'.
Re: Dynamic dependencies
by Anonymous Monk on Nov 06, 2008 at 14:45 UTC
    By the way, I've tried to set the LIBPATH variable at the beginning of my script, but it doesn't change anything...
    Did you try
    BEGIN { $ENV{LIBPATH}=... } use ...
Re: Dynamic dependencies
by arkturuz (Curate) on Nov 06, 2008 at 15:32 UTC
    My script has always been working fine, but since Openssl has been upgraded to a new version, I have this error message.

    Try upgrading Crypt::SSLeay Perl module, and let us know what happens.

Re: Dynamic dependencies (LD_)
by tye (Sage) on Nov 06, 2008 at 23:56 UTC
      LD_LIBRARY_PATH is the variable being used for Solaris by example, but for AIX it is still the LIBPATH variable.

      I've applied the solution written in the old thread that you mentionned and it is working pretty well. Then, I will avoid using a script in the middle just to set the LIBPATH variable

      Thank you so much!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-19 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found