Re: loading shared objects
Lev wrote:
> Dear list,
>
>
> Maybe it is a bit off topic, but I encountered a dynamic linking problem
> on my Debian stable system.
>
> A program (KiCad) tries (and fails) to load a library
> (libngspice.so.0.0.0).
>
> I set LD_DEBUG=libs, and I get this:
>
> [...]
> 7390: find library=libngspice.so.0 [0]; searching
> 7390: search cache=/etc/ld.so.cache
> 7390: trying file=/usr/local/lib/libngspice.so.0
> 7390:
> 7390: find library=libfftw3.so.3 [0]; searching
> 7390: search cache=/etc/ld.so.cache
> 7390: trying file=/usr/lib/x86_64-linux-gnu/libfftw3.so.3
> 7390:
> 7390:
> 7390: calling init: /usr/lib/x86_64-linux-gnu/libfftw3.so.3
> 7390:
> 7390:
> 7390: calling init: /usr/local/lib/libngspice.so.0
> 7390:
> 7390:
> 7390: calling init: /usr/local/bin/_eeschema.kiface
> 7390:
> 7390: find library=libngspice.so.0.0.0 [0]; searching
> 7390: search cache=/etc/ld.so.cache
> 7390: search
>
path=/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64/x86_64:/lib/tls/x86_64:/lib/tls/x86_64:/lib/tls:/lib/x86_64/x86_64:/lib/x86_64:/lib/x86_64:/lib:/usr/lib/tls/x86_64/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64/x86_64:/usr/lib/x86_64:/usr/lib/x86_64:/usr/lib
> (system search path)
> 7390: trying
> file=/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64-linux-gnu/tls/libngspice.so.0.0.0
> 7390: trying
> file=/lib/x86_64-linux-gnu/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64-linux-gnu/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/tls/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
> 7390: trying
> file=/usr/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/x86_64-linux-gnu/libngspice.so.0.0.0
> 7390: trying file=/lib/tls/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/tls/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/tls/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/tls/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/x86_64/libngspice.so.0.0.0
> 7390: trying file=/lib/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/tls/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/tls/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/tls/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/tls/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/x86_64/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/x86_64/libngspice.so.0.0.0
> 7390: trying file=/usr/lib/libngspice.so.0.0.0
> 7390:
>
>
> I have this in my /etc/ld.so.conf.d/libc.conf:
>
> /usr/local/lib
>
>
> so it shall find the library. But this is interesting that in the above
> log, /usr/local/lib is missing. I run ldconfig several times. I also
> greped ld.so.cache, and there is the library there.
>
> Can you explain me what is going on here?
>
I am not using recent KDE, but I recall it had it's own variables for the
libraries. Might be you need to read docs.
What I think will work (always worked for me) is set
LD_LIBRARY_PATH=/usr/local/lib kicad
or
export LD_LIBRARY_PATH=/usr/local/lib
kicad
also check that library /usr/local/lib/libngspice.so.0 is not a dead link
for example it should point to libngspice.so.0.0.0 as this is what is
requested.
regards
Reply to: