installation: make fails at graph_blockmodel_overlap.hh
Hi, I have been trying to install graph-tool on a Debian server which I don't have root access for for a day now, and after some of trouble I was able to run configure but now make fails with the following: CXX graph_blockmodel.lo In file included from graph_blockmodel.cc:39:0: graph_blockmodel_overlap.hh: In lambda function: graph_blockmodel_overlap.hh:900:50: error: no match for ‘operator[]’ in ‘((graph_tool::overlap_partition_stats_t*)this)->graph_tool::overlap_partition_stats_t::_embhist[bv_i]’ graph_blockmodel_overlap.hh:900:50: note: candidates are: In file included from /usr/include/c++/4.7/bits/hashtable.h:36:0, from /usr/include/c++/4.7/unordered_set:45, from ./../graph_properties.hh:24, from ./../graph.hh:35, from ./../graph_filtering.hh:21, from graph_blockmodel.cc:28: /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type& std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::operator[](const _Key&) [with _Key = std::vector<int>; _Pair = std::pair<const std::vector<int>, std::vector<long unsigned int> >; _Hashtable = std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true>; std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type = std::vector<long unsigned int>] <near match> /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: no known conversion for implicit ‘this’ parameter from ‘const ebhist_t* {aka const std::unordered_map<std::vector<int>, std::vector<long unsigned int> >*}’ to ‘std::__detail::_Map_base<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, true, std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true> >*’ This goes on for several lines. Am I using the wrong compiler? My gcc version is 4.7.2. I read the INSTALL file and I can't find the solution. I disabled cairo and sparsehash. Do you have any idea why I'm getting these errors? Thanks, Judit Ács
On 01.10.2014 16:22, Ács Judit wrote:
Hi,
I have been trying to install graph-tool on a Debian server which I don't have root access for for a day now, and after some of trouble I was able to run configure but now make fails with the following:
CXX graph_blockmodel.lo In file included from graph_blockmodel.cc:39:0: graph_blockmodel_overlap.hh: In lambda function: graph_blockmodel_overlap.hh:900:50: error: no match for ‘operator[]’ in ‘((graph_tool::overlap_partition_stats_t*)this)->graph_tool::overlap_partition_stats_t::_embhist[bv_i]’ graph_blockmodel_overlap.hh:900:50: note: candidates are: In file included from /usr/include/c++/4.7/bits/hashtable.h:36:0, from /usr/include/c++/4.7/unordered_set:45, from ./../graph_properties.hh:24, from ./../graph.hh:35, from ./../graph_filtering.hh:21, from graph_blockmodel.cc:28: /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type& std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::operator[](const _Key&) [with _Key = std::vector<int>; _Pair = std::pair<const std::vector<int>, std::vector<long unsigned int> >; _Hashtable = std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true>; std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type = std::vector<long unsigned int>] <near match> /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: no known conversion for implicit ‘this’ parameter from ‘const ebhist_t* {aka const std::unordered_map<std::vector<int>, std::vector<long unsigned int> >*}’ to ‘std::__detail::_Map_base<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, true, std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true> >*’
This goes on for several lines. Am I using the wrong compiler? My gcc version is 4.7.2. I read the INSTALL file and I can't find the solution.
I disabled cairo and sparsehash.
Do you have any idea why I'm getting these errors?
I cannot reproduce this on any Debian system I have access to, but the oldest GCC I'm using is version 4.8. I suspect this issue is due to an old compiler, since graph-tool requires good C++11 support. Unfortunately, without the rest of the error message I cannot evaluate whether or not this is really a problem with the compiler. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
I put the full output of configure and make here. Configure stdout: http://pastebin.com/AMJYwkxB make stdout: http://pastebin.com/m2wt4F5q make stderr: http://pastebin.com/nh2nvneQ I hope this helps. Meanwhile I'll ask around why we have such an old version of gcc. On Wed, Oct 1, 2014 at 4:22 PM, Ács Judit <judit@sch.bme.hu> wrote:
Hi,
I have been trying to install graph-tool on a Debian server which I don't have root access for for a day now, and after some of trouble I was able to run configure but now make fails with the following:
CXX graph_blockmodel.lo In file included from graph_blockmodel.cc:39:0: graph_blockmodel_overlap.hh: In lambda function: graph_blockmodel_overlap.hh:900:50: error: no match for ‘operator[]’ in ‘((graph_tool::overlap_partition_stats_t*)this)->graph_tool::overlap_partition_stats_t::_embhist[bv_i]’ graph_blockmodel_overlap.hh:900:50: note: candidates are: In file included from /usr/include/c++/4.7/bits/hashtable.h:36:0, from /usr/include/c++/4.7/unordered_set:45, from ./../graph_properties.hh:24, from ./../graph.hh:35, from ./../graph_filtering.hh:21, from graph_blockmodel.cc:28: /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type& std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::operator[](const _Key&) [with _Key = std::vector<int>; _Pair = std::pair<const std::vector<int>, std::vector<long unsigned int> >; _Hashtable = std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true>; std::__detail::_Map_base<_Key, _Pair, std::_Select1st<_Pair>, true, _Hashtable>::mapped_type = std::vector<long unsigned int>] <near match> /usr/include/c++/4.7/bits/hashtable_policy.h:435:5: note: no known conversion for implicit ‘this’ parameter from ‘const ebhist_t* {aka const std::unordered_map<std::vector<int>, std::vector<long unsigned int> >*}’ to ‘std::__detail::_Map_base<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, true, std::_Hashtable<std::vector<int>, std::pair<const std::vector<int>, std::vector<long unsigned int> >, std::allocator<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::_Select1st<std::pair<const std::vector<int>, std::vector<long unsigned int> > >, std::equal_to<std::vector<int> >, std::hash<std::vector<int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, true, false, true> >*’
This goes on for several lines. Am I using the wrong compiler? My gcc version is 4.7.2. I read the INSTALL file and I can't find the solution.
I disabled cairo and sparsehash.
Do you have any idea why I'm getting these errors?
Thanks, Judit Ács
On 02.10.2014 10:12, Ács Judit wrote:
I put the full output of configure and make here. Configure stdout: http://pastebin.com/AMJYwkxB make stdout: http://pastebin.com/m2wt4F5q make stderr: http://pastebin.com/nh2nvneQ
I hope this helps. Meanwhile I'll ask around why we have such an old version of gcc.
Taking a look at the full error message, and inspecting the portion of the code which causes it, it seems indeed that the compiler is getting confused with rvalue references and move semantics (a c++11 feature). This is triggered internally in the STL, so it is not even something that I can work around in the code (which seems perfectly valid, and compiles just fine in newer GCC and Clang compilers). In view of this I'll update the minimum requirements to GCC 4.8 in the website. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Unfortunately the stable Debian version still comes with gcc4.7, see here: https://packages.debian.org/wheezy/gcc On Thu, Oct 2, 2014 at 11:06 AM, Tiago de Paula Peixoto <tiago@skewed.de> wrote:
On 02.10.2014 10:12, Ács Judit wrote:
I put the full output of configure and make here. Configure stdout: http://pastebin.com/AMJYwkxB make stdout: http://pastebin.com/m2wt4F5q make stderr: http://pastebin.com/nh2nvneQ
I hope this helps. Meanwhile I'll ask around why we have such an old version of gcc.
Taking a look at the full error message, and inspecting the portion of the code which causes it, it seems indeed that the compiler is getting confused with rvalue references and move semantics (a c++11 feature). This is triggered internally in the STL, so it is not even something that I can work around in the code (which seems perfectly valid, and compiles just fine in newer GCC and Clang compilers).
In view of this I'll update the minimum requirements to GCC 4.8 in the website.
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.10.2014 11:35, Ács Judit wrote:
Unfortunately the stable Debian version still comes with gcc4.7, see here: https://packages.debian.org/wheezy/gcc
Yes, but there is very little I can do. Dropping c++11 is not possible. It is a pity that debian stable is so outdated. You can also ask your sysadmin to pull gcc 4.8 from testing. A possible workaround for you is to attempt to use sparsehash, since it will avoid using the code with unordered_map the compiler is failing on. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
I wanted to try graph-tool on my laptop before asking the sysadmin to install a newer gcc. I'm using Linux Mint with gcc4.8.2. There were two problems: I installed both libsparsehash-dev and sparsehash from the official ubuntu repos but configure still can't find it. I could sidestep this by disabling sparsehash. The more important problem is that make runs out of memory. I have 4GB RAM + 2GB swap in my laptop. It's killed while compiling this: Making all in community make[4]: Entering directory `/home/judit/bin/graph-tool-2.2.35/src/graph/community' CXX graph_community_network_eavg_imp1.lo Is graph-tool intended for stronger machines? Thank you, Judit On Thu, Oct 2, 2014 at 11:54 AM, Tiago de Paula Peixoto <tiago@skewed.de> wrote:
On 02.10.2014 11:35, Ács Judit wrote:
Unfortunately the stable Debian version still comes with gcc4.7, see here: https://packages.debian.org/wheezy/gcc
Yes, but there is very little I can do. Dropping c++11 is not possible. It is a pity that debian stable is so outdated.
You can also ask your sysadmin to pull gcc 4.8 from testing.
A possible workaround for you is to attempt to use sparsehash, since it will avoid using the code with unordered_map the compiler is failing on.
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.10.2014 16:01, Ács Judit wrote:
I wanted to try graph-tool on my laptop before asking the sysadmin to install a newer gcc. I'm using Linux Mint with gcc4.8.2.
There were two problems: I installed both libsparsehash-dev and sparsehash from the official ubuntu repos but configure still can't find it. I could sidestep this by disabling sparsehash.
Take a look at config.log to see why it is failing. In some versions of ubuntu/debian, you need to pass the following option to configure: --with-sparsehash-prefix=google
The more important problem is that make runs out of memory. I have 4GB RAM + 2GB swap in my laptop.
You need slightly more than 4GB to compile graph-tool, unfortunately. If you have around 6GB with swap, make sure there is nothing else consuming much memory, and that the compilation is not being done in parallel (i.e. do not use make -j2 or similar). If you still cannot compile it, you can try using the clang compiler. It is also available for ubuntu, and it should use only about half as much ram. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
On Thu, Oct 2, 2014 at 4:16 PM, Tiago de Paula Peixoto <tiago@skewed.de> wrote:
On 02.10.2014 16:01, Ács Judit wrote:
I wanted to try graph-tool on my laptop before asking the sysadmin to install a newer gcc. I'm using Linux Mint with gcc4.8.2.
There were two problems: I installed both libsparsehash-dev and sparsehash from the official ubuntu repos but configure still can't find it. I could sidestep this by disabling sparsehash.
Take a look at config.log to see why it is failing. In some versions of ubuntu/debian, you need to pass the following option to configure:
--with-sparsehash-prefix=google
Thank you, this solve the sparsehash issue. I also tried it on the server but the old gcc still fails.
The more important problem is that make runs out of memory. I have 4GB RAM + 2GB swap in my laptop.
You need slightly more than 4GB to compile graph-tool, unfortunately. If you have around 6GB with swap, make sure there is nothing else consuming much memory, and that the compilation is not being done in parallel (i.e. do not use make -j2 or similar).
If you still cannot compile it, you can try using the clang compiler. It is also available for ubuntu, and it should use only about half as much ram.
I'll try this tonight. Best, Judit
You need slightly more than 4GB to compile graph-tool, unfortunately. If
you have around 6GB with swap, make sure there is nothing else consuming
much memory, and that the compilation is not being done in parallel (i.e. do not use make -j2 or similar).
If you still cannot compile it, you can try using the clang compiler. It is also available for ubuntu, and it should use only about half as much ram.
I'll try this tonight.
It worked with nothing else memory-consuming running. gcc 4.8.2 ~3.5GB free memory, 2GB swap Meanwhile the sysadmin installed the Debian package found in your repo, but its name was graph-tool, not python-graph-tool. Thank you again for your help, Judit
On 03.10.2014 10:44, Ács Judit wrote:
Meanwhile the sysadmin installed the Debian package found in your repo, but its name was graph-tool, not python-graph-tool.
Be careful, this is a *very old* version of graph-tool! All newer versions are called python-graph-tool. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Tiago de Paula Peixoto -
Ács Judit