QUESTION: shared libraries
From: Christian Langis (Christian.Langis_at_nrc-cnrc.gc.ca)
Date: Thu, 29 Jan 2004 11:19:10 -0500
I am programming an application on Linux which requires that part of the
code be compiled into a shared library (legal restriction). The software
then is composed of 1 executable and 2 shared library files.
Now, how would I create a package easy-to-install for a new user? The
problem is, contrary to Windows, that leaving the .so user files in the
same library as the executable will not work. Therefore, the user must
manually either update a 'certain' environment variable (something like
SHARED_LIB_PATH) or login as root and copy the .so files into /usr/lib.
It is better to avoid the last option since that means polluting a
system directory with user files.
But anyways, the questions are numerous:
-On RedHat8.0, what are the (environment or others) variables that
affect the order of directories sought for the .so files?
-Besides the paths in this variable, are there other standard
directories sought (before or after) by the system?
-This is a long shot but, can we install these 3 binary (we do not wish
to release the sources yet) files with a RPM package?
-Otherwise, we could use a script to install the package. Problem is
this requires to create a link in /usr/lib to our library files. And it
takes root privileges to do so. So a user could do that manually, but we
want it to be automanted. I have seen some scripts executing from a
normal user, but performing such priviledged operations. How do they do
-Can a script modify an environment variable such that next time the
user boots or logs in, the variable will appear updated?
Pls, reply by Email (and change the (AT) for a @ in my address)
-- Christian Langis tel/tél. : 613-990-0685 | facsimile/télécopieur : 613-952-0215 National Research Council Canada | room 343, M-50, 1200 Montreal Road, Ottawa, Ontario K1A 0R6 Conseil national de recherches Canada | bur. 343, M-50, 1200 chemin Montréal, Ottawa, Ontario K1A 0R6 Technologie de l'Information Visuelle / Visual Information Technology Gouvernement du Canada / Government of Canada