Issue will gt.topology.all_paths()


I am running graph-too v2.18 on Ubuntu 15.10 and I was trying to to use the
all_paths() function but when I run the example code (or any other code for
that matter) I keep getting the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.4/", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/graph_tool/topology/",
line 1732, in all_paths
    _prop("v", g, visited))
RuntimeError: This functionality is not available because boost::coroutine
was not found at compile-time

Did I compile the graph-tool the wrong way or is it a problem with the
function itself?


attachment.html (964 Bytes)

As the error message indicates, the boost::coroutine library was not found
at compilation, and hence the algorithm was not compiled, since it requires it.

One of your previous posts indicated that there might be an issue with
Ubuntu and co-routine installation. Is this still valid?

attachment.html (2.46 KB)

This has been fixed in newer Ubuntu and Debian releases.

Is there a particular version that graph-tool requires? Because when I ran
configure I get the following:

checking whether the Boost::Coroutine library is available... yes
configure: WARNING: No usable boost::coroutine found! Some functionality
will be disabled in the library.

My system has coroutine1.58

attachment.html (1.86 KB)

This should be sufficient. It could be that the configure script is having
trouble detecting the correct name of the library (which varies across
distros). Try the following:

   ./configure --with-boost-coroutine=boost_coroutine


That seems to do the trick.


attachment.html (1.64 KB)


Apologies for yet another email, but now the compilation fails with the
following error.
I tried modifying the LDFLAGS parameter with the suggested value but still
same error.
Any suggestions?

Thansk again for all the help,

  CXX graph_blockmodel_overlap_vacate.lo
  CXX graph_inference.lo
  CXX int_part.lo
  CXX spence.lo
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/
libboost_coroutine.a(exceptions.o): relocation R_X86_64_32 against `.bss'
can not be used when making a shared object; recompile with -fPIC
error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:556: recipe for target '' failed
make[4]: *** [] Error 1
make[4]: Leaving directory '/media/sf_VB_SHARE/graph-
Makefile:741: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/media/sf_VB_SHARE/graph-tool-2.18/src/graph'
Makefile:412: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/media/sf_VB_SHARE/graph-tool-2.18/src'
Makefile:584: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/sf_VB_SHARE/graph-tool-2.18'
Makefile:471: recipe for target 'all' failed
make: *** [all] Error 2

attachment.html (3.76 KB)

It seems like the boost::corountine library was compiled statically, instead
of dynamically. Check if there is a file in the lib
directory. If there is not, you have to re-compile boost making sure all
libraries are shared objects.