sagemath / cysignals

cysignals: interrupt and signal handling for Cython
GNU Lesser General Public License v3.0
44 stars 23 forks source link

can not install cysignals====1.10.2 #199

Open ZiguoFu opened 4 months ago

ZiguoFu commented 4 months ago

when using pip install cysignals====1.10.2, it shows:

image

Collecting cysignals==1.10.2 Using cached cysignals-1.10.2.tar.gz (95 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: Cython>=0.28 in /home/scott/miniconda3/envs/MCMTpy/lib/python3.8/site-packages (from cysignals==1.10.2) (3.0.9) Building wheels for collected packages: cysignals Building wheel for cysignals (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for cysignals (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [162 lines of output] running bdist_wheel running build make: 'configure' is up to date. checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether we are using the GNU C++ compiler... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking sys/prctl.h usability... yes checking sys/prctl.h presence... yes checking for sys/prctl.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking windows.h usability... no checking windows.h presence... no checking for windows.h... no checking for fork... yes checking for kill... yes checking for sigprocmask... yes checking for sigaltstack... yes checking for backtrace... yes checking for library containing pari_init... no checking for emms instruction... yes checking whether setjmp() saves the signal mask... no checking for GNU libc... yes checking for _Atomic in C code... yes checking for _Atomic in C++ code... no checking for std::atomic... yes configure: creating ./config.status config.status: creating src/cysignals/signals.pxd config.status: creating src/config.h config.status: creating src/cysignals/cysignals_config.h warning: src/cysignals/signals.pxd:57:56: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: src/cysignals/tests.pyx:280:54: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: src/cysignals/tests.pyx:298:58: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. warning: src/cysignals/signals.pxd:57:56: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython. performance hint: src/cysignals/tests.pyx:94:5: Exception check on 'infinite_loop' will always require the GIL to be acquired. Possible solutions:

  1. Declare 'infinite_loop' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  2. Use an 'int' return type on 'infinite_loop' to allow an error code to be returned. performance hint: src/cysignals/tests.pyx:101:5: Exception check on 'infinite_malloc_loop' will always require the GIL to be acquired. Possible solutions:
  3. Declare 'infinite_malloc_loop' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  4. Use an 'int' return type on 'infinite_malloc_loop' to allow an error code to be returned. performance hint: src/cysignals/tests.pyx:111:5: Exception check on 'dereference_null_pointer' will always require the GIL to be acquired. Possible solutions:
  5. Declare 'dereference_null_pointer' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  6. Use an 'int' return type on 'dereference_null_pointer' to allow an error code to be returned. performance hint: src/cysignals/tests.pyx:298:5: Exception check on 'c_test_sig_on_cython_except_all' will always require the GIL to be acquired. Possible solutions:
  7. Declare 'c_test_sig_on_cython_except_all' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
  8. Use an 'int' return type on 'c_test_sig_on_cython_except_all' to allow an error code to be returned.

    Error compiling Cython file:

    ...

      """
      cdef pthread_t t1, t2
      with nogil:
          sig_on()
          if pthread_create(&t1, NULL, func_thread_sig_block, NULL):
                                       ^

    src/cysignals/tests.pyx:1263:37: Cannot assign type 'void (void ) except? NULL nogil' to 'void ()(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of 'func_thread_sig_block'.

    Error compiling Cython file:

    ... cdef pthread_t t1, t2 with nogil: sig_on() if pthread_create(&t1, NULL, func_thread_sig_block, NULL): sig_error() if pthread_create(&t2, NULL, func_thread_sig_block, NULL): ^

    src/cysignals/tests.pyx:1265:37: Cannot assign type 'void (void ) except? NULL nogil' to 'void ()(void ) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of 'func_thread_sig_block'. Compiling src/cysignals/signals.pyx because it changed. Compiling src/cysignals/pysignals.pyx because it changed. Compiling src/cysignals/alarm.pyx because it changed. Compiling src/cysignals/pselect.pyx because it changed. Compiling src/cysignals/tests.pyx because it changed. [1/5] Cythonizing src/cysignals/alarm.pyx [2/5] Cythonizing src/cysignals/pselect.pyx [3/5] Cythonizing src/cysignals/pysignals.pyx [4/5] Cythonizing src/cysignals/signals.pyx [5/5] Cythonizing src/cysignals/tests.pyx Traceback (most recent call last): File "/home/scott/miniconda3/envs/MCMTpy/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/scott/miniconda3/envs/MCMTpy/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) File "/home/scott/miniconda3/envs/MCMTpy/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 410, in build_wheel return self._build_with_temp_dir( File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir self.run_setup() File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 487, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 132, in File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/init.py", line 104, in setup return distutils.core.setup(attrs) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/tmp/pip-build-env-tu6stygy/normal/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run self.run_command("build") File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command super().run_command(command) File "/tmp/pip-build-env-tu6stygy/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "", line 101, in run File "", line 113, in cythonize File "/tmp/pip-build-env-tu6stygy/normal/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize cythonize_one(args) File "/tmp/pip-build-env-tu6stygy/normal/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: src/cysignals/tests.pyx [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cysignals Failed to build cysignals ERROR: Could not build wheels for cysignals, which is required to install pyproject.toml-based projects