Statically compiled Graphviz dot

1.3 2017-10-04 14:39 UTC

This package is auto-updated.

Last update: 2024-06-12 23:56:42 UTC


This is a very basic version without any additional options, it supports SVG output (no PNG), and only plaintext node labels (no HTML).


Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains.

The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in useful formats, such as images and SVG for web pages; PDF or Postscript for inclusion in other documents; or display in an interactive graph browser.


digraph G {

	subgraph cluster_0 {
		node [style=filled,color=white];
		a0 -> a1 -> a2 -> a3;
		label = "process #1";

	subgraph cluster_1 {
		node [style=filled];
		b0 -> b1 -> b2 -> b3;
		label = "process #2";
	start -> a0;
	start -> b0;
	a1 -> b3;
	b2 -> a3;
	a3 -> a0;
	a3 -> end;
	b3 -> end;

	start [shape=Mdiamond];
	end [shape=Msquare];


Graph example

dot command

dot can be used to create ``hierarchical'' or layered drawings of directed graphs. This is the default tool to use if edges have directionality. dot aims edges in the same direction (top to bottom, or left to right) and then attempts to avoid edge crossings and reduce edge length.

This package contains statically compiled version(s) of dot (self contained versions, which dont have dependencies on additional system libraries). These can simply be uploaded to a webserver in order to use dot without root/installation privileges.


  • Simply install using composer (composer require restruct/dot-static), upload to your server and make sure you call the correct dot_static for your architecture (hopefully x64/Linux 64bit, which is the only version currently included)
  • Make sure the vendor/restruct/dot-static/x64/dot_static executable has executable permissions (chmod +x / 744). This permission is set on the file in the repo but doesn't always seem to get transfered properly when uploading via FTP.
  • For local development on OSX, simply install dot using Homebrew (brew install graphviz) and use that instead.

Additional notes/credits

Add a deb-src source to /etc/apt/sources.list and run apt-get update

Install dependencies using apt-get build-dep graphviz

Then used Life in plain text as a reference on how to compile dot_static, commands duplicated here for reference (ammended configure --enable-static=yes --enable-shared=no):

$ wget
$ tar -xvf graphviz-2.40.1.tar.gz 
$ // cd into the directory
$ ./configure --enable-static=yes --enable-shared=no
$ // install missing dependencies if there is any 
$ make 
$ cd cmd/dot
$ make dot_static

Compiling a more full-featured version

I didn't manage to compile a static version of dot with more options/library/plugins. My attempts always resulted in dynamically linked libraries and thus - crashes when run on the webserver. Most importantly, I'd like to compile a version which includes PNG output (libpng) and HTML labels (libexpat) support

Check library dependencies & getting static versions:

Additional references:

Using Debian pre-compiled versions in homedir with setting LD_LIBRARY_PATH:

Javascript version

Using Emscripten, this project transpiles dot into Javascript, allowing it to run in the browser, which would remove the need to install it on the server altogether:


  • This 'Object code': MIT
  • Source code: Eclipse Public License - v 1.0