python: symbol lookup error: libgraph_tool_draw.so: undefined symbol: _ZN5Cairo7ContextC1EP6_cairob

Hi Tiago,

Thank you for the help so far. Carrying on the post from gitlab
(https://git.skewed.de/count0/graph-tool/issues/367 ) the problem seems to
not be solved yet.

I have set `export LD_LIBRARY_PATH="-L/home/pmj27/anaconda/lib"` in
`~/.bashrc` and `~/.profile`. If I type `echo $LD_LIBRARY_PATH` the shell
returns `-L/home/pmj27/anaconda/lib` as I would expect.

However, running `graph_draw` still returns the error `python: symbol lookup
error:
/home/pmj27/anaconda/lib/python2.7/site-packages/graph_tool/draw/libgraph_tool_draw.so:
undefined symbol: _ZN5Cairo7ContextC1EP6_cairob`.

Do you have any other thoughts on what might be going wrong here?

As mentioned, it was compiled using `sudo ./configure CXX="g++-5"
CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"
PYTHON="/home/pmj27/anaconda/bin/python2.7"
CAIROMM_LIBS="-L/home/pmj27/anaconda/include/cairomm-1.0/cairomm"
--enable-openmp`.

Best wishes,

Philipp

This is incorrect. This environment variable expects a path, not compiler
flag. The correct would be:

    LD_LIBRARY_PATH="/home/pmj27/anaconda/lib"

(provided this is really where the cairo library resides)

Hi Tiago,

This doesn't seem to be doing it yet, the error persists. My ~/.profile now
says:

    export LD_LIBRARY_PATH="/home/pmj27/anaconda/lib
/home/pmj27/software/boost_1.61/lib"

(It contains boost from another installation too.) Do you know what the
library file I am looking for might be called?

On another machine where I have installed graph-tool using

    ./configure CXXFLAGS="-std=gnu++14 -Wno-unused-local-typedefs"
PYTHON="/home/pmj27/anaconda2/bin/python2.7"
CAIROMM_LIBS="-L/home/pmj27/anaconda2/include/cairomm-1.0/cairomm"
--enable-openmp

Setting export LD_LIBRARY_PATH="/home/pmj27/anaconda2/lib" in ~/.bashrc and
~/.profile then causes this error message from Nautilus:

    nautilus: symbol lookup error: /home/pmj27/anaconda2/lib/libgdk-3.so.0:
undefined symbol: cairo_surface_set_device_scale

This is still wrong. Multiple paths should be separated with ":" not spaces.
Please read a bit on how shared library linking works on GNU/Linux,
otherwise we stay stuck on this game of whack-a-mole:

    http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

Thank you for that link, that was quite helpful.

I have set the entry to

    export
LD_LIBRARY_PATH="/home/pmj27/anaconda/lib:/home/pmj27/software/boost_1.61/lib"

This doesn't fix it though. It still breaks Nautilus and graph-tool still
returns the same error. I have also checked, a file called
"libcairomm-1.0.so" resides inside "/home/pmj27/anaconda/lib". "libcairo.so"
resides in the same directory. Are these the correct files to be looking
for? I am really very sorry to be taking up your time with this!