Hi,
I have installed the package python3-graph-tool and when I use graph_tool.search.dfs_iterator I got the error:
Traceback (most recent call last): File "/home/steph/bin/superGraph.py", line 160, in <module> gg.create_revdep(gg.getPackage('umda')) File "/home/steph/bin/superGraph.py", line 88, in create_revdep for e in bfs_iterator(self.graph, node): File "/usr/lib/python3/dist-packages/graph_tool/search/__init__.py", line 345, in bfs_iterator return libgraph_tool_search.bfs_search_generator(g._Graph__graph, int(source)) RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
Ubuntu: 14.04 python3-graph-tool version 2.12-1 (from deb http://downloads.skewed.de/apt/trusty trusty universe)
There is a way to install python3-graph-tool binaries compiled with boost ?
Of course I can compile myself graph-tool, but it is not my goal.
On 13.01.2016 11:58, Alcolo Alcolo wrote:
Hi,
I have installed the package python3-graph-tool and when I use graph_tool.search.dfs_iterator I got the error:
Traceback (most recent call last): File "/home/steph/bin/superGraph.py", line 160, in <module> gg.create_revdep(gg.getPackage('umda')) File "/home/steph/bin/superGraph.py", line 88, in create_revdep for e in bfs_iterator(self.graph, node): File "/usr/lib/python3/dist-packages/graph_tool/search/__init__.py", line 345, in bfs_iterator return libgraph_tool_search.bfs_search_generator(g._Graph__graph, int(source)) RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
This is a bug in ubuntu. I have already filed a bug report here:
https://bugs.launchpad.net/ubuntu/+source/boost-defaults/+bug/1529289
Unfortunately, nobody seems to care about it. You can vote for the bug or leave a comment, if you want to help it being fixed.
Best, Tiago
I presume this bug is still in existence? When trying to run for path in all_shortest_paths(g,source,target): print path
I receive: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1532, in all_shortest_paths _prop("v", g, all_preds_map)) RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
(c.f.: http://stackoverflow.com/questions/35749561/graph-tool-k-shortest-path-boost... )
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 02.03.2016 16:30, P-M wrote:
I presume this bug is still in existence? When trying to run for path in all_shortest_paths(g,source,target): print path
I receive: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1532, in all_shortest_paths _prop("v", g, all_preds_map)) RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
(c.f.: http://stackoverflow.com/questions/35749561/graph-tool-k-shortest-path-boost... )
This is a bug in Debian, not in graph-tool. It has already been reported and fixed:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802509
Best, Tiago
I'm running Ubuntu 14.04 (I realise this discussion is about Debian, should I open a new one?). Is there any way for me to make the routine work?
Best,
Philipp
-----Original Message----- From: graph-tool [mailto:graph-tool-bounces@skewed.de] On Behalf Of Tiago de Paula Peixoto Sent: 02 March 2016 15:33 To: Main discussion list for the graph-tool project graph-tool@skewed.de Subject: Re: [graph-tool] Debian package and boost at compile-time
On 02.03.2016 16:30, P-M wrote:
I presume this bug is still in existence? When trying to run for path in all_shortest_paths(g,source,target): print path
I receive: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1532, in all_shortest_paths _prop("v", g, all_preds_map)) RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
(c.f.: http://stackoverflow.com/questions/35749561/graph-tool-k-shortest-path -boostcoroutine-was-not-found-at-compile-time )
This is a bug in Debian, not in graph-tool. It has already been reported and fixed:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802509
Best, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
On 02.03.2016 16:37, Philipp-Maximilian Jacob wrote:
I'm running Ubuntu 14.04 (I realise this discussion is about Debian, should I open a new one?). Is there any way for me to make the routine work?
This has not been fixed in ubuntu yet (much less in 14.04, which is quite old). I have reported this to ubuntu already, but got no reaction:
https://bugs.launchpad.net/ubuntu/+source/boost-defaults/+bug/1529289
I think the Debian fix will trickle down to ubuntu at some point, but I have no idea when.
Note that this has nothing to do with graph-tool, it is a bug with *boost*. Hence, unfortunately, the only option in Ubuntu is to compile boost yourself.
Best, Tiago
Hi,
On 2 March 2016 at 15:43, Tiago de Paula Peixoto tiago@skewed.de wrote:
On 02.03.2016 16:37, Philipp-Maximilian Jacob wrote:
I'm running Ubuntu 14.04 (I realise this discussion is about Debian, should I open a new one?). Is there any way for me to make the routine work?
This has not been fixed in ubuntu yet (much less in 14.04, which is quite old). I have reported this to ubuntu already, but got no reaction:
https://bugs.launchpad.net/ubuntu/+source/boost-defaults/+bug/1529289
I think the Debian fix will trickle down to ubuntu at some point, but I have no idea when.
Note that this has nothing to do with graph-tool, it is a bug with *boost*. Hence, unfortunately, the only option in Ubuntu is to compile boost yourself.
I'm one of the boost maintainers in both Debian and Ubuntu.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802509 was just fixed in Debian, so next merge will see it fixed in xenial (16.04).
Note that trusty has boost 1.54 -> was co-routine already a library back then?! My memory is fuzzy, but was it not a headers-only library back then?
If someone prepares a patch for boost1.54 trusty source package, I'm happy to sponsor such an upload. It should do what the fix in svn for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802509 did.
Regards,
Dimitri.
Best, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
On 02.03.2016 18:32, Dimitri John Ledkov wrote:
Note that trusty has boost 1.54 -> was co-routine already a library back then?! My memory is fuzzy, but was it not a headers-only library back then?
I'm not sure if it was headers only, but it was definitely there:
http://www.boost.org/doc/libs/1_54_0/libs/coroutine/doc/html/index.html
Note however that the API is completely different and incompatible with what came with 1.56 and after:
http://www.boost.org/doc/libs/1_56_0/libs/coroutine/doc/html/index.html
which is used by graph-tool. So using coroutines in trusty does not seem possible, other than backporting the whole boost >= 1.56.
Best, Tiago
Not being entirely familiar with the intricacies of Linux yet and much less so with those of C++ and Boost might I follow up on this? What is the outcome of this discussion? Is there a way for me to make it work on my Ubuntu 14.04 machine or, Dimitri, do you foresee the problem being fixed in the Boost libraries soon?
Cheers,
Philipp
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 04.03.2016 15:13, P-M wrote:
Not being entirely familiar with the intricacies of Linux yet and much less so with those of C++ and Boost might I follow up on this? What is the outcome of this discussion? Is there a way for me to make it work on my Ubuntu 14.04 machine or, Dimitri, do you foresee the problem being fixed in the Boost libraries soon?
It is not possible. The features needed by graph-tool were only introduced in version 1.56 of Boost, and Ubuntu 14.04 only includes version 1.54.
(Strictly, it is possible, but you would have to compile and install Boost >= 1.56 yourself. It is much simpler just to upgrade your Ubuntu version. But even then you would have to wait a bit before the bug I mentioned gets fixed in Ubuntu as well.)
Best, Tiago
I am running 14.04.4 LTS which I presume is the latest version of 14.04. I don't want to change to 15.10 as it is not a LTS version so I guess compiling Boost myself is my only chance then.
My guess is that point 5.1 on this page (http://www.boost.org/doc/libs/1_60_0/more/getting_started/unix-variants.html ) contains the instructions that I need to follow. Which libraries do I need to build? Or do you reckon I am best off just building them all?
Once I have done that how do I get graph-tool to use the correct Boost libraries? Will it automatically figure that out or do I need to re-install it/compile it from scratch again?
Best wishes,
Philipp
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 04.03.2016 15:49, P-M wrote:
My guess is that point 5.1 on this page (http://www.boost.org/doc/libs/1_60_0/more/getting_started/unix-variants.html ) contains the instructions that I need to follow. Which libraries do I need to build? Or do you reckon I am best off just building them all?
It doesn't make it easier to compile only some libraries, quite on the contrary. It is simpler to just compile them all.
Once I have done that how do I get graph-tool to use the correct Boost libraries? Will it automatically figure that out or do I need to re-install it/compile it from scratch again?
You need to recompile it.
Best, Tiago
Thank you for all the advice. I shall compile them all then. Do the currently installed boos libraries need deleting?
Simply uninstalling and then re-installing graph-tool with apt-get will not pick up the correct libraries presuming I have installed them beforehand I take it?
Best,
Philipp
-----Original Message----- From: graph-tool [mailto:graph-tool-bounces@skewed.de] On Behalf Of Tiago de Paula Peixoto Sent: 04 March 2016 15:00 To: Main discussion list for the graph-tool project graph-tool@skewed.de Subject: Re: [graph-tool] Debian package and boost at compile-time
On 04.03.2016 15:49, P-M wrote:
My guess is that point 5.1 on this page (http://www.boost.org/doc/libs/1_60_0/more/getting_started/unix-varian ts.html ) contains the instructions that I need to follow. Which libraries do I need to build? Or do you reckon I am best off just building them all?
It doesn't make it easier to compile only some libraries, quite on the contrary. It is simpler to just compile them all.
Once I have done that how do I get graph-tool to use the correct Boost libraries? Will it automatically figure that out or do I need to re-install it/compile it from scratch again?
You need to recompile it.
Best, Tiago
-- Tiago de Paula Peixoto tiago@skewed.de
On 04.03.2016 16:04, Philipp-Maximilian Jacob wrote:
Thank you for all the advice. I shall compile them all then. Do the currently installed boos libraries need deleting?
It is possible to have them installed in parallel.
Note however that the process of compiling and installing boost is somewhat convoluted. If it is your first time doing this, it might take a bit of work.
Also, please do not post questions here about how to solve problems with the boost installation, since it is off topic; you should try the boost mailing lists instead.
Simply uninstalling and then re-installing graph-tool with apt-get will not pick up the correct libraries presuming I have installed them beforehand I take it?
No. As I said, the library needs to be recompiled.
Best, Tiago
Hopefully final question on this matter:
I have compiled boost and now need to point the graph-tool ./compile command to the correct location. I presume this is the --with-boost option? What target am I looking for here? I have compiled boost to "/home/pmj27/software/boost1.60" which includes a "lib" and an "include" directory. Are there any other options that I need to pass so that it uses the correct boost version?
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 07.03.2016 16:49, P-M wrote:
Hopefully final question on this matter:
I have compiled boost and now need to point the graph-tool ./compile command to the correct location. I presume this is the --with-boost option? What target am I looking for here? I have compiled boost to "/home/pmj27/software/boost1.60" which includes a "lib" and an "include" directory. Are there any other options that I need to pass so that it uses the correct boost version?
You do not need to set the --with-boost option. You should only have to pass the following environment variables to configure:
LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CPPFLAGS="-I/home/pmj27/software/boost1.60/lib"
Also, you must set the variable:
LD_LIBRARY_PATH="/home/pmj27/software/boost1.60/lib"
before you import the library, after compilation.
Best, Tiago
It does not seem to pick up the boost::coroutine library like that yet. Is this an issue of boost not being correctly linked to Python or an issue of ./configure not finding the correct file?
Also, how do I pass multiple CPPFLAGS? My current command is (I have run it without the py2cairo instructions to see if that caused the problem, it doesn't):
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CPPFLAGS="-I/home/pmj27/software/boost1.60/lib" CXX='g++-5'
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Here is the config.log file.
-----Original Message----- From: graph-tool [mailto:graph-tool-bounces@skewed.de] On Behalf Of P-M Sent: 08 March 2016 12:43 To: graph-tool@skewed.de Subject: Re: [graph-tool] Debian package and boost at compile-time
It does not seem to pick up the boost::coroutine library like that yet. Is this an issue of boost not being correctly linked to Python or an issue of ./configure not finding the correct file?
Also, how do I pass multiple CPPFLAGS? My current command is (I have run it without the py2cairo instructions to see if that caused the problem, it doesn't):
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CPPFLAGS="-I/home/pmj27/software/boost1.60/lib" CXX='g++-5'
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com. _______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool
On 08.03.2016 13:42, P-M wrote:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CPPFLAGS="-I/home/pmj27/software/boost1.60/lib" CXX='g++-5'
You have to put everything in a single line.
It is all in a single line in the terminal window, the message just split it across several lines so the issue is not caused by that.
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
On 08.03.2016 14:59, P-M wrote:
It is all in a single line in the terminal window, the message just split it across several lines so the issue is not caused by that.
Ok, but you should not repeat the declaration of the same variable twice, since the second declaration overrides the previous one. It should be instead:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/lib" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
On 08.03.2016 15:03, Tiago de Paula Peixoto wrote:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/lib" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
I just noticed that your include path for boost is obviously wrong. It should have been:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/include" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
Ahh, thank you! I shall attempt that.
-----Original Message----- From: graph-tool [mailto:graph-tool-bounces@skewed.de] On Behalf Of Tiago de Paula Peixoto Sent: 08 March 2016 14:05 To: graph-tool@skewed.de Subject: Re: [graph-tool] Debian package and boost at compile-time
On 08.03.2016 15:03, Tiago de Paula Peixoto wrote:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/lib" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
I just noticed that your include path for boost is obviously wrong. It should have been:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/include" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
-- Tiago de Paula Peixoto tiago@skewed.de
It now runs without errors, but bizarrely I get the following (contradictory?) warning:
checking whether the Boost::Coroutine library is available... yes configure: WARNING: No usable boost::coroutine found! Some functionality will be disabled in the library.
Any thoughts why?
Best,
Philipp
-----Original Message----- From: graph-tool [mailto:graph-tool-bounces@skewed.de] On Behalf Of Tiago de Paula Peixoto Sent: 08 March 2016 14:05 To: graph-tool@skewed.de Subject: Re: [graph-tool] Debian package and boost at compile-time
On 08.03.2016 15:03, Tiago de Paula Peixoto wrote:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/lib" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
I just noticed that your include path for boost is obviously wrong. It should have been:
./configure CPPFLAGS="-I/home/pmj27/anaconda2/pkgs/py2cairo-1.10.0-py27_2/include/ -I/home/pmj27/software/boost1.60/include" LDFLAGS="-L/home/pmj27/software/boost1.60/lib" CXX="g++-5"
-- Tiago de Paula Peixoto tiago@skewed.de
On 08.03.2016 18:23, Philipp-Maximilian Jacob wrote:
It now runs without errors, but bizarrely I get the following (contradictory?) warning:
checking whether the Boost::Coroutine library is available... yes configure: WARNING: No usable boost::coroutine found! Some functionality will be disabled in the library.
Strange. Try passing the option --with-boost-coroutine=boost_coroutine to configure.
Thanks for this reply!
I had been struggling with this same issue for 2 days. But this was the solution:
passing the option --with-boost-coroutine=boost_coroutine
-- View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.