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

Build failure on CPython 3.13 (dev) #417

Closed
skirpichev opened this issue Aug 31, 2023 · 0 comments · Fixed by #441
Closed

Build failure on CPython 3.13 (dev) #417

skirpichev opened this issue Aug 31, 2023 · 0 comments · Fixed by #441

Comments

@skirpichev
Copy link
Contributor

src/gmpy2_hash.c:219:27: error: ‘_PyHASH_IMAG’ undeclared:

$ pip install .
Processing /home/sk/src/gmpy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: gmpy2
  Building wheel for gmpy2 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for gmpy2 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing gmpy2.egg-info/PKG-INFO
      writing dependency_links to gmpy2.egg-info/dependency_links.txt
      writing requirements to gmpy2.egg-info/requires.txt
      writing top-level names to gmpy2.egg-info/top_level.txt
      reading manifest file 'gmpy2.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'COPYING'
      adding license file 'COPYING.LESSER'
      writing manifest file 'gmpy2.egg-info/SOURCES.txt'
      running build_ext
      building 'gmpy2.gmpy2' extension
      gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I./src -I/home/sk/src/cpython/for-gmpy/include -I/home/sk/src/cpython/Include -I/home/sk/src/cpython -c src/gmpy2.c -o build/temp.linux-x86_64-cpython-313/src/gmpy2.o -DSHARED=1
      In file included from src/gmpy2.c:621:
      src/gmpy2_convert_gmp.c: In function ‘GMPy_PyLong_From_MPZ’:
      src/gmpy2_convert_gmp.c:160:20: warning: implicit declaration of function ‘_PyLong_New’ [-Wimplicit-function-declaration]
        160 |     if (!(result = _PyLong_New(size))) {
            |                    ^~~~~~~~~~~
      src/gmpy2_convert_gmp.c:160:18: warning: assignment to ‘PyLongObject *’ {aka ‘struct _longobject *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
        160 |     if (!(result = _PyLong_New(size))) {
            |                  ^
      In file included from src/gmpy2.c:623:
      src/gmpy2_convert_mpc.c: In function ‘GMPy_MPC_From_PyStr’:
      src/gmpy2_convert_mpc.c:281:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
        281 |         cp  = PyUnicode_AsUTF8AndSize(s, &len);
            |             ^
      In file included from src/gmpy2.c:664:
      src/gmpy2_hash.c: In function ‘_mpfr_hash’:
      src/gmpy2_hash.c:187:5: warning: returning ‘void *’ from a function with return type ‘Py_hash_t’ {aka ‘long int’} makes integer from pointer without a cast [-Wint-conversion]
        187 |     CHECK_CONTEXT(context);
            |     ^~~~~~~~~~~~~ 
      src/gmpy2_hash.c:189:12: warning: implicit declaration of function ‘_Py_HashDouble’ [-Wimplicit-function-declaration]
        189 |     return _Py_HashDouble(temp);
            |            ^~~~~~~~~~~~~~
      src/gmpy2_hash.c: In function ‘GMPy_MPC_Hash_Slot’:
      src/gmpy2_hash.c:219:27: error: ‘_PyHASH_IMAG’ undeclared (first use in this function)
        219 |     combined = hashreal + _PyHASH_IMAG * hashimag;
            |                           ^~~~~~~~~~~~
      src/gmpy2_hash.c:219:27: note: each undeclared identifier is reported only once for each function it appears in
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gmpy2
Failed to build gmpy2
ERROR: Could not build wheels for gmpy2, which is required to install pyproject.toml-based projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant