how to find dlopen be able to find shared library in /lib/xxx/yyyy?

Florian Weimer fw@deneb.enyo.de
Sat Jan 2 10:02:42 GMT 2021


* sotrdg sotrdg via Libc-help:

> I have an C.UTF-8.so at /usr/local/lib/fast_io_i18n_data/locale/C.UTF-8.so.
>
> I tried to do
> dlopen(“fast_io_i18n_data/locale/C.UTF-8.so”,RTLD_GLOBAL | RTLD_NOW);
>
> However, the dlls cannot get found.

You need to provide the full (absolute) path to the shared object.
Searching only happens if the dlopen argument doesn ot contain a slash.
You can still use $LIB to paper over 32-bit/64-bit differences.


More information about the Libc-help mailing list