By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,807 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,807 IT Pros & Developers. It's quick & easy.

Dynamic dependencies

P: 7
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 :

Expand|Select|Wrap|Line Numbers
  1. # LIBPATH=/opt/freeware/lib
  2. # ./check_url.pl https://myexample.com
  3. SUCCESS
  4. 200 OK
  5.  
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.
  11.  

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
Share this Question
Share on Google+
4 Replies


KevinADC
Expert 2.5K+
P: 4,059
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

numberwhun
Expert Mod 2.5K+
P: 3,503
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.

Regards,

Jeff
Nov 5 '08 #3

P: 7
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

KevinADC
Expert 2.5K+
P: 4,059
Try a BEGIN block:

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

Post your reply

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