Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] "prelink" a dynamic library
Date: Wed, 01 Oct 2008 16:53:13
Message-Id: tkrat.1c2bfe9dfd0611f0@igpm.rwth-aachen.de
1 Hi,
2
3 I want to create a shared library, say libULIB.so,
4 which needs additional shared libraries, e.g. libmpfr.so and
5 libgmp.so .
6
7 My users only use the functions provided by libULIB.so.
8
9 Is there a means to "prelink" libULIB.so, so that the libraries
10 libmpfr.so and libgmp.so are not needed by the user?
11
12 I.e.
13
14 instead of
15
16 g++ Example.C -lUlib -lmpfr -lgmp
17
18 it should be suffucient to say
19
20 g++ Example.C -lUlib
21
22 Given Ulib.o I've tried
23
24 g++ -shared -o libUlib.so -fpic -Wl,-soname,libUlib.so \
25 -Wl,-rpath,$LIBPATH -Wl,-export-dynamic \
26 Ulib.o -L $LIBPATH -lmpfr -lgmp
27
28 but I still need -lmpfr -lgmp to get an executable.
29
30 Many thanks for a hint,
31 Helmut.
32
33 --
34 Helmut Jarausch
35
36 Lehrstuhl fuer Numerische Mathematik
37 RWTH - Aachen University
38 D 52056 Aachen, Germany

Replies

Subject Author
Re: [gentoo-user] "prelink" a dynamic library bzk0711@×××.com
Re: [gentoo-user] "prelink" a dynamic library Paul Hartman <paul.hartman+gentoo@×××××.com>