Package Details: python-graph-tool 2.80-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-12-31 10:04 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 .. 15 Next › Last »

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

johnabs commented on 2022-08-22 21:19 (UTC) (edited on 2022-08-23 03:00 (UTC) by johnabs)

Okay, I tried rebuilding without LTO (twice for good measure). Here's the configuration summary, the only thing I changed in the pkgbuild was line 24 and removed the following: -flto=auto -fno-fat-lto-objects.

One thing I noticed was that in the config summary the -DNDEBUG flag was enabled, but I didn't do this, and apparently this is an issue according to count0's initial comment on this issue.

count0, just to make sure, is your build system fully up-to-date, and did you clear your pacman cache before doing your latest test build with the most recent pkgbuild file on the aur? I just want to make sure we can rule out everything that could by different and causing such an issue, as at this stage, I've done everything I can think of to isolate the issue and with no success, I'm guessing due to the fact that I am not an expert on C++.

If there is any other information I can provide, please let me know. According to npfeiler, apparently this issue is reproducible, though the fix he suggested didn't work for me (unless I failed to implement it properly).

================================================================================
                             CONFIGURATION SUMMARY
================================================================================
Using python version:   3.10.6
Python interpreter:     /usr/bin/python
Installation path:      /usr/lib/python3.10/site-packages/graph_tool

C++ compiler (CXX):     g++
C++ compiler version:   12.2.0

Prefix:                 /usr
Pkgconfigdir:           ${libdir}/pkgconfig

Python CPP flags:       -I/usr/lib/python3.10/site-packages/cairo/include -I/usr/include/python3.10
Python LD flags:        -L/usr/lib -lpython3.10
Boost CPP flags:        -pthread -I/usr/include
Boost LD flags:         -L/usr/lib64 -lboost_iostreams -lboost_python310 -lboost_regex -lboost_context -lboost_coroutine
Numpy CPP flags:        -I/usr/lib/python3.10/site-packages/numpy/core/include
Sparsehash CPP flags:
CGAL CPP flags:         -I/usr/include
CGAL LD flags:
Expat CPP flags:
Expat LD flags:          -lexpat
Cairomm CPP flags:      -I/usr/include/cairomm-1.0 -I/usr/lib/cairomm-1.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/pixman-1
Cairomm LD flags:       -lcairomm-1.0 -lsigc-2.0 -lcairo
OpenMP compiler flags:  -fopenmp
OpenMP LD flags:
Extra CPPFLAGS:         -DNDEBUG
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
Extra LDFLAGS:

Using OpenMP:           yes
Using sparsehash:       yes
Using cairo:            yes
================================================================================

johnabs commented on 2022-08-22 16:51 (UTC) (edited on 2022-08-22 16:54 (UTC) by johnabs)

Just a heads up; I fully updated arch, reinstalled graph tool and tried again, and I'm still getting the same error :/

Edit: Thanks npfeiler, I misread can as can't. I'll try disabling LTO and rebuilding, and I'll let you know what I get. Could you let me know what changes you made to the pkgbuild to disable it? Is it just -flto=false?

npfeiler commented on 2022-08-22 02:35 (UTC)

i can repro the issue

it doesn’t seem to happen with LTO disabled 🙈

johnabs commented on 2022-08-19 19:44 (UTC) (edited on 2022-08-19 19:47 (UTC) by johnabs)

I didn't change anything, I just rebuilt it after closing everything on my machine to free up enough RAM for LTO compilation.

In fact, here's a copy of the pkgbuild from my aur-helper cache, if that helps:

Also, just as a heads up, I fully deleted and reinstalled the package before rebuilding, but I can always try again after updating my whole system if you think it would help?

# Maintainer: Tiago de Paula Peixoto <tiago@skewed.de>

# Remove the --enable-openmp flag below if you do not want parallelization.

pkgname=python-graph-tool
pkgver=2.45
pkgrel=1
pkgdesc='A Python module for manipulation and statistical analysis of graphs'
arch=('i686' 'x86_64')
url='https://graph-tool.skewed.de'
license=(LGPL3)
depends=(boost-libs python expat python-scipy python-numpy cgal cairomm python-cairo python-zstandard python-gobject)
makedepends=(boost sparsehash autoconf-archive)
optdepends=('graphviz: graph layout'
'python-matplotlib: graph drawing')
provides=(python3-graph-tool)
conflicts=(python3-graph-tool)
replaces=(python3-graph-tool)
options=(!libtool)
source=("https://downloads.skewed.de/graph-tool/graph-tool-$pkgver.tar.bz2")
sha256sums=('f92da7accfda02b29791efe4f0b3ed93329f27232af4d3afc07c92421ec68668')
prepare() {
  cd "$srcdir/graph-tool-$pkgver"
  export CXXFLAGS="$CXXFLAGS -flto=auto -fno-fat-lto-objects"
  ./configure --enable-openmp --prefix=/usr --docdir="/usr/share/doc/$pkgname"
}

build() {
  cd "$srcdir/graph-tool-$pkgver"
  make -j 1  # most users will be surprised with the high memory usage required for parallel builds
}

check() {
  cd "$srcdir/graph-tool-$pkgver"
  make check
}

package() {
  cd "$srcdir/graph-tool-$pkgver"
  make DESTDIR="$pkgdir/" install
}

count0 commented on 2022-08-19 15:14 (UTC)

I cannot reproduce any of these errors, including the import issues — and it's entirely unclear how it could be throwing assertions in the first place without debugging being enabled during compilation, which is not by default.

Did you change anything in the PKGBUILD?