4

Homebrew quits when trying to install graphviz,

CCLD   libtcldot_builtin.la
ld: library not found for -ltclstub8.6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libtcldot.la] Error 1
make[4]: *** Waiting for unfinished jobs....
ld: library not found for -ltclstub8.6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libtcldot_builtin.la] Error 1
make[3]: *** [install-recursive] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

an issue seems to be that this particular library is not the one installed on the machine,

/System/Library/Frameworks/Tcl.framework/Versions/8.4/libtclstub8.4.a
/System/Library/Frameworks/Tcl.framework/Versions/8.5/libtclstub8.5.a
/System/Library/Frameworks/Tcl.framework/libtclstub8.5.a
/usr/lib/libtclstub8.5.a

it looks around the net like a decent amount of people are running into trouble trying to install graphviz with homebrew. There solutions however seem to not work for me.

Johannes Kuhn
  • 14,778
  • 4
  • 49
  • 73
tipanverella
  • 3,477
  • 3
  • 25
  • 41
  • this is the error that seems to be halting the process: ld: library not found for -ltclstub8.6 However, a locate reveals: /usr/lib/libtclstub8.6.a /usr/local/Cellar/tcl-tk/8.6.0/lib/libtclstub8.6.a Could someone please help me with this, or at least provide some good/usefull reference. http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion and http://stackoverflow.com/questions/12123751/graphviz-and-brew-doctor-unexpected-dylibs-error/12164207#12164207 DO NOT address my problem! – tipanverella Aug 06 '13 at 15:11

2 Answers2

3

The package seems to have moved recently:

brew install homebrew/dupes/tcl-tk
sudo ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
sudo ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib
sudo ln -s /usr/lib/libtclstub8.5.a /usr/lib/libtclstub8.6.a
sudo ln -s /usr/lib/libtkstub8.5.a /usr/lib/libtkstub8.6.a
brew reinstall graphviz
bfschott
  • 176
  • 1
  • 5
2

Following the answer in here, it seems like

remove tcl-tk
brew -v install tcl-tk --with-tk
sudo ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib
sudo ln -s /usr/local/Cellar/tcl-tk/8.6.0/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib
sudo ln -s /usr/lib/libtclstub8.5.a /usr/lib/libtclstub8.6.a
sudo ln -s /usr/lib/libtkstub8.5.a /usr/lib/libtkstub8.6.a
brew update
brew upgrade
brew -v reinstall graphviz

does the trick. The last two linking where done as suggested here. I hope this helps other folks.

Community
  • 1
  • 1
tipanverella
  • 3,477
  • 3
  • 25
  • 41
  • 4
    Heads up to those who've made the switch to 10.11 (El Capitan) - this won't work since rootless was introduced. Will come back with a solution if I find one. – gnuchu Aug 11 '15 at 13:45