Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphviz Dot failing to remove overlaps due to missing library

I am trying to run the following dot command from the command line:

dot -v ~/Documents/FlowGraph/dot_sample_1_full.dot -Tpng 'Documents/FlowGraph/sampleOutput.png' -Ksfdp -Goverlap=false

but it is failing with this output:

dot - graphviz version 2.36.0 (20140111.2315)
Using render: cairo:cairo
Using device: png:cairo:cairo
libdir = "/usr/local/lib/graphviz"
Activated plugin library: libgvplugin_neato_layout.6.dylib
Using layout: sfdp:neato_layout
The plugin configuration file:
    /usr/local/lib/graphviz/config6
        was successfully loaded.
    render  :  cairo dot fig map pic pov ps quartz svg tk vml xdot
    layout  :  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout  :  textlayout
    device  :  bmp canon cgimage cmap cmapx cmapx_np dot eps exr fig gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz x11 xdot xdot1.2 xdot1.4 xlib
    loadimage   :  (lib) bmp eps gif jpe jpeg jpg pdf png ps svg
fontname: "Times-Roman" resolved to: (ps:pango  Times,  REGULAR) (PangoCairoCoreTextFont) "Times" 
  margin 8
pack info:
  mode   node
  size   0
  flags  0
ctrl->overlap=-1
Error: remove_overlap: Graphviz not built with triangulation library

I've Googled and found this thread, which suggested:

gts has to be installed before graphivz so enter 'sudo brew remove graphviz' to remove graphivz and 'sudo brew install gts' and 'sudo install graphivz' to install graphivz with gts.

but that didn't seem to work. I'm still getting the error so either I didn't do it right, or that wasn't the solution for me.

How do I add the triangulation library to graphviz?

like image 419
bkbeachlabs Avatar asked Jun 28 '15 15:06

bkbeachlabs


2 Answers

Homebrew doesn't support command line install options anymore, so the previous answers will not work anymore.

However, by accident i discovered that removing graphviz, installing gts, then installing graphviz works. It seems that graphviz will use gts if it isnt installed, but for some reason, it isnt a dependency.

brew remove graphviz brew install gts brew install graphviz

like image 152
Kevin Avatar answered Nov 18 '22 12:11

Kevin


I had a similar problem on macOS with sfdp and the following is what solved it.

$ brew uninstall graphviz  
$ brew install gts 
$ brew install --with-gts graphviz
like image 12
Pal Avatar answered Nov 18 '22 12:11

Pal