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
How do you get an application to use an alternate library?
Dave:confused: (2 Replies)
Discussion started by: nucca
2 Replies
2. Linux
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
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
Thank u vgesh99
It works well.. (1 Reply)
Discussion started by: Nandagopal
1 Replies
5. 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
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
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
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
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
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
LEARN ABOUT DEBIAN
mh_installjar
MAVEN(1) User Commands MAVEN(1)
NAME
Maven - Installs a jar into /usr/share/maven-repo.
SYNOPSIS
mh_installjar [option]... [pom] [jar] [link]...
DESCRIPTION
Installs the jar file in /usr/share/maven-repo, at the correct location for Maven. The jar is copied into the build directory. It can also
create additional links to the jar, usually located in /usr/share/java.
Where
[pom] is the location of the POM associated with the jar to install.
GroupId, artifactId and version will be extracted from this file.
[jar] is the path to the jar to install, usually located in the build
folder.
[link] is an additional link to the jar to install, usually there should
be a link to usr/share/java/$jar.jar and usr/share/java/$jar-$version.jar to comply with the Java packaging guidelines. Note that
there is no need to specify those particular links if the --java-lib option is used.
OPTIONS
-h --help: show this text
-V --version: show the version
-p<package> --package=<package>: name of the Debian package which
will contain this jar file
-e<version>, --set-version=<version>: set the version for the jar,
do not use the version declared in the POM file.
-r<rules> --rules=<rules>: path to the file containing the
rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the
groupId, artifactId and version from the POM file.
-l --java-lib: Optional, if given it will install the jar into
/usr/share/java to comply with the Debian Java specification. The jar will be installed as /usr/share/java/$name-$version.jar and a
versionless link /usr/share/java/$name.jar will point to it, as well as the links installed in /usr/share/maven-repo
-n<name> --usj-name=<name>: Optional, the name to use when installing the
library in /usr/share/java when --java-lib is used. Defaults to the artifact id found in the POM.
-j<version> --usj-version=<version>: Optional, the version to use when
installing the library in /usr/share/java when --java-lib is used. Defaults to the version found in the POM.
-s --no-usj-versionless: Optional, don't install the versionless link
in /usr/share/java. This flag is used only when the -l or --java-lib option is given.
-d<path> --dest-jar=<path>: Optional, the destination for the real jar.
The other places where the jar appears, in the repository or in the list of links, will be symlinks to this jar. Defaults to
/usr/share/java/$name-$version.jar if --java-lib is used, otherwise the jar is installed in the versioned path in the Maven reposi-
tory.
-c<classifier> --classifier=<classifier>: Optional, the classifier for
the jar. Empty by default.
-v --verbose: show more information while running
-n --no-act: don't actually do anything, just print the results
--skip-clean-pom: don't clean the pom, assume that a previous action ran
mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar
See also: mh_installpom(1), mh_installsite(1)
Maven Repo Helper version 1.7.1 January 2012 MAVEN(1)