Skip to content
Tcl Source Code History Of Ticket 3397938fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3397938fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3397938fffffffffffffffffffffffffffffffff

  1. Ticket change [176c589b70] (rid 122492) by uring on 2011-08-25 10:24:08:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. 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?
      
      
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "uring"
    10. subsystem initialized to: "17. Commands I-L"
    11. title initialized to: "load failes due to RTLD_LOCAL"
    12. type initialized to: "Bug"
  2. Ticket change [9c859f0952] (rid 96157) by nijtmans on 2011-08-25 17:54:42:

    1. assignee changed to: "nijtmans"
    2. closedate changed to: "2011-08-25T10:54:42"
    3. closer changed to: "nijtmans"
    4. 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
      
      
    5. login: "nijtmans"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. username: "nijtmans"
  3. Ticket change [bc22f4cb89] (rid 129611) by ferrieux on 2011-08-25 22:26:46:

    1. icomment:
      What's the place to look for documentation of such ABI breakage ?
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  4. Ticket change [aefb397778] (rid 97732) by dgp on 2011-08-26 22:41:12:

    1. 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?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. resolution changed to: "None"
    5. status changed to: "Open"
    6. username: "dgp"
  5. Ticket change [3631400136] (rid 107074) by dgp on 2011-08-26 22:49:10:

    1. 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.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [ea3ed11055] (rid 103334) by nijtmans on 2011-09-21 19:47:11:

    1. 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).
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  7. Ticket change [b1751c5a79] (rid 98149) by ferrieux on 2011-09-21 20:23:10:

    1. title changed to: "load fails due to RTLD_LOCAL"
  8. Ticket change [abbb07fdec] (rid 101169) by nijtmans on 2012-11-08 19:19:27:

    1. foundin changed to: "obsolete: 8.6b3"
    2. 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.
      
      
    3. login: "nijtmans"
    4. mimetype: "text/plain"
    5. username: "nijtmans"
  9. Ticket change [ee5dca61a1] (rid 104072) by dkf on 2012-11-08 20:19:40:

    1. subsystem changed to: "40. Dynamic Loading"
  10. Ticket change [3848869733] (rid 112178) by nijtmans on 2013-01-02 22:21:04:

    1. closedate changed to: "2013-01-02T15:21:04"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      Fixed in Tcl 8.6
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"