Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sagelib-10.4.beta6 FTBFS on conda (graphic_matroid) #38063

Closed
2 tasks done
bagasme opened this issue May 23, 2024 · 2 comments · Fixed by #38033
Closed
2 tasks done

sagelib-10.4.beta6 FTBFS on conda (graphic_matroid) #38063

bagasme opened this issue May 23, 2024 · 2 comments · Fixed by #38033

Comments

@bagasme
Copy link

bagasme commented May 23, 2024

Environment

- **OS**: Arch Linux
- **Sage Version**: 10.4.beta6

Steps To Reproduce

To reproduce:

  • Setup new conda environment (with Python 3.11):
$ ./bootstrap-conda
$ conda env create --file environment-optional-3.11.prod.yml --name sagemath
  • Set up environment variables and configure:
$ export CFLAGS="-O2 -march=haswell -mtune=haswell"
$ export CXXFLAGS="$CFLAGS"
$ export FCFLAGS="$CFLAGS"
$ export MAKE="make -j2"
$ ./bootstrap
$ ./configure --prefix=$CONDA_PREFIX --with-python=$CONDA_PREFIX/bin/python --enable-fricas=yes --with-system-eclib=no
  • Build:
$ make

Config log

config.log

Package logs

sagelib-10.4.beta6.log

Additional Information

I'm trying to build sage 10.4.beta6 on conda environment (using environment-optional-3.11.yml to create the env). The build erred out on sagelib-10.4.beta6 spkg (especially on sage.tests.stl_vector extension).

Error messages with compiler warnings:

[spkg-install]     building 'sage.tests.stl_vector' extension
[spkg-install]     /home/bagas/miniconda3/envs/sagemath/bin/x86_64-conda-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bagas/miniconda3/envs/sagemath/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -Isage/cpython -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/cysignals -I/home/bagas/repo/sagemath/src -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/numpy/core/include -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -c sage/tests/stl_vector.cpp -o build/temp.linux-x86_64-cpython-311/sage/tests/stl_vector.o
[spkg-install]     sage/tests/stl_vector.cpp: In function 'PyObject* __pyx_pf_4sage_5tests_10stl_vector_14stl_int_vector_4__getitem__(__pyx_obj_4sage_5tests_10stl_vector_stl_int_vector*, int)':
[spkg-install]     sage/tests/stl_vector.cpp:6870:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
[spkg-install]      6870 |       __pyx_t_1 = (__pyx_v_i < __pyx_v_self->data->size());
[spkg-install]           |                    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp: At global scope:
[spkg-install]     sage/tests/stl_vector.cpp:6493:18: warning: 'PyObject* __pyx_pw_4sage_7cpython_6string_3str_to_bytes(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      6493 | static PyObject *__pyx_pw_4sage_7cpython_6string_3str_to_bytes(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:6240:18: warning: 'PyObject* __pyx_pw_4sage_7cpython_6string_1bytes_to_str(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      6240 | static PyObject *__pyx_pw_4sage_7cpython_6string_1bytes_to_str(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:5888:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7richcmp_9revop(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      5888 | static PyObject *__pyx_pw_4sage_9structure_7richcmp_9revop(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:5712:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7richcmp_7rich_to_bool_sgn(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      5712 | static PyObject *__pyx_pw_4sage_9structure_7richcmp_7rich_to_bool_sgn(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:5534:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7richcmp_5rich_to_bool(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      5534 | static PyObject *__pyx_pw_4sage_9structure_7richcmp_5rich_to_bool(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:5291:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7richcmp_3richcmp_not_equal(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      5291 | static PyObject *__pyx_pw_4sage_9structure_7richcmp_3richcmp_not_equal(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:5019:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7richcmp_1richcmp(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      5019 | static PyObject *__pyx_pw_4sage_9structure_7richcmp_1richcmp(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:4756:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7element_3have_same_parent(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      4756 | static PyObject *__pyx_pw_4sage_9structure_7element_3have_same_parent(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     sage/tests/stl_vector.cpp:4338:18: warning: 'PyObject* __pyx_pw_4sage_9structure_7element_1parent(PyObject*, PyObject* const*, Py_ssize_t, PyObject*)' defined but not used [-Wunused-function]
[spkg-install]      4338 | static PyObject *__pyx_pw_4sage_9structure_7element_1parent(PyObject *__pyx_self,
[spkg-install]           |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[spkg-install]     /home/bagas/miniconda3/envs/sagemath/bin/x86_64-conda-linux-gnu-c++ -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/home/bagas/miniconda3/envs/sagemath/lib -Wl,-rpath-link,/home/bagas/miniconda3/envs/sagemath/lib -L/home/bagas/miniconda3/envs/sagemath/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/home/bagas/miniconda3/envs/sagemath/lib -Wl,-rpath-link,/home/bagas/miniconda3/envs/sagemath/lib -L/home/bagas/miniconda3/envs/sagemath/lib -Wl,-rpath-link,/home/bagas/miniconda3/envs/sagemath/lib -L/home/bagas/miniconda3/envs/sagemath/lib -Wl,-rpath,/home/bagas/miniconda3/envs/sagemath/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/bagas/miniconda3/envs/sagemath/lib -Wl,-rpath-link,/home/bagas/miniconda3/envs/sagemath/lib -L/home/bagas/miniconda3/envs/sagemath/lib -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bagas/miniconda3/envs/sagemath/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include build/temp.linux-x86_64-cpython-311/sage/tests/stl_vector.o -lgmp -o build/lib.linux-x86_64-cpython-311/sage/tests/stl_vector.cpython-311-x86_64-linux-gnu.so -lpari
[spkg-install]     error: command '/home/bagas/miniconda3/envs/sagemath/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1
[spkg-install]     error: subprocess-exited-with-error
[spkg-install]     
[spkg-install]     × python setup.py develop did not run successfully.
[spkg-install]     │ exit code: 1
[spkg-install]     ╰─> See above for output.
[spkg-install]     
[spkg-install]     note: This error originates from a subprocess, and is likely not a problem with pip.
[spkg-install]     full command: /home/bagas/miniconda3/envs/sagemath/bin/python3 -c '
[spkg-install]     exec(compile('"'"''"'"''"'"'
[spkg-install]     # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
[spkg-install]     #
[spkg-install]     # - It imports setuptools before invoking setup.py, to enable projects that directly
[spkg-install]     #   import from `distutils.core` to work with newer packaging standards.
[spkg-install]     # - It provides a clear error message when setuptools is not installed.
[spkg-install]     # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
[spkg-install]     #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
[spkg-install]     #     manifest_maker: standard file '"'"'-c'"'"' not found".
[spkg-install]     # - It generates a shim setup.py, for handling setup.cfg-only projects.
[spkg-install]     import os, sys, tokenize
[spkg-install]     
[spkg-install]     try:
[spkg-install]         import setuptools
[spkg-install]     except ImportError as error:
[spkg-install]         print(
[spkg-install]             "ERROR: Can not execute `setup.py` since setuptools is not available in "
[spkg-install]             "the build environment.",
[spkg-install]             file=sys.stderr,
[spkg-install]         )
[spkg-install]         sys.exit(1)
[spkg-install]     
[spkg-install]     __file__ = %r
[spkg-install]     sys.argv[0] = __file__
[spkg-install]     
[spkg-install]     if os.path.exists(__file__):
[spkg-install]         filename = __file__
[spkg-install]         with tokenize.open(__file__) as f:
[spkg-install]             setup_py_code = f.read()
[spkg-install]     else:
[spkg-install]         filename = "<auto-generated setuptools caller>"
[spkg-install]         setup_py_code = "from setuptools import setup; setup()"
[spkg-install]     
[spkg-install]     exec(compile(setup_py_code, filename, "exec"))
[spkg-install]     '"'"''"'"''"'"' % ('"'"'/home/bagas/repo/sagemath/src/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' --no-user-cfg develop --no-deps
[spkg-install]     cwd: /home/bagas/repo/sagemath/src/
[spkg-install] error: subprocess-exited-with-error
[spkg-install] 
[spkg-install] × python setup.py develop did not run successfully.
[spkg-install] │ exit code: 1
[spkg-install] ╰─> See above for output.
[spkg-install] 
[spkg-install] note: This error originates from a subprocess, and is likely not a problem with pip.
[spkg-install] *************************************************************************************
[spkg-install] Error installing sagelib-10.4.beta6
[spkg-install] *************************************************************************************

It looks like this is build regression (last time I build sage is 10.4.beta3), but then I recreated conda env before building (thus with newer conda packages).

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@bagasme bagasme changed the title sagelib-10.4.beta6 FTBFS on conda sagelib-10.4.beta6 FTBFS on conda (sage.tests.stl_vector) May 23, 2024
@mkoeppe
Copy link
Contributor

mkoeppe commented May 23, 2024

The actual error from the log file:

[spkg-install]     building 'sage.matroids.graphic_matroid' extension
[spkg-install]     /home/bagas/miniconda3/envs/sagemath/bin/x86_64-conda-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bagas/miniconda3/envs/sagemath/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -Isage/data_structures -Isage/cpython -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/cysignals -I/home/bagas/repo/sagemath/src -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/numpy/core/include -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -c sage/matroids/graphic_matroid.c -o build/temp.linux-x86_64-cpython-311/sage/matroids/graphic_matroid.o
[spkg-install]     sage/matroids/graphic_matroid.c: In function '__pyx_f_4sage_8matroids_15graphic_matroid_14GraphicMatroid__has_minor':
[spkg-install]     sage/matroids/graphic_matroid.c:23551:234: error: macro "minor" passed 3 arguments, but takes just 1

Fixed in:

@mkoeppe mkoeppe linked a pull request May 23, 2024 that will close this issue
5 tasks
@mkoeppe mkoeppe changed the title sagelib-10.4.beta6 FTBFS on conda (sage.tests.stl_vector) sagelib-10.4.beta6 FTBFS on conda (graphic_matroid) May 23, 2024
@bagasme
Copy link
Author

bagasme commented May 24, 2024

The actual error from the log file:

[spkg-install]     building 'sage.matroids.graphic_matroid' extension
[spkg-install]     /home/bagas/miniconda3/envs/sagemath/bin/x86_64-conda-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bagas/miniconda3/envs/sagemath/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bagas/miniconda3/envs/sagemath/include -fPIC -Isage/data_structures -Isage/cpython -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/cysignals -I/home/bagas/repo/sagemath/src -I/home/bagas/miniconda3/envs/sagemath/lib/python3.11/site-packages/numpy/core/include -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -I/home/bagas/miniconda3/envs/sagemath/include/python3.11 -c sage/matroids/graphic_matroid.c -o build/temp.linux-x86_64-cpython-311/sage/matroids/graphic_matroid.o
[spkg-install]     sage/matroids/graphic_matroid.c: In function '__pyx_f_4sage_8matroids_15graphic_matroid_14GraphicMatroid__has_minor':
[spkg-install]     sage/matroids/graphic_matroid.c:23551:234: error: macro "minor" passed 3 arguments, but takes just 1

Fixed in:

* [Avoid conflict with macro `minor` #38033](https://github.com/sagemath/sage/pull/38033)

#38033 fixed the issue for me.

@mkoeppe mkoeppe added this to the sage-10.4 milestone May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants