Compile/Install draw library file mis-linkings

I’ve managed to install graph-tool version 2.29 (commit d4154c6c) via
aptitude installer on Ubuntu 18.04 in a python3 miniconda venv. The
following example gist causes a 127 exit code caused by some sort of fudged
up library linking to libgraph_tool_draw.so with:

undefined symbol:
_ZN5Cairo7Context16select_font_faceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9FontSlantENS_10FontWeightE

from graph_tool.all import *
g = Graph()
ug = Graph(directed=False)
ug = Graph()
ug.set_directed(False)
assert ug.is_directed() == False
v1 = g.add_vertex()
v2 = g.add_vertex()
graph_tool.draw.graph_draw(g, vertex_text=g.vertex_index,
vertex_font_size=18,
                           output_size=(200, 200), output="test.png”)

Incidentally, when try to compile graph-tool from upstream master the make
routine fails with a libtools error on reading libsigc-2.0.la in my
configuration using
--with-python-module-path=…/miniconda3/envs/mne/lib/python3.7/site-packages.

On the verge of losing more hair than I can afford. Magic fix commands
appreciated.

-Kam

attachment.html (1.94 KB)

I’ve managed to install graph-tool version 2.29 (commit d4154c6c) via
aptitude installer on Ubuntu 18.04 in a python3 miniconda venv. The
following example gist causes a 127 exit code caused by some sort of
fudged up library linking to libgraph_tool_draw.so with:

undefined symbol:
_ZN5Cairo7Context16select_font_faceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9FontSlantENS_10FontWeightE

If you used the ubuntu package, the library was installed in the
system's Python environment. The missing symbol is probably due to your
anaconda environment having different library versions. If you want to
use anaconda, you should install graph-tool from there, otherwise this
kind of mismatch is bound to happen.

Incidentally, when try to compile graph-tool from upstream master the
make routine fails with a libtools error on reading libsigc-2.0.la
<http://libsigc-2.0.la> in my configuration using
--with-python-module-path=…/miniconda3/envs/mne/lib/python3.7/site-packages.

If you want help with compilation, you need to provide more information,
including the entire contents of the config.log file, as well as the
entire output of the configure command, together with the entire error
messages, not only snippets.

Best,
Tiago

Hello Tiago,
I’ve aped my way through a few install iterations, didn’t have any luck with compiling, however the conda installation in my working venv no longer crashes the python console with exit 127 code!
Now, the same gist yields an AttributeError:

Traceback (most recent call last):
File "~/miniconda3/envs/mne/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-10-e39c37064277>", line 1, in <module>
graph_tool.draw.graph_draw(g, vertex_text=g.vertex_index, vertex_font_size=18,
AttributeError: module 'graph_tool.draw' has no attribute 'graph_draw'

Thanks for the help.
Kam

I’ve managed to install graph-tool version 2.29 (commit d4154c6c) via
aptitude installer on Ubuntu 18.04 in a python3 miniconda venv. The
following example gist causes a 127 exit code caused by some sort of
fudged up library linking to libgraph_tool_draw.so with:

undefined symbol:
_ZN5Cairo7Context16select_font_faceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9FontSlantENS_10FontWeightE

If you used the ubuntu package, the library was installed in the
system's Python environment. The missing symbol is probably due to your
anaconda environment having different library versions. If you want to
use anaconda, you should install graph-tool from there, otherwise this
kind of mismatch is bound to happen.

Incidentally, when try to compile graph-tool from upstream master the
make routine fails with a libtools error on reading libsigc-2.0.la
<http://libsigc-2.0.la> in my configuration using
--with-python-module-path=…/miniconda3/envs/mne/lib/python3.7/site-packages.

If you want help with compilation, you need to provide more information,
including the entire contents of the config.log file, as well as the
entire output of the configure command, together with the entire error
messages, not only snippets.

Best,
Tiago

attachment.html (4.44 KB)

The drawing functionality of graph-tool requires the GTK library to be
installed, but this is not packaged by anaconda.

If you want drawing to work, you have to move out of anaconda.

Best,
Tiago