473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dynamic dependencies

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
4 2936
KevinADC
4,059 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
numberwhun
3,509 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.

Regards,

Jeff
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
KevinADC
4,059 Expert 2GB
Try a BEGIN block:

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

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

Similar topics

13
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when...
1
by: paakwesi | last post by:
I'm looking to modify the javascript behavior on http://research.yale.edu/%7Ekamusi/exercises/learners/index.php to do two things: Initial State: Both menus are populated with all their entries...
2
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies...
60
by: Peter Olcott | last post by:
I need to know how to get the solution mentioned below to work. The solution is from gbayles Jan 29 2001, 12:50 pm, link is provided below: >...
11
by: toton | last post by:
Hi, I have little confusion about static memory allocation & dynamic allocation for a cluss member. I have class like class Bar{ public: explicit Bar(){ cout<<"bar default"<<endl; }
7
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time...
8
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the...
6
by: =?Utf-8?B?YXByMDUyNA==?= | last post by:
I am wondering if there is a devenv switch that will ignore build dependencies that are set in .xxproj files. At the command line I am attempting to build individual projects that I do not want...
0
by: BrianKer | last post by:
Hi! It's my first discussion on this forum. First I have a exe like this below (the object can invoke by console) public class DynamicLoad { public Type AssemblyType = null; ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.