Menu

#2771 Directory or list thereof (Was: Garbage in -install_name)

obsolete: 8.6b1
open
8
2010-03-24
2010-03-07
No

When I build current Tk HEAD (just cd tk/macosx; make test) on this PPC G4 machine running OS X 10.5.8, I get the somewhat curious error

dyld: Library not loaded: /Library/Frameworks/Tk.framework/Versions/8.6:NONE/Tk

as soon as it's trying to start tktest. That ":NONE" looks rather suspicious, don't you think?

As far as I can tell, the problem is that LIB_RUNTIME_DIR is being set up as a colon-separated list of directories, which is then copied to DYLIB_INSTALL_DIR, which in turn is treated as just one directory. Makefile.in sets it up thus:

DYLIB_INSTALL_DIR = ${LIB_RUNTIME_DIR}

and this variable is only used in configure.in, thus:

TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}"/${TK_LIB_FILE}'

But configure.in also contains commands (probably conditionalised) such as

LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}/lib"

LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${x_libraries}"

that treat LIB_RUNTIME_DIR very much as a list of paths.

There is probably also a secondary bug that NONE is being treated as a path, when it really is some kind of null (=no data), but working out what goes wrong there likely requires some understanding of configurations for other platforms, so I won't form any opinion on that.

FWIW, manually editing the build/tk/*/Makefile to remove the second components from the two definitions of LIB_RUNTIME_DIR (one near the top, one in the tktest target instructions) made the Development test succeed, although the Deployment tktest crashes:
/bin/sh: line 1: 53644 Bus error ./tktest /Users/lars/Projekt/Tcl-projekt/Tcl/tk/unix/../tests/all.tcl -geometry +0+0
make[2]: *** [test-classic] Error 138
make[1]: *** [test-tk] Error 2
make: *** [test-deploy] Error 2
But maybe it's better to leave that be until the makefile issue has been sorted out (I'm happy that I could install the Development variant).

Discussion

  • Daniel A. Steffen

    • milestone: --> obsolete: 8.6b1
    • priority: 5 --> 9
    • assigned_to: das --> dkf
     
  • Daniel A. Steffen

    Thanks, that problem was introduced by Donal's change:

    2010-02-19 Donal K. Fellows <dkf@users.sf.net>

    * unix/configure.in, unix/Makefile.in: [Bug 2415437]: Corrections to
    allow installation of Tcl and Tk to different directories, especially
    when neither is a system standard location. Also [Tcl Bug 2307398].

    this needs to be adjusted to not use LIB_RUNTIME_DIR as a list of paths (better to use a new var for this IMO) or alternatively to extract the first element for DYLIB_INSTALL_DIR.

     
  • Donal K. Fellows

    Squelched the NONE.

     
  • Donal K. Fellows

    • priority: 9 --> 8
     
  • Donal K. Fellows

    I don't know what to reorganize things to, but I can now do 'make shell' successfully so it's less urgent. :-)

     
  • Lars Hellström

    Lars Hellström - 2010-03-23

    OK, now the makefile seems to be fine.
    The Development variant goes through the test (with some failures, but I believe that's normal).
    The Deployment variant crashes tktest, apparently immediately:

    make -C "/Users/lars/Projekt/Tcl-projekt/Tcl/tk/macosx/../../build/tk/Deployment" test INSTALL_ROOT='' INSTALL_TARGETS='install-binaries install-libraries install-private-headers install-demos' VERSION='8.6'
    DYLD_FRAMEWORK_PATH="`pwd`:/Users/lars/Projekt/Tcl-projekt/Tcl/build/tcl/Deployment:${DYLD_FRAMEWORK_PATH}"; export DYLD_FRAMEWORK_PATH; TCL_LIBRARY=/Users/lars/Projekt/Tcl-projekt/Tcl/tcl/library; export TCL_LIBRARY; TK_LIBRARY=/Users/lars/Projekt/Tcl-projekt/Tcl/tk/library; export TK_LIBRARY; ./tktest /Users/lars/Projekt/Tcl-projekt/Tcl/tk/unix/../tests/all.tcl -geometry +0+0
    /bin/sh: line 1: 6111 Bus error ./tktest /Users/lars/Projekt/Tcl-projekt/Tcl/tk/unix/../tests/all.tcl -geometry +0+0
    make[2]: *** [test-classic] Error 138
    make[1]: *** [test-tk] Error 2
    make: *** [test-deploy] Error 2

    Any suggestions/instructions on how I might proceed with debugging?

     
  • Lars Hellström

    Lars Hellström - 2010-03-23
    • summary: Garbage in -install_name --> Deployment bus error (Was: Garbage in -install_name)
     
  • Lars Hellström

    Lars Hellström - 2010-03-24

    On second though, it is probably better to leave this bug with DKF and having it be on the subject of clarifying what should be in DYLIB_INSTALL_DIR and LIB_RUNTIME_DIR. I'll file a separate bug on the crash of the Deployment executables.

    Sorry about the noise.

     
  • Lars Hellström

    Lars Hellström - 2010-03-24
    • summary: Deployment bus error (Was: Garbage in -install_name) --> Directory or list thereof (Was: Garbage in -install_name)