Build failed with gcc 8.3.0
When I manually build graph-tool 2.31 on CentOS 7, the make tool returns with an error:
In file included from partition_centroid/graph_partition_centroid_multiflip_mcmc.cc:25: partition_centroid/../loops/mcmc_loop.hh: In lambda function: partition_centroid/../loops/mcmc_loop.hh:84:42: error: lambda capture of ‘single_step’ is not a constant expression if constexpr (single_step)
The same error occurs in several files.
In fact, I guess it is something wrong about the GCC so I upgrade my GCC from 8.3.0 to 9.3.0 and the error has gone. So is that a bug of graph-tool or GCC 8.3.0?
This is my env info when error occoured:
================================================================================
CONFIGURATION SUMMARY
================================================================================
Using python version: 3.7.6
Python interpreter: /usr/local/bin/python3.7
Installation path: /usr/local/lib/python3.7/site-packages/graph_tool
C++ compiler (CXX): g++ -std=gnu++17
C++ compiler version: 8.3.0
Prefix: /usr/local
Pkgconfigdir: ${libdir}/pkgconfig
Python CPP flags: -I/usr/local/lib/python3.7/site-packages/cairo/include -I/usr/local/include/python3.7m
Python LD flags: -L/usr/local/lib -lpython3.7m
Boost CPP flags: -pthread -I/usr/local/boost/include
Boost LD flags: -L/usr/local/boost/lib -lboost_iostreams -lboost_python37 -lboost_regex -lboost_context -lboost_coroutine
Numpy CPP flags: -I/usr/local/lib/python3.7/site-packages/numpy/core/include
Sparsehash CPP flags:
CGAL CPP flags: -I/usr/include
CGAL LD flags:
Expat CPP flags: -I/usr/include
Expat LD flags: -L/usr/lib -lexpat
Cairomm CPP flags: -I/usr/include/cairomm-1.0 -I/usr/lib64/cairomm-1.0/include -I/usr/include/cairo -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/libdrm
Cairomm LD flags: -lcairomm-1.0 -lcairo -lsigc-2.0
OpenMP compiler flags: -fopenmp
OpenMP LD flags:
Extra CPPFLAGS: -DNDEBUG -I/usr/local/boost/include
Extra CXXFLAGS: -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -Wno-register
Extra LDFLAGS: -L/usr/local/boost/lib
Using OpenMP: yes
Using sparsehash: yes
Using cairo: yes
================================================================================