after switching from tcl8.6b1 to tcl8.6b2 many of our apps are failing at startup when loading
extensions, for example:
% load ./libfoo.so
% load ./libbar.so
...error: symbol lookup error: undefined symbol: .....
this happens, because (a) libbar references a symbol which is defined in libfoo and (b) because dlopen() in tclLoadDl.c passes the
flag RTLD_LOCAL (instead of RTLD_GLOBAL).
this seems to be a known problem, discussed for example in bug #3216070.
I understand the reasons why you came up with this change. But from a rather naive point of view
it causes a severe incompatibility, stopping the many apps here which are built upon the above
At present I see the following options:
(a) hacking tclLoadDl.c back to using RTDL_GLOBAL;
not an approach I were happy with. Instead I'd prefer
a compile option like -DLOAD_GLOBAL.
(b) getting an option "-global" in tcl8.6b3, though this
needs changing all "load .. " commands.
(c) changing the link of libbar.so introducing an
implicit depenency "-lfoo". don't know how
portable this advice ist. here (linux, SuSE 11.4,
binutils-2.21-13.1.x86_64) it seems to work.
What do you suggest to get around this load-failures?