Dynamic dependencies

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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
200 OK

If the LIBPATH variable is not set, then....

# ./check_url.pl https://myexample.com
Can't load '/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/
Crypt/SSLeay/SSLeay.so' for module Crypt::SSLeay:  0509-022 Cannot
load module /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/
        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/
        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 /

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

Re: Dynamic dependencies

Quoted text here. Click to load it

Don't know about AIX but LD_LIBRARY_PATH is usually the  way to pick
up libraries dynamically.

Charles DeRykus

Site Timeline