Skip to content

Cython error compiling package #201

Description

@maxbolchini

Hi.
I'm trying to compila galario on a Linux server folloiwing https://mtazzari.github.io/galario/install.html#fftw-requirement, but I'm stuck with the error:

Error compiling Cython file:

...

    shape[:] = (self.nx, int(self.ny/2)+1)

    # Create a 2D array, of length `nx*ny/2+1`
    ndarray = np.PyArray_SimpleNewFromData(2, shape, complex_typenum, self.data_ptr)
    ndarray.base = <PyObject*> self
           ^

/home/mabolchini/galario/python/libcommon.pyx:85:15: Assignment to a read-only property
make[2]: *** [python/CMakeFiles/libcommon_single.dir/build.make:75: python/libcommon_single.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:248: python/CMakeFiles/libcommon_single.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

This is my cmake output:

-- The C compiler identification is GNU 11.5.0
-- The CXX compiler identification is GNU 11.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Installing inside conda env at /home/mabolchini/.conda/envs/galario3
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY)
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Found FFTW3: /usr/lib64/libfftw3f.so;/usr/lib64/libfftw3f_threads.so;/usr/lib64/libfftw3.so;/usr/lib64/libfftw3_threads.so (found version "3.3.8") found components: SINGLE_SERIAL SINGLE_THREADS DOUBLE_SERIAL DOUBLE_THREADS
-- Found PythonInterp: /home/mabolchini/.conda/envs/galario3/bin/python (found version "3.8.20")
-- Found Cython: /home/mabolchini/.conda/envs/galario3/bin/cython
-- Found PythonLibs: /home/mabolchini/.conda/envs/galario3/lib/libpython3.8.so (found version "3.8.20")
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args
(NumpyLibrary) does not match the name of the calling package (Numpy).
This can lead to problems in calling code that expects find_package
result variables (e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
build/external/src/GreatCMakeCookOff/modules/FindNumpy.cmake:78 (find_package_handle_standard_args)
CMakeLists.txt:82 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found NumpyLibrary: /home/mabolchini/.conda/envs/galario3/lib/python3.8/site-packages/numpy/core/include (found version "1.24.4")
-- [NumPy] Long double exists = TRUE
-- [NumPy] Bool is a separate type = FALSE
-- [NumPy] NPY_ARRAY_* macros exist = TRUE
-- [NumPy] PyArray_ENABLEFLAGS exists = TRUE
-- Building the galario python wrapper
-- Python install path (PYTHON_PKG_DIR): /home/mabolchini/.conda/envs/galario3/lib/python3.8/site-packages
-- Found pytest: /home/mabolchini/.conda/envs/galario3/lib/python3.8/site-packages/pytest (found version "8.3.4")
-- Found Sphinx: /usr/local/bin/sphinx-build
-- Configuring done (6.4s)
-- Generating done (0.4s)
-- Build files have been written to: /home/mabolchini/galario/build

cython seems to be 3.0.11.

What am I missing?
Thanks
Max

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions