Package Details: python-graph-tool 2.59-2

Git Clone URL: https://aur.archlinux.org/python-graph-tool.git (read-only, click to copy)
Package Base: python-graph-tool
Description: A Python module for manipulation and statistical analysis of graphs
Upstream URL: https://graph-tool.skewed.de
Keywords: graphs networks science
Licenses: LGPL3
Conflicts: python3-graph-tool
Provides: python3-graph-tool
Replaces: python3-graph-tool
Submitter: muellner
Maintainer: count0
Last Packager: count0
Votes: 29
Popularity: 0.000000
First Submitted: 2013-11-24 19:22 (UTC)
Last Updated: 2024-01-05 18:21 (UTC)

Latest Comments

1 2 3 4 5 6 .. 15 Next › Last »

aeden commented on 2023-09-13 04:21 (UTC)

I got past the compiler error by adding

#include <boost/regex/pending/unicode_iterator.hpp>

to src/graph/gml.hh, directly after #include <boost/spirit/include/support_istream_iterator.hpp>

Someone needs to file a bug report upstream.

aeden commented on 2023-09-13 02:59 (UTC) (edited on 2023-09-13 03:00 (UTC) by aeden)

Could not make package. Compiler errors:

In file included from src/graph/graph_io.cc:40:
src/graph/gml.hh: In function 'bool graph_tool::read_gml(std::istream&, Graph&, boost::dynamic_properties&, const std::unordered_set<std::__cxx11::basic_string<char> >&, const std::unordered_set<std::__cxx11::basic_string<char> >&, const std::unordered_set<std::__cxx11::basic_string<char> >&)':
src/graph/gml.hh:367:5: error: 'u8_to_u32_iterator' was not declared in this scope
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |     ^~~~~~~~~~~~~~~~~~
src/graph/gml.hh:367:48: error: expected primary-expression before '>' token
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |                                                ^
src/graph/gml.hh:367:50: error: there are no arguments to 'tbegin' that depend on a template parameter, so a declaration of 'tbegin' must be available [-fpermissive]
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |                                                  ^~~~~~
src/graph/gml.hh:367:50: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
src/graph/gml.hh:367:65: error: there are no arguments to 'tend' that depend on a template parameter, so a declaration of 'tend' must be available [-fpermissive]
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |                                                                 ^~~~
src/graph/gml.hh:370:23: error: 'tbegin' was not declared in this scope; did you mean 'begin'?
  370 |         parse_grammar(tbegin, tend, g, dp,
      |                       ^~~~~~
      |                       begin
src/graph/gml.hh:370:31: error: 'tend' was not declared in this scope; did you mean 'end'?
  370 |         parse_grammar(tbegin, tend, g, dp,
      |                               ^~~~
      |                               end
src/graph/gml.hh: In instantiation of 'bool graph_tool::read_gml(std::istream&, Graph&, boost::dynamic_properties&, const std::unordered_set<std::__cxx11::basic_string<char> >&, const std::unordered_set<std::__cxx11::basic_string<char> >&, const std::unordered_set<std::__cxx11::basic_string<char> >&) [with Graph = boost::adj_list<long unsigned int>; std::istream = std::basic_istream<char>]':
src/graph/graph_io.cc:341:33:   required from here
src/graph/gml.hh:367:56: error: 'tbegin' was not declared in this scope; did you mean 'begin'?
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |                                                  ~~~~~~^~~~~~~
      |                                                  begin
src/graph/gml.hh:367:69: error: 'tend' was not declared in this scope; did you mean 'end'?
  367 |     u8_to_u32_iterator<spirit::istream_iterator> tbegin(begin), tend(end);
      |                                                                 ~~~~^~~~~
      |                                                                 end
make[1]: *** [Makefile:3908: src/graph/graph_io.lo] Error 1

count0 commented on 2022-12-09 13:51 (UTC)

I've incorporated your suggestion, which indeed is enough to prevent the runtime errors.

I've investigated further and found the source of the problem. It's entirely innocuous, and the vector access in question would be completely optimized away if it weren't for the assert itself. 🤦

I've fixed it upstream, but I will keep this fix here, since I don't understand why asserts should be turned on by default in production code. The assert that fails here is evoked in every vector access!!! I'm glad the user got an error instead of a super slow code... Otherwise this performance regression would have passed unnoticed.

lahwaacz commented on 2022-12-09 07:05 (UTC)

@count0 OK, I've got it. In that case, I propose the following which removes the one flag from default /etc/makepkg.conf which triggers the assertions:

# disable assertions which lead to runtime failures
CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS/}
export CXXFLAGS="$CXXFLAGS -flto=auto -fno-fat-lto-objects"

Those assertion errors still indicate an error, though. Some code in graph-tool or boost-python or something is most likely abusing the STL. Has anyone reported the issue?

jg-you commented on 2022-12-09 02:29 (UTC)

@count0 Thanks for the patch; I just successfully rebuilt from the AUR and do not get STL assertion errors anymore.

count0 commented on 2022-12-08 22:45 (UTC)

@lahwaacz Building the package is not the issue — the problem here are the arbitrary assertion errors that come from within STL code. Take a look at the example from @johnabs below. Are you able to reproduce this error?

lahwaacz commented on 2022-12-08 20:02 (UTC)

@count0: Your change completely disregards all CXXFLAGS set in /etc/makepkg.conf which goes against the Arch package guidelines. Can you explain the "pollution" and which flags actually make the build fail?

FWIW, I just successfully built the package before the last change (using a clean chroot), which resulted in these flags being used:

Extra CXXFLAGS:         -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -fno-fat-lto-objects

count0 commented on 2022-12-08 18:37 (UTC)

The problems below are due to the pollution of CXXFLAGS with some unnecessary and destructive flags. I've pushed a new version of the package the prevents this from happening. Please test!

jg-you commented on 2022-12-08 18:15 (UTC)

Confirming that I am getting the same assertion failure as @johnabs and @chmue with the AUR version and that a git build works.

chmue commented on 2022-10-18 12:21 (UTC) (edited on 2022-10-18 12:24 (UTC) by chmue)

I tried building this package and ran into the same issues as @johnabs: The compilation would finish without errors but when I run the block model test code from below, it would give the same assertion error. I also tried removing the LTO CXXFLAGS as suggested here and reran makepkg but the error with the block model code was still there.

I proceeded to build the package directly from git (without makepkg):

git clone https://git.skewed.de/count0/graph-tool.git
cd graph-tool
./autogen.sh
./configure
make
make DESTDIR="~/.local/" install

The block model works after this!

YMMV (and you want to adjust DESTDIR) but I got it to work like this. The "issue" might stem from additional CXXFLAGS which are added by makepkg to make the executable more stable and safer to use so building directly from git does not "solve" the problem. I hope it helps if you desperately need to get the package to work (like me) and maybe as a hint to look into CXXFLAGS as the root of the issue.

Config snippet with flags:

Extra CXXFLAGS:         -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -g -O2