Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building graphviz from source on Ubuntu (to add gts triangulation library) #1237

Closed
josephrocca opened this issue May 5, 2017 · 5 comments
Closed

Comments

@josephrocca
Copy link

josephrocca commented May 5, 2017

When installing on ubuntu (16.04.2) with sudo apt install graphviz, I get the following error when trying to use sfdp:

Error: remove_overlap: Graphviz not built with triangulation library

After some searching I found out that it's because graphviz was built with --without-gts (launchpad bug report). So I set about trying to build it myself (I'm new to this).

I followed the following procedure (from this SO answer):

  1. run sudo apt install libgts-dev
  2. run sudo pkg-config --libs gts
  3. run sudo pkg-config --cflags gts
  4. Download graphviz-2.40.1.tar.gz from here
  5. Extract and run sudo ./configure --with-gts --prefix ~ in the folder
  6. Run sudo make in the folder
  7. Run sudo make install in the folder

After doing that I can successfully use some commands (dot, fdp), but not others (sfdp, neato). I get /usr/bin/sfdp: No such file or directory when trying to use sfdp, for example. Can anyone see anything wrong with my procedure? Thanks!

@josephrocca
Copy link
Author

I'm not sure what I did, but I somehow got it working (at least, all looks good so far). For others having this problem, try:

  • Restarting your computer
  • Before installing, making sure you've ran sudo apt purge graphviz (and sudo make uninstall if you're retrying building from source)
  • Make sure you're using sudo for installing
  • Have a look at the output of sudo ./configure --with-gts --prefix ~ - at the end it'll tell you which commands/options are available given the dependencies that you have.

Good luck!

@graphviz
Copy link
Collaborator

graphviz commented May 5, 2017 via email

@dustinmichels
Copy link

This thread was very helpful to me! For anyone else having trouble, I'll just note that my exact steps were:

  1. Remove any existing installation with conda uninstall graphviz. (If you did not install with Conda, you might need to do sudo apt purge graphviz and/or pip uninstall graphviz).
  2. run sudo apt install libgts-dev
  3. run sudo pkg-config --libs gts
  4. run sudo pkg-config --cflags gts
  5. Download graphviz-2.40.1.tar.gz from here
  6. Navigate to directory containing download, and extract with tar -xvf graphviz-2.40.1.tar.gz (or newer whatever the download is named.)
  7. cd into extracted folder (ie cd graphviz-2.40.1) and run sudo ./configure --with-gts
  8. Run sudo make in the folder
  9. Run sudo make install in the folder
  10. Reinstall library using pip install graphviz

@blaiseli
Copy link

@dustinmichels What are the pkg-config commands for?

@ellson
Copy link
Owner

ellson commented Sep 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants