Closed andreas-kupries closed 2 years ago
@esternin PR #122 is a tentative fix.
And not working out. The idea was to extend env(LD_LIBRARY_PATH)
of the running tclsh.
This does not have any effect.
I can confirm that the desired path is added, and yet the library is not found.
OTOH, setting LD_...
before starting tclsh
I see the path doubled (expected), and the library now is found.
I suspect that the dynamic loader, i.e. libdl
, looks at LD_...
once, at startup, and then never again.
Ok, the other idea I had works:
lappend cmdline -Wl,-rpath,$path
I.e. put the search path for the dependency into the package shlib during linking.
My problem with this solution is portability. Will this work for Solaris, HPUX, AIX compilers ? How about Windows?
Even with these questions, it looks to be better than before, it should work for anything using gcc.
From https://github.com/andreas-kupries/critcl/issues/116#issuecomment-1037809980
From later in the thread
To fix.