autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake problem with multiple "-rpath"


From: aotto
Subject: Re: automake problem with multiple "-rpath"
Date: Mon, 10 May 2021 19:14:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 10.05.21 15:10, Thomas Jahns wrote:
Hi,

you are confusing the -rpath /some/path option to libtool, which tells libtool where a library will be installed and the -Wl,-rpath,/some/other/path option to ld. If you replaced -rpath .../lib by -Wl,-rpath,.../lib everything should work as expected. Also relative rpath values will probably not work as expected unless the library and executabl in question are from one package. Also these are options to be used by whoever packages/installs the software and thus have no place in Makefile.am verbatim but rather should be added to LDFLAGS or similar during configure.

Regards, Thomas


To be honest I don't want to set the -rpath at all…

what I have :

#1 libtclreadline.so depend on libreadline.so
#2 everything is in the SAME directory
#3 the directory is already KNOWN to ld.so

> ls -ald *readline*
-rw-r--r-- 1 dev1usr users 478680 29. Apr 22:28 libreadline.a
lrwxrwxrwx 1 dev1usr users     18 29. Apr 22:28 libreadline.so -> libreadline.so.4.0 lrwxrwxrwx 1 dev1usr users     18 29. Apr 22:28 libreadline.so.4 -> libreadline.so.4.0
-rw-r--r-- 1 dev1usr users 432556 29. Apr 22:28 libreadline.so.4.0
-rwxr-xr-x 1 dev1usr users  67656 10. Mai 18:55 libtclreadline-3.0.0.so
-rwxr-xr-x 1 dev1usr users   1109 10. Mai 18:55 libtclreadline.la
lrwxrwxrwx 1 dev1usr users     23 10. Mai 18:55 libtclreadline.so -> libtclreadline-3.0.0.so

------------------------------------------

important :

libtclreadline.so -> libtclreadline-3.0.0.so and

libreadline.so -> libreadline.so.4.0

error:

libreadline.so.4.0 not found

--------------------------------------------

The EXE dlopen "libtclreadline" and the FIRST soft-link to "libtclreadline-3.0.0.so" is resolved and "libtclreadline-3.0.0.so" is dlopend'd, but the "libtclreadline.so" depend on "libreadline.so" this
is a link to "libreadline.so.4.0"

---------------------------------------------

summary

EXE->dlopen path/to/libtclreadline.so -> symlink to libtclreadline-3.0.0.so -> depend on libreadline.so
-> symlink libreadline.so.4.0 FAIL

everything is in the SAME directory and the directory is KNOWN because FIRST symlink as absolute path

-> I spend now near ONE workday to just dlopen a stupid file !!

I prefer a solution with no LD_LIBRARY_PATH and no -rpath at all because the directory is KNOWN to the
linker and only the "stupid" programming of "ld.so" making things bad.

mfg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]