Graphviz Dot failing to remove overlaps due to missing library
Asked Answered
P

2

9

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?

Plashy answered 28/6, 2015 at 15:27 Comment(1)
Ubuntu/Linux users, check out this answer.Blunger
K
12

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
Katekatee answered 3/1, 2017 at 21:6 Comment(1)
Saved my bacon. I was spending hours trying to figure out why all my edges were criss-crossing.Schaller
D
4

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

Date answered 19/4, 2019 at 15:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.