TK dependency woes

127 views
Skip to first unread message

Lewis Levin

unread,
Aug 25, 2016, 5:57:49 PM8/25/16
to julia-users
It is a bit beyond me to debug what follows.

My Python build works fine.  PyPlot within Julia works fine.

 I suspect the problem is with the ImageView package.

objc[34842]: Class TKApplication is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /usr/lib/libtk.dylib. One of the two will be used. Which one is undefined.

objc[34842]: Class TKMenu is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /usr/lib/libtk.dylib. One of the two will be used. Which one is undefined.

objc[34842]: Class TKContentView is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /usr/lib/libtk.dylib. One of the two will be used. Which one is undefined.

objc[34842]: Class TKWindow is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /usr/lib/libtk.dylib. One of the two will be used. Which one is undefined.

ERROR: LoadError: LoadError: LoadError: LoadError: Tk.TclError("error initializing Tcl: Can't find a usable init.tcl in the following directories: \n    /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/tcl8.5 /Applications/Julia-0.4.6.app/Contents/Resources/lib/tcl8.5 /Applications/Julia-0.4.6.app/Contents/Resources/julia/library /Applications/Julia-0.4.6.app/Contents/Resources/library /Applications/Julia-0.4.6.app/Contents/Resources/tcl8.5.9/library /Applications/Julia-0.4.6.app/Contents/tcl8.5.9/library\n\n/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/init.tcl: version conflict for package \"Tcl\": have 8.5.9, need exactly 8.5.17\nversion conflict for package \"Tcl\": have 8.5.9, need exactly 8.5.17\n    while executing\n\"package require -exact Tcl 8.5.17\"\n    (file \"/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/init.tcl\" line 19)\n    invoked from within\n\"source /Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/init.tcl\"\n    (\"uplevel\" body line 1)\n    invoked from within\n\"uplevel #0 [list source \$tclfile]\"\n\n\nThis probably means that Tcl wasn't installed properly.\n")

 in init at /Users/lewislevin/.julia/v0.4/Tk/src/tkwidget.jl:58

 in include at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in require at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in require at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

 in include_from_node1 at /Applications/Julia-0.4.6.app/Contents/Resources/julia/lib/julia/sys.dylib

while loading /Users/lewislevin/.julia/v0.4/Tk/src/tkwidget.jl, in expression starting on line 454

while loading /Users/lewislevin/.julia/v0.4/Tk/src/Tk.jl, in expression starting on line 37

while loading /Users/lewislevin/.julia/v0.4/ImageView/src/ImageView.jl, in expression starting on line 14

while loading /Users/lewislevin/Dropbox/Online Coursework/Stanford Machine Learning/Assignments/julia-ex7/ex7.jl, in expression starting on line 23

Andreas Lobinger

unread,
Aug 26, 2016, 12:30:57 PM8/26/16
to julia-users

Lewis Levin

unread,
Aug 29, 2016, 12:30:20 PM8/29/16
to julia-users
I'd seen that reference you suggested and I don't really want to change all the dependencies.  

Something in the latest mods of ImageView or Images broke things.  All I've done is to reinstall Julia 0.4.6 and all packages.  All of the dependencies:  Python, TK, tcl have been left as is.

If I do using Images, ImageView from the julia command line and then include a script all works.  If I include the script at the command line (the script contains using Images, ImageView) then it fails.

Why should their be a difference?


Lewis Levin

unread,
Aug 29, 2016, 12:45:02 PM8/29/16
to julia-users
Deeper view of the problem.  Either code in Julia packages or OS X itself can't resolve symlinks properly.

If you look at the conflict message, the conflict is between libtk.dylib and /Library/Frameworks/Tk.framework/Versions/8.5/Tk.

Here is the absurdity:  libtk.dylib is a symlink to libtk8.5.dylib which is a symlink to /Library/Frameworks/Tk.framework/Versions/8.5/Tk.  

So, there is only ONE version of TK installed.  The problem is the series of symlinks.

Unfortunately, due to OS X security it appears to be impossible to modify things in /usr/lib.  I have tried with sudo and the OS still blocks.

Lewis Levin

unread,
Aug 29, 2016, 12:49:45 PM8/29/16
to julia-users
Further:  there is nothing about the command line.  If you include("script.jl") in julia, the first time it fails.  Immediately, run it a second time and it works.

Go figure.

This is still not really as it should be and looking for any further help.
Reply all
Reply to author
Forward
0 new messages