Closed mkoeppe closed 2 years ago
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: /usr/local
weird.
I'd have tried updating zeromq to the latest version, 4.3.4.
Replying to @dimpase:
I'd have tried updating zeromq to the latest version, 4.3.4.
It didn't work for me. I tried also to use pyzmq-22.3.0; it fails to download https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.zip and stops (downloading directly works)
Compiling pyzmq outside Sage gives no error; maybe some local variable? Is is possible to use system package?
I think the attempted configuration with setup.cfg
does not work at all. This was masked so far by SAGE_VENV and SAGE_LOCAL being the same, which has changed.
This is another case where the locations discovered by the configure tests in spkg-configure.m4
are not passed on
Sorry, but the error happens in the minimal build, spkg-configure.m4 is not involved, right?
You are right, it isn't; I should have written "this is also another case..."
Is there a temptative solution to test?
Replying to @mkoeppe:
I think the attempted configuration with
setup.cfg
does not work at all. This was masked so far by SAGE_VENV and SAGE_LOCAL being the same, which has changed.This is another case where the locations discovered by the configure tests in
spkg-configure.m4
are not passed on
Dirty trick to test the other changes in Fedora 35:
sage -pip install pyzmq==22.0.3
and comment out the install line in spkg-install.in
. In other installation I did the same thing with the last version of pyzmq.
I am running tests now.
I finished two compilations in Fedora 35, in both cases using a package of cysignals from https://github.com/enriqueartal/cysignals/commit/b404fbef69ddd5cfd0085ab15885e9f0315f9471 which is actually https://github.com/kliem/cysignals/tree/fix_non_constant_MINSIGSTKSZ up to a right parenthesis and installing pymzq as in comment:10.
One compilation is for 9.4. The test gave the following failures:
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/schemes/elliptic_curves/ell_rational_field.py # 9 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/doctest/test.py # 7 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/symbolic/integration/integral.py # 1 doctest failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/rings/polynomial/polynomial_zmod_flint.pyx # Timed out
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/tests/cmdline.py # 2 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/modular/abvar/abvar.py # 1 doctest failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/rings/polynomial/multi_polynomial_ideal.py # 2 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/modular/hecke/submodule.py # 1 doctest failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/lfunctions/sympow.py # 13 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/schemes/elliptic_curves/lseries_ell.py # 3 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/lfunctions/pari.py # 1 doctest failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/libs/giac/__init__.py # 13 doctests failed
sage -t --long --warn-long 212.7 --random-seed=0 src/sage/lfunctions/lcalc.py # 2 doctests failed
Some of them seem to be harmless (right permissions), other ones may reflect some problems between giac and cysignals.
The second one is for the branch https://github.com/sagemath/sage-prod/issues/30766 merged with develop, with the above cysignals and pyzmq and also gmpy2-2.1.0rc1. Besides the errors below, I did not find jupyter in $SAGE_ROOT/local/share
but in $SAGE_ROOT/local/var/lib/sage/venv-python3.10/share
:
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/schemes/elliptic_curves/ell_rational_field.py # 9 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/rings/polynomial/polynomial_zmod_flint.pyx # Timed out
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/schemes/elliptic_curves/isogeny_small_degree.py # Timed out
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/rings/function_field/function_field.py # Timed out
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/doctest/test.py # 25 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/tests/cmdline.py # 4 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/misc/sageinspect.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/dynamics/arithmetic_dynamics/projective_ds.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/schemes/riemann_surfaces/riemann_surface.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/modular/abvar/abvar.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/rings/polynomial/multi_polynomial_ideal.py # 2 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/modular/hecke/submodule.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/lfunctions/sympow.py # 13 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/schemes/elliptic_curves/lseries_ell.py # 3 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/plot/colors.py # 5 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage_docbuild/utils.py # 2 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/lfunctions/pari.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/libs/giac/__init__.py # 13 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/structure/unique_representation.py # 1 doctest failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/lfunctions/lcalc.py # 2 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/modular/modform/numerical.py # 3 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/symbolic/callable.py # 5 doctests failed
sage -t --long --random-seed=212072384500939741616547276375662149298 src/sage/cpython/atexit.pyx # 6 doctests failed
I think the above would be better to discuss in #30767. Let's please keep this ticket focused on the pyzmq build failures.
It looks like pyzmq
is incompatible with our use of SETUPTOOLS_USE_DISTUTILS=local
.
Replying to @mkoeppe:
I think the above would be better to discuss in #30767. Let's please keep this ticket focused on the pyzmq build failures.
OK, sorry for the noise (#32576 is also involved)
Replying to @mkoeppe:
It looks like
pyzmq
is incompatible with our use ofSETUPTOOLS_USE_DISTUTILS=local
.
The recent setuptools
versions vendor a version of distutils that has a bug described in https://github.com/pypa/distutils/issues/64
Branch: u/mkoeppe/pyzmq__build_errors
Commit: 89e1dea
Author: Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. New commits:
129d0fb | build/pkgs/pyzmq/spkg-install.in: Fix up |
Branch pushed to git repo; I updated commit sha1. New commits:
a8fe9da | build/pkgs/zeromq/patches/getrandom.patch: Remove |
In my case it worked with one more change; in spkg-install.in
for pyzmq
, replace $SAGE_LOCAL
by $SAGE_VENV
(I use python3.10).
Replying to @enriqueartal:
In my case it worked with one more change; in
spkg-install.in
forpyzmq
, replace$SAGE_LOCAL
by$SAGE_VENV
(I use python3.10).
This change doesn't make sense -- zeromq
is not installed in SAGE_VENV
.
Can you show me the log of a failure without that change?
Do you mean zeromq
or pyzmq
. FOR zeromq
it used the system package. If it helps as I said in comment:11 jupyter is located also in $SAGE_VENV/share
.
Find below the log
Using cached file /usr/local/sage-310/upstream/pyzmq-22.3.0.tar.gz
pyzmq-22.3.0
====================================================
Setting up build directory for pyzmq-22.3.0
Finished extraction
No patch files found in ../patches
****************************************************
Host system:
Linux singular 5.14.16-301.fc35.x86_64 #1 SMP Wed Nov 3 13:55:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)
****************************************************
Package 'pyzmq' is currently not installed
No legacy uninstaller found for 'pyzmq'; nothing to do
Installing pyzmq-22.3.0
Processing /usr/local/sage-310/local/var/lib/sage/venv-python3.10/var/tmp/sage/build/pyzmq-22.3.0/src
Preparing wheel metadata: started
Running command /usr/local/sage-310/local/var/lib/sage/venv-python3.10/bin/python3 /usr/local/sage-310/local/var/lib/sage/venv-python3.10/lib64/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpy23ywl50
running dist_info
creating /tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info
writing /tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info/dependency_links.txt
writing requirements to /tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-2ffuf65k/pyzmq.egg-info/SOURCES.txt'
running configure
{'libraries': ['zmq'], 'include_dirs': ['/usr/local/sage-310/local/include'], 'library_dirs': ['/usr/local/sage-310/local/lib'], 'runtime_library_dirs': ['/usr/local/sage-310/local/lib'], 'extra_link_args': []}
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -g -O2 -fPIC -I/usr/local/sage-310/local/include -c build/temp.linux-x86_64-3.10/scratch/check_sys_un.c -o build/temp.linux-x86_64-3.10/scratch/check_sys_un.o
gcc build/temp.linux-x86_64-3.10/scratch/check_sys_un.o -L/usr/local/sage-310/local/lib -Wl,--enable-new-dtags,-R/usr/local/sage-310/local/lib -o build/temp.linux-x86_64-3.10/scratch/check_sys_un
Configure: Autodetecting ZMQ settings...
Custom ZMQ dir: /usr/local/sage-310/local
Checking for timer_create
** Errors about missing timer_create are a normal part of this process **
************************************************
creating build/temp.linux-x86_64-3.10/scratch/tmp
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -g -O2 -fPIC -c /tmp/timer_createhby4x8bf.c -o build/temp.linux-x86_64-3.10/scratch/tmp/timer_createhby4x8bf.o
/tmp/timer_createhby4x8bf.c: In function 'main':
/tmp/timer_createhby4x8bf.c:2:5: warning: implicit declaration of function 'timer_create' [-Wimplicit-function-declaration]
2 | timer_create();
| ^~~~~~~~~~~~
gcc build/temp.linux-x86_64-3.10/scratch/tmp/timer_createhby4x8bf.o -o build/temp.linux-x86_64-3.10/scratch/a.out
error: [Errno 2] No such file or directory: 'a.out'
Fatal: Falling back on bundled libzmq, but config has explicitly prohibited building the libzmq extension.
Preparing wheel metadata: finished with status 'error'
WARNING: Discarding file:///usr/local/sage-310/local/var/lib/sage/venv-python3.10/var/tmp/sage/build/pyzmq-22.3.0/src. Command errored out with exit status 1: /usr/local/sage-310/local/var/lib/sage/venv-python3.10/bin/python3 /usr/local/sage-310/local/var/lib/sage/venv-python3.10/lib64/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpy23ywl50 Check the logs for full command output.
ERROR: Command errored out with exit status 1: /usr/local/sage-310/local/var/lib/sage/venv-python3.10/bin/python3 /usr/local/sage-310/local/var/lib/sage/venv-python3.10/lib64/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpy23ywl50 Check the logs for full command output.
********************************************************************************************************************************************************************************************************************************************
Error building a wheel for pyzmq-22.3.0
********************************************************************************************************************************************************************************************************************************************
real 0m0.831s
user 0m0.755s
sys 0m0.085s
************************************************************************
Error installing package pyzmq-22.3.0
Replying to @enriqueartal:
Do you mean
zeromq
orpyzmq
. FORzeromq
it used the system package.
The configuration of pyzmq
arranges for the zeromq
installation to be found.
When zeromq
is not available as a system package, it is installed in SAGE_LOCAL
, hence this line of the configuration.
Replying to @enriqueartal:
Find below the log
... /tmp/timer_createhby4x8bf.c:2:5: warning: implicit declaration of function 'timer_create' [-Wimplicit-function-declaration] 2 | timer_create(); | ^~~~~~~~~~~~ gcc build/temp.linux-x86_64-3.10/scratch/tmp/timer_createhby4x8bf.o -o build/temp.linux-x86_64-3.10/scratch/a.out error: [Errno 2] No such file or directory: 'a.out'
This is the bug that I fixed in setuptools
here on the ticket -- are you sure this got installed?
I made a clean install (including cffi) and modifying cysignals, and it works the compilation, I am testing now. Sorry for the noise.
These are the non successful tests:
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/cpython/atexit.pyx # 6 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/lfunctions/lcalc.py # 2 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/lfunctions/pari.py # 1 doctest failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/libs/giac/__init__.py # 7 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/misc/sageinspect.py # 1 doctest failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/plot/colors.py # 5 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/rings/padics/padic_extension_leaves.py # Timed out
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/schemes/elliptic_curves/BSD.py # 3 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/schemes/elliptic_curves/lseries_ell.py # 2 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/schemes/riemann_surfaces/riemann_surface.py # 1 doctest failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/structure/unique_representation.py # 1 doctest failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/symbolic/callable.py # 5 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage/tests/cmdline.py # 7 doctests failed
sage -t --random-seed=271923535750116010797008611844103265449 src/sage_docbuild/utils.py # 2 doctests failed
This is the result with Python3-3.10 package (with system package there were plenty of segmentation faults, also with the package and testpy installed). I hope it helps.
Thanks for testing. So for this ticket - installation was successful. The test failures are surely unrelated to setuptools and pyzmq.
Let's get this fix in then.
Upstream: Fixed upstream, but not in a stable release.
https://github.com/pypa/distutils/pull/65 has been merged
... and is included in https://setuptools.pypa.io/en/latest/history.html#v59-0-0 (not yet on PyPI)
setuptools 59.0.1 is out, but it looks like we should wait for 59.1.0 so that we can avoid the setup_requires
deprecation done in 58.3.0 and reverted in 59.1.0
Branch pushed to git repo; I updated commit sha1. New commits:
078e37b | build/pkgs/setuptools: Update to 59.1.0, remove patch |
Changed upstream from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.
Description changed:
---
+++
@@ -1,3 +1,10 @@
+`pyzmq` fails to build on some platforms. We fix it by
+- upgrading `setuptools` to a version that includes https://github.com/pypa/distutils/pull/65
+- correcting the `pyzmq` build configuration
+
+We also upgrade `pyzmq` and `zeromq` to the latest versions.
+
+
For example on `opensuse-tumbleweed-minimal` (https://github.com/mkoeppe/sage/runs/4085305194?check_suite_focus=true)
Let's get this in please
Description changed:
---
+++
@@ -3,7 +3,6 @@
- correcting the `pyzmq` build configuration
We also upgrade `pyzmq` and `zeromq` to the latest versions.
-
For example on `opensuse-tumbleweed-minimal` (https://github.com/mkoeppe/sage/runs/4085305194?check_suite_focus=true)
Reviewer: Dima Pasechnik
lgtm
Thanks!
Works for me on void linux using musl libc which used to fail (I was carrying a different patch before; I've replaced that patch by the changes in this ticket and it works).
Thanks for testing!
Changed branch from u/mkoeppe/pyzmq__build_errors to b430bcf
pyzmq
fails to build on some platforms. We fix it bysetuptools
to a version that includes https://github.com/pypa/distutils/pull/65pyzmq
build configurationWe also upgrade
pyzmq
andzeromq
to the latest versions.For example on
opensuse-tumbleweed-minimal
(https://github.com/mkoeppe/sage/runs/4085305194?check_suite_focus=true)Also reported in #31855 comment:22
Upstream: Fixed upstream, in a later stable release.
CC: @enriqueartal @jhpalmieri @dimpase
Component: packages: standard
Author: Matthias Koeppe
Branch:
b430bcf
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/32828