Graphviz static build
From genomewiki
Jump to navigationJump to search
Dot is not very static by default.
I first installed + compiled cairo-1.14.8 pango-1.40.5 libpng-1.6.29 fontconfig-2.12.1 harfbuzz-1.4.6 pcre and libgd-2.2.3
- pcre:
- configure --prefix=${HOME}/usr --enable-static --enable-utf && make -j40 && make install
- cairo:
- configure --prefix=${HOME}/usr --enable-static --without-x --enable-xcb=no --enable-xcb-shm=no --enable-xlib-xcb=no --without-xlib-xrender --without-xlib --enable-xlib-xrender=no --enable-xblib=no --disable-xlib --disable-x 2>&1 | less
- pango
- configure --prefix=${HOME}/usr --enable-static --without-xft --enable-static --with-pic CFLAGS=-fPIC CXXFLAGS=-fPIC --disable-shared
- libgd
- configure --prefix=${HOME}/usr --enable-static --without-x
It is possible that only libgd is really needed to get graphviz to work.
Download and extract graphviz 2.28.0
configure --prefix=${HOME}/usr --enable-static=yes --enable-ltdl=no --enable-swig=no --enable-tcl=no --enable-x=no --with-expat=no --with-visio=no --with-cgraph=no --with-fontconfig=no --disable-sharp --disable-guile --disable-io --disable-java --disable-lua --disable-ocaml --disable-perl --disable-php --disable-python --disable-ruby --disable-tcl --enable-shared=no --with-gtk=no --with-poppler=no --with-gdk-pixbuf=no --with-fontconfig=no --with-gtkgl=no --with-gtkglext=no --with-ann=no --with-glade=no --with-qt=no -with-x=no
After a graphviz compile, cd cmd/dot and
rm dot_static make CCLD="echo gcc"
Based on the output, I constructed this GCC command:
gcc -g -O2 -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math -o dot_static dot_static-dot.o dot_static-dot_builtins.o -L/cluster/home/max/usr/lib ../../plugin/dot_layout/.libs/libgvplugin_dot_layout_C.a ../../plugin/neato_layout/.libs/libgvplugin_neato_layout_C.a ../../plugin/core/.libs/libgvplugin_core_C.a ../../lib/gvc/.libs/libgvc_C.a ../../lib/pathplan/.libs/libpathplan_C.a ../../lib/cgraph/.libs/libcgraph_C.a ../../lib/xdot/.libs/libxdot_C.a ../../lib/cdt/.libs/libcdt_C.a -L/usr/lib64 ../../plugin/gd/.libs/libgvplugin_gd_C.a -L/ /cluster/home/max/usr/lib/libgd.a /cluster/home/max/usr/lib/libjpeg.a ../../plugin/pango/.libs/libgvplugin_pango_C.a /cluster/home/max/usr/lib/libpangocairo-1.0.a /cluster/home/max/usr/lib/libpangoft2-1.0.a /cluster/home/max/usr/lib/libharfbuzz.a /cluster/home/max/usr/lib/libpcre.a /cluster/home/max/usr/lib/libpango-1.0.a /cluster/home/max/usr/lib/libgthread-2.0.a /cluster/home/max/usr/lib/libcairo.a /cluster/home/max/usr/lib/libpixman-1.a /cluster/home/max/usr/lib/libfontconfig.a /cluster/home/max/usr/lib/libexpat.a /cluster/home/max/usr/lib/libfreetype.a -lbz2 -lpng12 /cluster/home/max/usr/lib/libpng16.a -lz -lm /cluster/home/max/usr/lib/libgobject-2.0.a -lffi /cluster/home/max/usr/lib/libglib-2.0.a -lpthread -lrt -pthread -Wl,-rpath -Wl,/cluster/home/max/usr/lib -Wl,-rpath -Wl,/cluster/home/max/usr/lib