Skip to content
Tcl Source Code History Of Ticket 2990516
Login

History Of Ticket 2990516

Artifacts Associated With Ticket 2990516

  1. Ticket change [1dd75545f9] (rid 90882) by dgp on 2010-04-21 17:36:57:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      The default paths set in [tcl::tm::path] are rooted at
      
      [file dirname [info library]]
      
      and
      
      [file join [file dirname [file dirname [file normalize [info nameofexecutable]]]] lib]
      
      The first wants to search near Tcl's script library which is
      a sensible place TMs might have been installed.
      
      The second is more problematic.  If one assumes [info nameofexecutable]
      is meant to be tclsh in its normal installed location, then the construction
      is attempting to produce the default value of $(libdir) for a Tcl install
      which is the right place for any TM containing binary parts to get
      installed.
      
      However, Tcl permits customization of $(libdir).  One place this is
      commonly used is on systems with both 32- and 64- bit collections
      of binaries installed.  On such systems a 64-bit build of Tcl might
      be customized to install into a $(libdir) like /usr/lib64 .  That path
      can never be constructed from the TM defaults, because that
      default hardcodes in the last element "lib".
      
      By analogy, the older [tclPkgUnknown] package discovery
      system potentially has the same problem, and has worked
      around it via the variable ::tcl_pkgPath where the actual
      configured value of $(libdir) gets stored and retrieved to
      eventually find its way onto the $::auto_path .  It's a rather
      ugly solution and I'm not recommending copying it.  Just
      noting that this is not a new problem to solve.
      
      I think the right place to find the value is in the result
      returned by the command
      
      [tcl::pkgconfig get libdir,runtime]
      
      This, of course, means we will have a renewed interest
      in making that command actually work.
      
      
    4. foundin initialized to: "None"
    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: "dgp"
    10. subsystem initialized to: "39. Package Manager"
    11. title initialized to: "TM default paths do not search custom --libdir"
    12. type initialized to: "Bug"
  2. Ticket change [ed43612a3c] (rid 103846) by dgp on 2010-04-22 00:44:35:

    1. icomment:
      
      Forgot to explicitly mention it, but of course Tcl
      is a library that gets embedded in many programs
      other than tclsh, and those programs need not
      be installed in any particular location relative to
      Tcl's $(libdir), so the second default root is not
      reliable at all.  Perhaps defensible as one of many attempts
      to throw something at the wall and see what sticks,
      but if [tcl::pkgconfig] is doing its job and telling us
      directly where Tcl was configured to be installed, I think
      we would be better off using direct reporting over guesses.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [61c1d2a5e6] (rid 169610) by aspect on 2019-03-02 07:14:36:

    1. closer changed to: "nobody"
    2. comment changed to:
      The default paths set in [tcl::tm::path] are rooted at
      
      [file dirname [info library]]
      
      and
      
      [file join [file dirname [file dirname [file normalize [info nameofexecutable]]]] lib]
      
      The first wants to search near Tcl's script library which is
      a sensible place TMs might have been installed.
      
      The second is more problematic.  If one assumes [info nameofexecutable]
      is meant to be tclsh in its normal installed location, then the construction
      is attempting to produce the default value of $(libdir) for a Tcl install
      which is the right place for any TM containing binary parts to get
      installed.
      
      However, Tcl permits customization of $(libdir).  One place this is
      commonly used is on systems with both 32- and 64- bit collections
      of binaries installed.  On such systems a 64-bit build of Tcl might
      be customized to install into a $(libdir) like /usr/lib64 .  That path
      can never be constructed from the TM defaults, because that
      default hardcodes in the last element "lib".
      
      By analogy, the older [tclPkgUnknown] package discovery
      system potentially has the same problem, and has worked
      around it via the variable ::tcl_pkgPath where the actual
      configured value of $(libdir) gets stored and retrieved to
      eventually find its way onto the $::auto_path .  It's a rather
      ugly solution and I'm not recommending copying it.  Just
      noting that this is not a new problem to solve.
      
      I think the right place to find the value is in the result
      returned by the command
      
      [tcl::pkgconfig get libdir,runtime]
      
      This, of course, means we will have a renewed interest
      in making that command actually work.
      
    3. icomment:
      The second default could be described as downright dangerous for embedding 
      programs and starpacks.  It's also surprising if [info nameofexe] happens to 
      be a symlink.
      
      What would it take to fix this?  Is [tcl::pkgconfig get libdir,runtime] 
      still unreliable for this purpose?
      
      (anecdotally, I don't see any binary .tm's in the wild so I'm tempted to 
      argue for removing the second default altogether ..)
      
    4. login: "aspect"
    5. mimetype: "text/plain"
    6. severity changed to: "Minor"