igraph / python-igraph

Python interface for igraph
GNU General Public License v2.0
1.28k stars 247 forks source link

compile fails with setuptools>=72.2.0 (manylinux2010) #794

Open chargr opened 2 weeks ago

chargr commented 2 weeks ago

Describe the bug Not sure if this should be considered a setuptools issue.

Compile completes successfully using setuptools 72.1.0

Compile fails with this error on 72.2.0

  g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -pthread -shared build/temp.linux-x86_64-cpython-39/src/_igraph/arpackobject.o build/temp.linux-x86_64-cpython-39/src/_igraph/attributes.o build/temp.linux-x86_64-cpython-39/src/_igraph/bfsiter.o build/temp.linux-x86_64-cpython-39/src/_igraph/common.o build/temp.linux-x86_64-cpython-39/src/_igraph/convert.o build/temp.linux-x86_64-cpython-39/src/_igraph/dfsiter.o build/temp.linux-x86_64-cpython-39/src/_igraph/edgeobject.o build/temp.linux-x86_64-cpython-39/src/_igraph/edgeseqobject.o build/temp.linux-x86_64-cpython-39/src/_igraph/error.o build/temp.linux-x86_64-cpython-39/src/_igraph/filehandle.o build/temp.linux-x86_64-cpython-39/src/_igraph/force_cpp_linker.o build/temp.linux-x86_64-cpython-39/src/_igraph/graphobject.o build/temp.linux-x86_64-cpython-39/src/_igraph/igraphmodule.o build/temp.linux-x86_64-cpython-39/src/_igraph/indexing.o build/temp.linux-x86_64-cpython-39/src/_igraph/operators.o build/temp.linux-x86_64-cpython-39/src/_igraph/pyhelpers.o build/temp.linux-x86_64-cpython-39/src/_igraph/random.o build/temp.linux-x86_64-cpython-39/src/_igraph/utils.o build/temp.linux-x86_64-cpython-39/src/_igraph/vertexobject.o build/temp.linux-x86_64-cpython-39/src/_igraph/vertexseqobject.o vendor/install/igraph/lib64/libigraph.a -Lvendor/install/igraph/lib64 -L/usr/local/lib64 -L/usr/local/lib -L/usr/lib64 -L/usr/lib -L/lib64 -L/lib -lm -lgomp -lpthread -o build/lib.linux-x86_64-cpython-39/igraph/_igraph.abi3.so
  lto1: internal compiler error: in dwarf2out_finish, at dwarf2out.c:31176
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <http://bugzilla.redhat.com/bugzilla> for instructions.
  lto-wrapper: fatal error: /opt/rh/devtoolset-8/root/usr/bin/g++ returned 1 exit status
  compilation terminated.
  /opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: error: lto-wrapper failed
  collect2: error: ld returned 1 exit status
  error: command '/opt/rh/devtoolset-8/root/usr/bin/g++' failed with exit code 1
  error: subprocess-exited-with-error

  × Building wheel for igraph (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

To reproduce using pypa manylinux_2010 image works under manylinux_2014 image.

failure (latest setuptools >= 72.2.0)

[root@a9039e2356a2 /]# /tmp/test-igraph/bin/pip install igraph

success (last working setuptools)

[root@a9039e2356a2 /]# echo "setuptools==72.1.0" > constraints.txt
[root@a9039e2356a2 /]# PIP_CONSTRAINT=constraints.txt /tmp/test-igraph/bin/pip install igraph

Version information 0.11.6

ntamas commented 2 weeks ago

Seems like a gcc bug to me (after all, the compiler seems to crash: internal compiler error: in dwarf2out_finish, at dwarf2out.c:31176). Setuptools might have triggered the bug by changing some compiler flags between 72.1.0 and 72.2.0 but is probably not the root cause of the issue. Diffing the full command line that setuptools uses to invoke gcc in the failing step might give some clues about what goes wrong.