467,104 Members | 981 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,104 developers. It's quick & easy.

Dynamic dependencies


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 :

Expand|Select|Wrap|Line Numbers
  1. # LIBPATH=/opt/freeware/lib
  2. # ./check_url.pl https://myexample.com
  4. 200 OK
If the LIBPATH variable is not set, then....

Expand|Select|Wrap|Line Numbers
  1. # LIBPATH=""
  2. # ./check_url.pl https://myexample.com
  3. 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/Crypt/SSLeay/SSLeay.so.
  4.         0509-150   Dependent module /usr/lib/libcrypto.a(libcrypto.so.0.9.7) could not be loaded.
  5.         0509-152   Member libcrypto.so.0.9.7 is not found in archive 
  6.         0509-022 Cannot load module /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi/auto/Crypt/SSLeay/SSLeay.so.
  7.         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.
  8.  at scripts/check_url.pl line 22
  9. Compilation failed in require at scripts/check_url.pl line 22.
  10. 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 !?
Nov 5 '08 #1
  • viewed: 2532
4 Replies
Expert 2GB
I don't know the answer or even have a suggestion. If you get no replies here ask on www.perlmonks.com where there are members with a wider range of experience.
Nov 5 '08 #2
Expert Mod 2GB
If it is a question of just setting the LIBPATH to what it is supposed to be, then you can do that in the script with the backtics to issue system commands and just put in the AIX command to set ( and export if needed ) the command to set LIBPATH to what it needs to be.


Nov 5 '08 #3
I will post on the perlmonks website. Thanks.

I had tried to set the LIBPATH variable at the beginning of my script, but it didn't change anything. It seems like it is already too late!

Expand|Select|Wrap|Line Numbers
  1. $ENV{'LIBPATH'}='/opt/freeware/lib';
Nov 6 '08 #4
Expert 2GB
Try a BEGIN block:

Expand|Select|Wrap|Line Numbers
  1. BEGIN {
  2.     $ENV{'LIBPATH'}='/opt/freeware/lib';
  3. }
Nov 6 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by mr_burns | last post: by
1 post views Thread by paakwesi@gmail.com | last post: by
60 posts views Thread by Peter Olcott | last post: by
11 posts views Thread by toton | last post: by
7 posts views Thread by barias@axiscode.com | last post: by
6 posts views Thread by =?Utf-8?B?YXByMDUyNA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.