Ubuntu graphviz 'sfdp' not working
Asked Answered
T

3

11

I'm trying to make some Networkx Graphviz graphs.

After running: pos = nx.graphviz_layout(G, prog = 'sfdp'). An error occured, saying:

Error: remove_overlap: Graphviz not built with triangulation library

After some Google research I found that GTS is the problem. Bug report stated:

The Graphviz package is built --without-gts. This is bad news for sfdp, which complains “Error: remove_overlap: Graphviz not built with triangulation library” and fails to produce the beautiful output it creates when compiled --with-gts

Looking at comments ( on bug report ), someone said that the upstream sources for Graphviz are kept at link but I couldn't find new versions to download.

On package list I have the latest one (2.36 for trusty).

Anyone else having problems with sfdp?

Any help will be greatly appreciated!

Trott answered 11/12, 2015 at 16:42 Comment(2)
Same problem, no solution yet.Patrica
@PaulSmith I gave up a long time ago :DTrott
B
7

For the ubuntu users, this is how I got grapvhiz to work on 16.04,compiling graphviz-2.40.1 from source:

In a first step , GTS needs to be installed , as graphviz looks for the gts.pc file.

Running

apt-file search gts.pc

Informs me I have to install 'libgts-dev' :

sudo apt install libgts-dev

next make pkg-config aware of the files:

pkg-config --libs gts

pkg-config --cflags gts

run configure to link in the gts library:

./configure --with-gts  --prefix ~
make
make install

SFDP no longer throws the error 'Error: remove_overlap: Graphviz not built with triangulation library'

The command line codes for the pkg config I modified from this answer.

Breach answered 3/3, 2017 at 13:8 Comment(4)
Downloaded graphviz-2.40.1.tar.gz from here and ran through your procedure, and it works - sort of. I can use some commands (dot, fdp), but not others (sfdp, neato). Any idea what's going on here? (Using Ubuntu 16.04.2) `Diplocardiac
/usr/bin/sfdp: No such file or directory is the problem, btw. Whereas the other commands work just like normal. This post seems to agree with the above procedure answer (1. install libgts-dev, 2. add --with-gts to configuration). Anyone else out there having the same problem as me?Diplocardiac
Okay, I got it working (no problems yet, at least) - for others who have similar troubles, I wrote some info here: github.com/ellson/graphviz/issues/1237 Though it was probably just something I did wrong. Thanks, Sam!Diplocardiac
Hi @JoeRocc , sorry I did not see your comment. Glad you got it to work.Breach
D
6

I know the question is for Ubuntu, but in case someone is having the same problem on macOS using homebrew the following worked for me:

brew reinstall graphviz --with-gts
Deanery answered 7/1, 2017 at 5:33 Comment(1)
As of now, gts is one of the dependencies of graphviz, so simple reinstalling solves the problem.Bracci
P
1

I might have it working for Ubuntu 14.04, YMMV

Download the following graphviz packages directly from https://packages.debian.org/search?keywords=graphviz

  • graphviz_2.38.0-13_amd64.deb
  • libcgraph6_2.38.0-13_amd64.deb
  • libgvc6_2.38.0-13_amd64.deb
  • libgvpr2_2.38.0-13_amd64.deb
  • libltdl7_2.4.6-0.1_amd64.deb
  • python-pygraphviz_1.3.1-1_amd64.deb

I used version 2.38.0-13 from the stretch(testing) group. You will need to remove the 32bit libltdl7 if present:

sudo apt-get remove libltdl7:i386

Install the packages directly with

sudo dpkg -i graphviz_2.38.0-13_amd64.deb    
sudo dpkg -i libcgraph6_2.38.0-13_amd64.deb libgvc6_2.38.0-13_amd64.deb libgvpr2_2.38.0-13_amd64.deb libltdl7_2.4.6-0.1_amd64.deb

You can expect dependency errors. I cleared them with:

sudo apt-get install -f

And then re-install

sudo dpkg -i graphviz_2.38.0-13_amd64.deb
sudo dpkg -i python-pygraphviz_1.3.1-1_amd64.deb

The error no longer appeares though I would be hard pushed to say the graphs are any better.

Patrica answered 10/5, 2016 at 16:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.