cgohlke / imagecodecs

Image transformation, compression, and decompression codecs
https://pypi.org/project/imagecodecs
BSD 3-Clause "New" or "Revised" License
111 stars 21 forks source link

Cannot Install Library using poetry #51

Closed khanfarhan10 closed 1 year ago

khanfarhan10 commented 1 year ago

Build failed for the library, however installing the library with pip works, oddly.

imagecodecs_stacktrace_err.log

StackTrace logfile, uploaded on github. (Attached as link because github does not allow me to paste such a long trace)

Few lines of the trace :

gcc -pthread -B /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/compiler_compat -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,-rpath-link,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -L/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,-rpath-link,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -L/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib build/temp.linux-x86_64-cpython-311/imagecodecs/_deflate.o -lm -ldeflate -o build/lib.linux-x86_64-cpython-311/imagecodecs/_deflate.cpython-311-x86_64-linux-gnu.so
        building 'imagecodecs._gif' extension
        gcc -pthread -B /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include -fPIC -O2 -isystem /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include -fPIC -Iimagecodecs -I/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include/python3.11 -I/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include -c imagecodecs/_gif.c -o build/temp.linux-x86_64-cpython-311/imagecodecs/_gif.o
        In file included from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948,
                         from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                         from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                         from imagecodecs/_gif.c:746:
        /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
           17 | #warning "Using deprecated NumPy API, disable it with " \
              |  ^~~~~~~
        gcc -pthread -B /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/compiler_compat -shared -Wl,--allow-shlib-undefined -Wl,-rpath,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,-rpath-link,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -L/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,--allow-shlib-undefined -Wl,-rpath,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -Wl,-rpath-link,/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib -L/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib build/temp.linux-x86_64-cpython-311/imagecodecs/_gif.o -lm -lgif -o build/lib.linux-x86_64-cpython-311/imagecodecs/_gif.cpython-311-x86_64-linux-gnu.so
        building 'imagecodecs._heif' extension
        gcc -pthread -B /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include -fPIC -O2 -isystem /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include -fPIC -Iimagecodecs -I/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/include/python3.11 -I/home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include -c imagecodecs/_heif.c -o build/temp.linux-x86_64-cpython-311/imagecodecs/_heif.o
        In file included from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948,
                         from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                         from /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                         from imagecodecs/_heif.c:746:
        /home/hello/work/anaconda3/envs/internal-python-api-services-py3.11/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
           17 | #warning "Using deprecated NumPy API, disable it with " \
              |  ^~~~~~~
        imagecodecs/_heif.c: In function ‘__pyx_pf_11imagecodecs_5_heif_4heif_encode’:
        imagecodecs/_heif.c:5565:30: warning: implicit declaration of function ‘heif_nclx_color_profile_alloc’ [-Wimplicit-function-declaration]
         5565 |               __pyx_v_nclx = heif_nclx_color_profile_alloc();
              |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        imagecodecs/_heif.c:5565:28: warning: assignment to ‘struct heif_color_profile_nclx *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
         5565 |               __pyx_v_nclx = heif_nclx_color_profile_alloc();
              |                            ^
        imagecodecs/_heif.c:5692:30: error: ‘struct heif_encoding_options’ has no member named ‘output_nclx_profile’
         5692 |               __pyx_v_options->output_nclx_profile = __pyx_v_nclx;
              |                              ^~
        imagecodecs/_heif.c:7433:9: warning: implicit declaration of function ‘heif_nclx_color_profile_free’ [-Wimplicit-function-declaration]
         7433 |         heif_nclx_color_profile_free(__pyx_v_nclx);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        imagecodecs/_heif.c: In function ‘__pyx_pf_11imagecodecs_5_heif_6heif_decode’:
        imagecodecs/_heif.c:9306:44: warning: implicit declaration of function ‘heif_image_get_primary_width’; did you mean ‘heif_image_get_width’? [-Wimplicit-function-declaration]
         9306 |               __pyx_v_width = ((Py_ssize_t)heif_image_get_primary_width(__pyx_v_image));
              |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
              |                                            heif_image_get_width
        imagecodecs/_heif.c:9315:45: warning: implicit declaration of function ‘heif_image_get_primary_height’; did you mean ‘heif_image_get_height’? [-Wimplicit-function-declaration]
         9315 |               __pyx_v_height = ((Py_ssize_t)heif_image_get_primary_height(__pyx_v_image));
              |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              |                                             heif_image_get_height
        imagecodecs/_heif.c: In function ‘__pyx_f_11imagecodecs_5_heif_heif_compression’:
        imagecodecs/_heif.c:11438:62: error: ‘heif_compression_AV1’ undeclared (first use in this function); did you mean ‘heif_compression_AVC’?
        11438 |   __pyx_t_4 = __Pyx_PyInt_From_enum__heif_compression_format(heif_compression_AV1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 751, __pyx_L1_error)
              |                                                              ^~~~~~~~~~~~~~~~~~~~
              |                                                              heif_compression_AVC
        imagecodecs/_heif.c:11438:62: note: each undeclared identifier is reported only once for each function it appears in
        imagecodecs/_heif.c: In function ‘__pyx_pymod_exec__heif’:
        imagecodecs/_heif.c:28738:62: error: ‘heif_compression_AV1’ undeclared (first use in this function); did you mean ‘heif_compression_AVC’?
        28738 |   __pyx_t_6 = __Pyx_PyInt_From_enum__heif_compression_format(heif_compression_AV1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
              |                                                              ^~~~~~~~~~~~~~~~~~~~
              |                                                              heif_compression_AVC
        At top level:
        imagecodecs/_heif.c:12249:12: warning: ‘__pyx_f_11imagecodecs_5_heif_output_seek’ defined but not used [-Wunused-function]
        12249 | static int __pyx_f_11imagecodecs_5_heif_output_seek(__pyx_t_11imagecodecs_5_heif_output_t *__pyx_v_output, size_t __pyx_v_pos) {
              |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        error: command '/usr/bin/gcc' failed with exit code 1
        [end of output]

Kindly have a look and help if possible, @cgohlke

cgohlke commented 1 year ago

On Anaconda, use the packages from conda-forge .

See the requirements and notes for building from source.