Opened 9 months ago

Closed 8 months ago

Last modified 8 months ago

#32828 closed defect (fixed)

pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 59.2.0

Reported by: mkoeppe Owned by:
Priority: critical Milestone: sage-9.5
Component: packages: standard Keywords:
Cc: enriqueartal, jhpalmieri, dimpase Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: Fixed upstream, in a later stable release. Work issues:
Branch: b430bcf (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

pyzmq fails to build on some platforms. We fix it by

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)

Setting up build directory for pyzmq-22.2.1
Finished extraction
No patch files found in ../patches
****************************************************
Host system:
Linux dd2167ea4425 5.11.0-1020-azure #21~20.04.1-Ubuntu SMP Mon Oct 11 18:54:28 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/lib64/gcc/x86_64-suse-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit --enable-offload-targets=nvptx-none,amdgcn-amdhsa, --without-cuda-driver --enable-host-shared --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/11 --enable-ssp --disable-libssp --disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-libphobos --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-11 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --with-build-config=bootstrap-lto-lean --enable-link-mutex --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9] (SUSE Linux) 
****************************************************
Package 'pyzmq' is currently not installed
No legacy uninstaller found for 'pyzmq'; nothing to do
Installing pyzmq-22.2.1
Processing /sage/local/var/lib/sage/venv-python3.9.7/var/tmp/sage/build/pyzmq-22.2.1/src
    Preparing wheel metadata: started
    Running command /sage/local/var/lib/sage/venv-python3.9.7/bin/python3 /sage/local/var/lib/sage/venv-python3.9.7/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpn08jd7qu
    INFO: Disabling color, you really want to install colorlog.
    Disabling color, you really want to install colorlog.
    running dist_info
    creating /tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info
    writing /tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info/dependency_links.txt
    writing requirements to /tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info/requires.txt
    writing top-level names to /tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info/top_level.txt
    writing manifest file '/tmp/pip-modern-metadata-oxt25qia/pyzmq.egg-info/SOURCES.txt'
    running configure
    Settings obtained from pkg-config: {'library_dirs': [], 'include_dirs': [], 'libraries': ['zmq']}
    {'libraries': ['zmq'], 'include_dirs': [], 'library_dirs': [], 'runtime_library_dirs': [], 'extra_link_args': []}
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -g -O2 -fPIC

    compile options: '-c'
    gcc: build/temp.linux-x86_64-3.9/scratch/check_sys_un.c
    gcc build/temp.linux-x86_64-3.9/scratch/check_sys_un.o -o build/temp.linux-x86_64-3.9/scratch/check_sys_un
    Configure: Autodetecting ZMQ settings...
        Custom ZMQ dir:
    Checking for timer_create
    ** Errors about missing timer_create are a normal part of this process **
    ************************************************
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -g -O2 -fPIC

    creating build/temp.linux-x86_64-3.9/scratch/tmp
    compile options: '-c'
    gcc: /tmp/timer_create7kgvq7_0.c
    /tmp/timer_create7kgvq7_0.c: In function 'main':
    /tmp/timer_create7kgvq7_0.c:2:5: warning: implicit declaration of function 'timer_create' [-Wimplicit-function-declaration]
        2 |     timer_create();
          |     ^~~~~~~~~~~~
    gcc build/temp.linux-x86_64-3.9/scratch/tmp/timer_create7kgvq7_0.o -o build/temp.linux-x86_64-3.9/scratch/a.out

    error: [Errno 2] No such file or directory: 'a.out'
    Failed with default libzmq, trying again with /usr/local
    {'libraries': ['zmq'], 'include_dirs': ['/usr/local/include'], 'library_dirs': ['/usr/local/lib'], 'runtime_library_dirs': ['/usr/local/lib'], 'extra_link_args': []}
    Configure: Autodetecting ZMQ settings...
        Custom ZMQ dir:       /usr/local
    Checking for timer_create
    ** Errors about missing timer_create are a normal part of this process **
    ************************************************
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -g -O2 -fPIC

    compile options: '-c'
    gcc: /tmp/timer_createl5aoyxgr.c
    /tmp/timer_createl5aoyxgr.c: In function 'main':
    /tmp/timer_createl5aoyxgr.c:2:5: warning: implicit declaration of function 'timer_create' [-Wimplicit-function-declaration]
        2 |     timer_create();
          |     ^~~~~~~~~~~~
    Assembler messages:
    Fatal error: can't create build/temp.linux-x86_64-3.9/scratch/tmp/timer_createl5aoyxgr.o: No such file or directory
    ** The above error about timer_create is normal and not a problem! **
    no timer_create, linking librt
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -g -O2 -g -O2 -fPIC

    compile options: '-I/usr/local/include -Izmq/utils -c'
    gcc: build/temp.linux-x86_64-3.9/scratch/vers.c
    gcc build/temp.linux-x86_64-3.9/scratch/vers.o -L/usr/local/lib -Wl,--enable-new-dtags,-R/usr/local/lib -lzmq -lrt -o build/temp.linux-x86_64-3.9/scratch/vers
    Error running version detection script:

    build/temp.linux-x86_64-3.9/scratch/vers: error while loading shared libraries: libzmq.so.5: cannot open shared object file: No such file or directory


    error: Error running version detection script:

    build/temp.linux-x86_64-3.9/scratch/vers: error while loading shared libraries: libzmq.so.5: cannot open shared object file: No such file or directory


    Warning: Couldn't find an acceptable libzmq on the system.

    If you expected pyzmq to link against an installed libzmq, please check to make sure:

        * You have a C compiler installed
        * A development version of Python is installed (including headers)
        * A development version of ZMQ >= 3.2 is installed (including headers)
        * If ZMQ is not in a default location, supply the argument --zmq=<path>
        * If you did recently install ZMQ to a default location,
          try rebuilding the ld cache with `sudo ldconfig`
          or specify zmq's location with `--zmq=/usr/local`

    You can skip all this detection/waiting nonsense if you know
    you want pyzmq to bundle libzmq as an extension by passing:

        `--zmq=bundled`

    I will now try to build libzmq as a Python extension
    unless you interrupt me (^C) in the next 10 seconds...

    ************************************************

    10...
     9...
     8...
     7...
     6...
     5...
     4...
     3...
     2...
     1...
    Using bundled libzmq
    already have bundled/zeromq
    attempting ./configure to generate platform.hpp
    Warning: failed to configure libzmq:
    [Errno 2] No such file or directory: './configure'
    staging platform.hpp from: /sage/local/var/lib/sage/venv-python3.9.7/var/tmp/sage/build/pyzmq-22.2.1/src/buildutils/include_linux
    checking for timer_create

Also reported in ticket:31855#comment:22

Change History (47)

comment:1 Changed 9 months ago by mkoeppe

  • Cc jhpalmieri added

comment:2 Changed 9 months ago by mkoeppe

  • Cc dimpase added

comment:3 Changed 9 months ago by dimpase

    Configure: Autodetecting ZMQ settings...
        Custom ZMQ dir:       /usr/local

weird.

comment:4 follow-up: Changed 9 months ago by dimpase

I'd have tried updating zeromq to the latest version, 4.3.4.

comment:5 in reply to: ↑ 4 Changed 9 months ago by enriqueartal

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?

comment:6 follow-up: Changed 9 months ago by 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

comment:7 Changed 9 months ago by dimpase

Sorry, but the error happens in the minimal build, spkg-configure.m4 is not involved, right?

comment:8 Changed 9 months ago by mkoeppe

You are right, it isn't; I should have written "this is *also* another case..."

comment:9 in reply to: ↑ 6 Changed 9 months ago by enriqueartal

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

comment:10 Changed 9 months ago by enriqueartal

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.

comment:11 Changed 9 months ago by enriqueartal

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://trac.sagemath.org/ticket/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

comment:12 follow-up: Changed 9 months ago by mkoeppe

I think the above would be better to discuss in #30767. Let's please keep this ticket focused on the pyzmq build failures.

comment:13 follow-up: Changed 9 months ago by mkoeppe

It looks like pyzmq is incompatible with our use of SETUPTOOLS_USE_DISTUTILS=local.

comment:14 in reply to: ↑ 12 Changed 9 months ago by enriqueartal

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)

Last edited 9 months ago by enriqueartal (previous) (diff)

comment:15 in reply to: ↑ 13 Changed 9 months ago by mkoeppe

Replying to mkoeppe:

It looks like pyzmq is incompatible with our use of SETUPTOOLS_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

comment:16 Changed 9 months ago by mkoeppe

  • Branch set to u/mkoeppe/pyzmq__build_errors

comment:17 Changed 9 months ago by git

  • Commit set to 89e1dea356a04ee0f68def9823f9bee117a09057

Branch pushed to git repo; I updated commit sha1. New commits:

fb48e08build/pkgs/pyzmq/spkg-install.in: Do not overwrite library_dirs, include_dirs here, instead use zmq_prefix
89e1deabuild/pkgs/setuptools: Instead of bumping the patch level, upgrade to 58.5.3

comment:18 Changed 9 months ago by mkoeppe

  • Summary changed from pyzmq: Build errors to pyzmq: Fix build errors, upgrade and patch setuptools

comment:19 Changed 9 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Status changed from new to needs_review

comment:20 Changed 9 months ago by git

  • Commit changed from 89e1dea356a04ee0f68def9823f9bee117a09057 to 129d0fbd15736ebf8d547620f4a27e93ca431eb7

Branch pushed to git repo; I updated commit sha1. New commits:

129d0fbbuild/pkgs/pyzmq/spkg-install.in: Fix up

comment:21 Changed 9 months ago by git

  • Commit changed from 129d0fbd15736ebf8d547620f4a27e93ca431eb7 to fc116124dfa4790bdd829f2b8518cf076adb4e49

Branch pushed to git repo; I updated commit sha1. New commits:

2240cc1build/pkgs/pyzmq: Update to 22.3.0
fc11612build/pkgs/zeromq: Update to 4.3.4, add upstream_url

comment:22 Changed 9 months ago by mkoeppe

  • Summary changed from pyzmq: Fix build errors, upgrade and patch setuptools to pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 58.5.3, add patch

comment:23 Changed 9 months ago by git

  • Commit changed from fc116124dfa4790bdd829f2b8518cf076adb4e49 to a8fe9da95f28efc4b3bf975a997ce6da05c928bf

Branch pushed to git repo; I updated commit sha1. New commits:

a8fe9dabuild/pkgs/zeromq/patches/getrandom.patch: Remove

comment:24 follow-up: Changed 9 months ago by enriqueartal

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).

comment:25 in reply to: ↑ 24 Changed 9 months ago by mkoeppe

Replying to enriqueartal:

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).

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?

comment:26 follow-ups: Changed 9 months ago by enriqueartal

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

comment:27 in reply to: ↑ 26 Changed 9 months ago by mkoeppe

Replying to enriqueartal:

Do you mean zeromq or pyzmq. FOR zeromq 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.

comment:28 in reply to: ↑ 26 Changed 9 months ago by mkoeppe

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?

Last edited 9 months ago by mkoeppe (previous) (diff)

comment:29 Changed 9 months ago by enriqueartal

I made a clean install (including cffi) and modifying cysignals, and it works the compilation, I am testing now. Sorry for the noise.

comment:30 Changed 9 months ago by enriqueartal

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.

comment:31 Changed 9 months ago by mkoeppe

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.

comment:32 Changed 9 months ago by mkoeppe

  • Report Upstream changed from N/A to Fixed upstream, but not in a stable release.

comment:33 Changed 9 months ago by mkoeppe

... and is included in https://setuptools.pypa.io/en/latest/history.html#v59-0-0 (not yet on PyPI)

comment:34 Changed 9 months ago by mkoeppe

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

comment:35 Changed 9 months ago by git

  • Commit changed from a8fe9da95f28efc4b3bf975a997ce6da05c928bf to 078e37bbcc8825841a80c9118a1d0598c01d78c8

Branch pushed to git repo; I updated commit sha1. New commits:

078e37bbuild/pkgs/setuptools: Update to 59.1.0, remove patch

comment:36 Changed 9 months ago by mkoeppe

  • Report Upstream changed from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.
  • Summary changed from pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 58.5.3, add patch to pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 59.1.0

comment:37 Changed 9 months ago by mkoeppe

  • Description modified (diff)

comment:38 Changed 9 months ago by mkoeppe

Let's get this in please

comment:39 Changed 9 months ago by slelievre

  • Description modified (diff)

comment:40 Changed 9 months ago by git

  • Commit changed from 078e37bbcc8825841a80c9118a1d0598c01d78c8 to b430bcf4c46c4822a0b248db307565dd2c814119

Branch pushed to git repo; I updated commit sha1. New commits:

ee4f6b4Merge tag '9.5.beta7' into t/32828/pyzmq__build_errors
b430bcfbuild/pkgs/setuptools: Update to 59.2.0

comment:41 Changed 9 months ago by mkoeppe

  • Summary changed from pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 59.1.0 to pyzmq: Fix build errors; zeromq, pyzmq: Update; setuptools: upgrade to 59.2.0

comment:42 Changed 9 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

lgtm

comment:43 Changed 9 months ago by mkoeppe

Thanks!

comment:44 Changed 9 months ago by tornaria

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).

comment:45 Changed 9 months ago by mkoeppe

Thanks for testing!

comment:46 Changed 8 months ago by vbraun

  • Branch changed from u/mkoeppe/pyzmq__build_errors to b430bcf4c46c4822a0b248db307565dd2c814119
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:47 Changed 8 months ago by mkoeppe

  • Commit b430bcf4c46c4822a0b248db307565dd2c814119 deleted

Follow-ups in #32944, #33059

Note: See TracTickets for help on using tickets.