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

pycuda 2024.1.2 fails to build on Fedora 41 #4332

Closed
totaam opened this issue Aug 16, 2024 · 2 comments
Closed

pycuda 2024.1.2 fails to build on Fedora 41 #4332

totaam opened this issue Aug 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 16, 2024

(..)
python3 ./configure.py --cuda-enable-gl --cuda-root=/opt/cuda --cudadrv-lib-dir=/usr/lib64 --boost-inc-dir=/usr/include --boost-lib-dir=/usr/lib64 --no-cuda-enable-curand
(..)
bpl-subset/bpl_subset/pycudaboost/python/call.hpp:62:28: error: ‘PyEval_CallFunction’ was not declared in this scope; did you mean ‘PyObject_CallFunction’?
   62 |     PyObject* const result =
      |         ~~~~~~~~~~~~~~~~~~~^
   63 |         PyEval_CallFunction(
      |         ~~~~~~~~~~~~~~~~~~~~
   64 |             callable
      |             ~~~~~~~~        
   65 |             , const_cast<char*>("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")")
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   66 |             BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil)
      |             ~               

This seems to break with every other Fedora release:

@totaam totaam added the bug Something isn't working label Aug 16, 2024
@totaam
Copy link
Collaborator Author

totaam commented Aug 16, 2024

Adding --no-use-shipped-boost gets past this one, but then:

src/wrapper/wrap_cudadrv.cpp: In function ‘pycuda::module* {anonymous}::module_from_buffer(boost::python::api::object, boost::python::api::object, boost::python::api::object)’:
src/wrapper/wrap_cudadrv.cpp:360:9: error: ‘PyObject_AsCharBuffer’ was not declared in this scope; did you mean ‘PyObject_CheckBuffer’?
  360 |     if (PyObject_AsCharBuffer(buffer.ptr(), &mod_buf, &len))
      |         ^~~~~~~~~~~~~~~~~~~~~
      |         PyObject_CheckBuffer
src/wrapper/wrap_cudadrv.cpp: In member function ‘void {anonymous}::Linker::add_data(boost::python::api::object, CUjitInputType, boost::python::str)’:
src/wrapper/wrap_cudadrv.cpp:505:13: error: ‘PyObject_AsCharBuffer’ was not declared in this scope; did you mean ‘PyObject_CheckBuffer’?
  505 |         if (PyObject_AsCharBuffer(py_data.ptr(), &data_buf, &data_buf_len) != 0) {
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             PyObject_CheckBuffer
error: command '/usr/bin/gcc' failed with exit code 1

This one is caused by python/cpython#85275

totaam added a commit that referenced this issue Aug 16, 2024
* link against the system boost-python library
* add patch for Python 3.13 compatibility: new buffer interface
totaam added a commit that referenced this issue Aug 16, 2024
@totaam
Copy link
Collaborator Author

totaam commented Aug 17, 2024

Patch added to our tree and submitted as a PR: inducer/pycuda#456

We now have pycuda builds in the beta repo

@totaam totaam closed this as completed Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant