carsales / pyheif

Python 3.6+ interface to libheif library
Apache License 2.0
168 stars 41 forks source link

Issue when upgrading from 0.4 to 0.5.1 on mac #25

Closed azin634 closed 4 years ago

azin634 commented 4 years ago

Were there any dependency changes? I am getting the below error. Everything worked fine on 0.4

 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/include -I/usr/include -I/Users/edwin/code/Cove/venv/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c -o build/temp.macosx-10.9-x86_64-3.6/build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.o
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:884:12: error: use of undeclared identifier 'heif_avif'
      int n = (heif_avif) <= 0;
               ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:885:30: error: use of undeclared identifier 'heif_avif'
      *o = (unsigned long long)((heif_avif) | 0);  /* check that heif_avif is an integer */
                                 ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:891:12: error: use of undeclared identifier 'heif_avis'; did you mean 'heif_heis'?
      int n = (heif_avis) <= 0;
               ^~~~~~~~~
               heif_heis
    /usr/local/include/libheif/heif.h:295:3: note: 'heif_heis' declared here
      heif_heis, // scalable
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:892:30: error: use of undeclared identifier 'heif_avis'; did you mean 'heif_heis'?
      *o = (unsigned long long)((heif_avis) | 0);  /* check that heif_avis is an integer */
                                 ^~~~~~~~~
                                 heif_heis
    /usr/local/include/libheif/heif.h:295:3: note: 'heif_heis' declared here
      heif_heis, // scalable
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:1129:12: error: use of undeclared identifier 'heif_compression_AV1'; did you mean 'heif_compression_AVC'?
      int n = (heif_compression_AV1) <= 0;
               ^~~~~~~~~~~~~~~~~~~~
               heif_compression_AVC
    /usr/local/include/libheif/heif.h:713:3: note: 'heif_compression_AVC' declared here
      heif_compression_AVC = 2,
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:1130:30: error: use of undeclared identifier 'heif_compression_AV1'; did you mean 'heif_compression_AVC'?
      *o = (unsigned long long)((heif_compression_AV1) | 0);  /* check that heif_compression_AV1 is an integer */
                                 ^~~~~~~~~~~~~~~~~~~~
                                 heif_compression_AVC
    /usr/local/include/libheif/heif.h:713:3: note: 'heif_compression_AVC' declared here
      heif_compression_AVC = 2,
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:1577:12: error: use of undeclared identifier 'heif_suberror_No_av1C_box'; did you mean 'heif_suberror_No_hvcC_box'?
      int n = (heif_suberror_No_av1C_box) <= 0;
               ^~~~~~~~~~~~~~~~~~~~~~~~~
               heif_suberror_No_hvcC_box
    /usr/local/include/libheif/heif.h:140:3: note: 'heif_suberror_No_hvcC_box' declared here
      heif_suberror_No_hvcC_box = 106,
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:1578:30: error: use of undeclared identifier 'heif_suberror_No_av1C_box'; did you mean 'heif_suberror_No_hvcC_box'?
      *o = (unsigned long long)((heif_suberror_No_av1C_box) | 0);  /* check that heif_suberror_No_av1C_box is an integer */
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
                                 heif_suberror_No_hvcC_box
    /usr/local/include/libheif/heif.h:140:3: note: 'heif_suberror_No_hvcC_box' declared here
      heif_suberror_No_hvcC_box = 106,
      ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:5133:14: error: no member named 'convert_hdr_to_8bit' in 'struct heif_decoding_options'
      (void)((p->convert_hdr_to_8bit) | 0);  /* check that 'struct heif_decoding_options.convert_hdr_to_8bit' is an integer */
              ~  ^
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:5449:28: error: no member named 'convert_hdr_to_8bit' in 'heif_decoding_options'
      { "convert_hdr_to_8bit", offsetof(struct heif_decoding_options, convert_hdr_to_8bit),
                               ^                                      ~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/stddef.h:120:24: note: expanded from macro 'offsetof'
    #define offsetof(t, d) __builtin_offsetof(t, d)
                           ^                     ~
    build/temp.macosx-10.9-x86_64-3.6/_libheif_cffi.c:5450:72: error: no member named 'convert_hdr_to_8bit' in 'struct heif_decoding_options'
                               sizeof(((struct heif_decoding_options *)0)->convert_hdr_to_8bit),
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    11 errors generated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
azin634 commented 4 years ago

I had to upgrade libffi libheif