Sponsored Content
Operating Systems AIX Embedding Runtime Search Path into Library on AIX Post 302921209 by erra_krishna on Wednesday 15th of October 2014 03:30:14 PM
Old 10-15-2014
Embedding Runtime Search Path into Library on AIX

My product has 2 libraries say "x & y".
x depends on y.

During the installation of my products package, user will be prompted for his own location to copy my product libraries.
Installation will copy libraries "x & y" and create my product specific ENV variable say "MYPATH" pointing to User picked install location.


Here User doesn't want to set LIBPATH nor he want to create any softlinks in "/usr/lib or /lib".


Now I should make my library "x" find its dependent "y" in the environment where there is no LIBPATH set nor softlinks created in "/usr/lib or /lib".

On other UNIX platforms, there is a concept of $ORIGIN and i am successful using this on other Unix platforms.

Since there is no concept of $ORIGIN on AIX, trying out alternatives on AIX




My Scenario:
************

My package install creates ENV variable “MYPATH” pointing to the User picked installed location.
Let say, User selected /home/lib and install will set "MYPATH=/home/lib"

Now I thought of accessing this variable in the runtime search path (Either specifying using -L or –blibpath) while building my libraries (x & y).

For a particular library, runtime search path(dump -X32 -H) should be like
INDEX PATH
0 $MYPATH


I’ve tried specifying $MYPATH in the makefile using “-L or –blibpath” but as MYPATH is not available during build time, NULL value got replaced.

INDEX PATH
0


I want $MYPATH to be considered as is so that at runtime it gets replaced with its value.

Tried Escaping $ and also used quotes but no use.
ex: $$\(MYPATH\)


Can this be possible? If possible, then how?


-Srikrishna Erra.

Last edited by erra_krishna; 10-15-2014 at 04:35 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

library path

How do you get an application to use an alternate library? Dave:confused: (2 Replies)
Discussion started by: nucca
2 Replies

2. Linux

Plz Help me to find GNU C++ Runtime Library

Hi, I am working with red hat Linux and i want to install one program but I am getting the error This product requires the GNU C++ Runtime Library (libstdc++-libc6.2-2.so.3) or later. Your system must be upgraded before installation can proceed. So please tell me how can i remove this... (2 Replies)
Discussion started by: smartgupta
2 Replies

3. Solaris

How to get the path during runtime?

Hi guys, I have commands like /solaris/opt/VRTS/bin/vxdisk /opt/VRTS/bin/vxdisk From these two commands, i need to get the directory path value before /VRTS/bin/vxdisk at runtime. e.g /solaris/opt/VRTS/bin/vxdisk as /solaris/opt /opt/VRTS/bin/vxdisk as /opt I have tried with cut... (1 Reply)
Discussion started by: Nandagopal
1 Replies

4. Solaris

Re:How to get the path during runtime?

Thank u vgesh99 It works well.. (1 Reply)
Discussion started by: Nandagopal
1 Replies

5. AIX

runtime libs accessed by application in AIX

Hi , I need some inputs on runtime or shared libs for an application(s) in AIX . i have a requirement saying i need to rehost all the production applications into new AIX OS . Here Source and target oS is AIX but with different versions so for this i need to identify what are the... (1 Reply)
Discussion started by: naren_chella
1 Replies

6. Programming

Shared library versioning problem at runtime

My executable was linked under RedHat using the LessTif GUI shared library. When I try to run it under UBUNTU, I get an error message that the LessTif library cannot be found. The LessTif library is there, but it is a newer VERSION. My executable is looking for the older version it was linked with.... (1 Reply)
Discussion started by: imagtek
1 Replies

7. AIX

How to Check the what runtime package is applied on AIX OS

Hi Experts, How to Check the what runtime package is applied on AIX OS? I would like to verify if “xlcpp.rte.10.1.0.aix.base” package is applied or not ? thanks in advance. -Mallela (1 Reply)
Discussion started by: meetmallela
1 Replies

8. Programming

C++ library path

Hello, How to set up the path for downloaded C/C++ libraries (or, header files) so that they can be included like system headers (stdio.h or iostream)? The libraries/headers are from a package containing different folders each has different sets of headers and put in... (1 Reply)
Discussion started by: yifangt
1 Replies

9. UNIX for Advanced & Expert Users

AIX runtime programming issue

I hope my title is accurate enough. I have a product that we port to various UNIX platforms. It is known to run on AIX but using the IBM compiler from years ago. Recently we got a different used AIX P5 platform running AIX 5.3 and we setup the GCC compiler (4.4.5 I think). C and C++ source code.... (5 Replies)
Discussion started by: Pug
5 Replies

10. AIX

AIX full path to socket library

Can somebody help me too identify full path to socket library on AIX? Cannot find anything Thanks for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies
GPT_BUILD_CONFIG(8)					User Contributed Perl Documentation				       GPT_BUILD_CONFIG(8)

NAME
gpt_build_config - Returns a minimized list of ldflags from a list of globus packages and external libraries. SYNOPSIS
gpt_build_config -src <source metadata file> -f <globus_flavor_name> -link [static|shared] DESCRIPTION
gpt_build_config creates a file in it's current directory named gpt_build_temp.sh that contains a list of necessary flags assembled from the build environment metadata of the packages on which the source metadata depends. This scanning is done recursively to cover the entire dependency tree. This script was initially inspired by the shell script gnome_config. LINK ORDER
The flag list returned by gpt_build_config is assembled in dependent order. A dependency between two libraries occurs when one library needs the symbols of another library in order to link correctly. For most linkers the library providing the symbols has to be linked after the library that needs the symbols. For example, from the line: -L/opt/Xpm/lib -lXpm -L/usr/lib/X11 -lXm -lX gpt_build_config assumes that the library Xpm is dependent on Xm which in turn is dependent on X. In addition, gpt_build_config assumes that Xpm is located in /opt/Xpm/lib and Xm and X are both located in /usr/lib/X11. BUGS
Circular dependencies between libraries are not supported. AUTHOR
Michael Bletzinger <mbletzin.ncsa.uiuc.edu> and Eric Blau <eblau.ncsa.uiuc.edu> perl v5.14.2 2012-04-30 GPT_BUILD_CONFIG(8)
All times are GMT -4. The time now is 06:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy