caracal-pipeline / cult-cargo

Curated Stimela2 cargo for popular radio astronomy software
MIT License
0 stars 1 forks source link

DDFacet cab Dockerfile fails with `sharredarray` broken wheel error #46

Open SpheMakh opened 4 months ago

SpheMakh commented 4 months ago

Error below

local/lib/python3.10/dist-packages/numpy/_core/include -I/usr/include/python3.10 -c ./src/shared_array_create.c -o build/temp.linux-x86_64-cpython-310/./src/shared_array_create.o
107.6       ./src/shared_array_create.c: In function ‘do_create’:
107.6       ./src/shared_array_create.c:58:11: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
107.6          58 |  if (dtype->elsize == 0) {
107.6             |           ^~
107.6       ./src/shared_array_create.c:65:14: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
107.6          65 |  size = dtype->elsize;
107.6             |              ^~
107.6       ./src/shared_array_create.c:101:24: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
107.6         101 |  meta->itemsize = dtype->elsize;
107.6             |                        ^~
107.6       ./src/shared_array_create.c:115:43: error: ‘PyArray_Descr’ {aka ‘struct _PyArray_Descr’} has no member named ‘elsize’
107.6         115 |                      NULL, map_addr, dtype->elsize,
107.6             |                                           ^~
107.6       error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
107.6       [end of output]
107.6   
107.6   note: This error originates from a subprocess, and is likely not a problem with pip.
107.6   ERROR: Failed building wheel for sharedarray
107.6 Successfully built DDFacet killMS Polygon3 pyephem pyFFTW
107.6 Failed to build sharedarray
107.6 ERROR: Could not build wheels for sharedarray, which is required to install pyproject.toml-based projects
------
Dockerfile:45
--------------------
  43 |     
  44 |     RUN python3.10 -mpip install --use-pep517 --no-cache-dir -U matplotlib dask-ms python-casacore casadata 
  45 | >>> RUN python3.10 -mpip install --use-pep517 --no-cache-dir DDFacet==0.8.0.0 killMS==3.2.0 
  46 |     
  47 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c python3.10 -mpip install --use-pep517 --no-cache-dir DDFacet==0.8.0.0 killMS==3.2.0" did not complete successfully: exit code: 1
docker build  -t quay.io/stimela2/ddfacet:0.8-cc0.1.3 -f- /home/sphemakh/work/softdev/cult-cargo/cultcargo/images/ddfacet failed with exit code 1
0:05:40 ⠴ image ddfacet [0/1]: version 0.8 [1/2]
o-smirnov commented 4 months ago

Something with numpy and SharedArray changes upstream. @TalonMyburgh just solved this problem in his install -- Talon, could you please post the details here?

talonmyburgh commented 4 months ago

If you pin sharedarray to version 3.2.1 and numpy to <2.0 it fixed a similar issue elsewhere. I think sharedarray has no upper bound on numpy so it recently started pulling 2.0.

Caveat - this morning in trying to recreate the problem for DDFacet so I could open a PR, it appeared to no longer be a problem - even though it was installing 2.0. It may be that an update was made to numpy last night since sharedarray has not seen changes in years.