Artifacts Associated With Ticket 3397938fffffffff
Ticket change [176c589b70] (rid 122492) by uring on 2011-08-25 10:24:08:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
after switching from tcl8.6b1 to tcl8.6b2 many of our apps are failing at startup when loading extensions, for example: > tclsh8.6 % 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 mentioned dependencies. 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? - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "uring"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "load failes due to RTLD_LOCAL"
- type initialized to: "Bug"
Ticket change [9c859f0952] (rid 96157) by nijtmans on 2011-08-25 17:54:42:
- assignee changed to: "nijtmans"
- closedate changed to: "2011-08-25T10:54:42"
- closer changed to: "nijtmans"
- icomment:
Well, the Issue tracker is not meant to ask questions, but anyway here is the anwer: (c) is the 'right' solution, and it works on all systems using ELF. If you want to make it portable, use TEA to build your libbar.so, then SHLIB_LD_LIBS is set to ${LIBS} for most systems and empty for systems that don't support it. Hope this helps, Jan Nijtmans - login: "nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- username: "nijtmans"
Ticket change [bc22f4cb89] (rid 129611) by ferrieux on 2011-08-25 22:26:46:
- icomment:
What's the place to look for documentation of such ABI breakage ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [aefb397778] (rid 97732) by dgp on 2011-08-26 22:41:12:
- icomment:
Re-opened. At the least, this points out that I failed to flag this incompatibility in the release notes, and will want to do better on that for 8.6.0. As I mentioned on TCLCORE regarding plans for 8.6b3 and beyond, I want to see documents take shape to help the Tcl user migrating to 8.6 on how they can take advantage of the changes in it. Do we have such guidance for this issue? If so, where is it?
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- username: "dgp"
- icomment:
Ticket change [3631400136] (rid 107074) by dgp on 2011-08-26 22:49:10:
- icomment:
For background on the issues here see Tickets 1961211 and 3216070. Are there others? I'm not well-suited to weigh in on the matter, but from watching the back and forth on it, it looks like a situation where there is no one correct answer to suit everyone. Any choice will leave someone with the need to make adjustments. But don't take my word. Review the history.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ea3ed11055] (rid 103334) by nijtmans on 2011-09-21 19:47:11:
- icomment:
> I want to see documents take shape > to help the Tcl user migrating to 8.6 on how > ... Remark: The change regarding RTLD_GLOBAL was done in Tcl 8.5 as well, so it has nothing to do with the migration to 8.6. In my option, it's a build problem, specifying an extra "-l" option should fix it, as option (c) mentioned above. On some platforms (e.g. Windows, AIX) this "-l" option should be there, otherwise the extension does not even compile. most ELF systems are more tolerant. If you want to be totally platform independant, use stubs, but on most modern systems just indicating on the command line which other libraries this library depends on should work just as well. Yes, there should be better documents on this (so keeping this issue open).
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
- icomment:
Ticket change [b1751c5a79] (rid 98149) by ferrieux on 2011-09-21 20:23:10:
- title changed to: "load fails due to RTLD_LOCAL"
Ticket change [abbb07fdec] (rid 101169) by nijtmans on 2012-11-08 19:19:27:
- foundin changed to: "obsolete: 8.6b3"
- icomment:
See: <http://www.tcl.tk/cgi-bin/tct/tip/416> Even though (c) is the recommended - portable - solution (using RTDL_GLOBAL is not portable anyway), I think the TIP explains pretty well when the -global flag could be used and what the danger is.
- login: "nijtmans"
- mimetype: "text/plain"
- username: "nijtmans"
Ticket change [ee5dca61a1] (rid 104072) by dkf on 2012-11-08 20:19:40:
- subsystem changed to: "40. Dynamic Loading"
Ticket change [3848869733] (rid 112178) by nijtmans on 2013-01-02 22:21:04:
- closedate changed to: "2013-01-02T15:21:04"
- closer changed to: "nijtmans"
- icomment:
allow_comments - 1 Fixed in Tcl 8.6
- login: "nijtmans"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "nijtmans"