Libvips: Erreur lors de la construction avec libde265-dev libheif-dev installé

Créé le 15 sept. 2020  ·  3Commentaires  ·  Source: libvips/libvips

Décrivez le bogue
Je ne peux pas compiler libvips lorsque j'installe les bibliothèques libde265-dev libheif-dev

Reproduire
Étapes pour reproduire le comportement:

  1. insteall libde265-dev libheif-dev
  2. compiler la dernière libvips 8.10.1
  3. Voir l'erreur

Comportement prévisible
il compile

Comportement réel
ça échoue

make[3]: Entering directory '/vips-8.10.1/libvips/foreign'
depbase=`echo heifload.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../libvips/include -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS    -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include         -I/usr/include/libpng16  -I/usr/include/libexif                      -g -O2 -MT heifload.lo -MD -MP -MF $depbase.Tpo -c -o heifload.lo heifload.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libvips/include -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libpng16 -I/usr/include/libexif -g -O2 -MT heifload.lo -MD -MP -MF .deps/heifload.Tpo -c heifload.c  -fPIC -DPIC -o .libs/heifload.o
heifload.c: In function 'vips_foreign_load_heif_build':
heifload.c:224:11: warning: implicit declaration of function 'heif_context_read_from_reader'; did you mean 'heif_context_read_from_memory'? [-Wimplicit-function-declaration]
   error = heif_context_read_from_reader( heif->ctx,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           heif_context_read_from_memory
heifload.c:224:9: error: incompatible types when assigning to type 'struct heif_error' from type 'int'
   error = heif_context_read_from_reader( heif->ctx,
         ^
heifload.c: At top level:
heifload.c:952:1: error: return type is an incomplete type
 vips_foreign_load_heif_wait_for_file_size( gint64 target_size, void *userdata )
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
heifload.c: In function 'vips_foreign_load_heif_wait_for_file_size':
heifload.c:956:31: error: storage size of 'status' isn't known
  enum heif_reader_grow_status status;
                               ^~~~~~
heifload.c:962:12: error: 'heif_reader_grow_status_size_reached' undeclared (first use in this function); did you mean 'heif_reader_grow_status'?
   status = heif_reader_grow_status_size_reached;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            heif_reader_grow_status
heifload.c:962:12: note: each undeclared identifier is reported only once for each function it appears in
heifload.c:970:12: error: 'heif_reader_grow_status_size_beyond_eof' undeclared (first use in this function); did you mean 'heif_reader_grow_status_size_reached'?
   status = heif_reader_grow_status_size_beyond_eof;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            heif_reader_grow_status_size_reached
heifload.c:972:8: warning: 'return' with a value, in function returning void
  return( status );
        ^
heifload.c:952:1: note: declared here
 vips_foreign_load_heif_wait_for_file_size( gint64 target_size, void *userdata )
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../libvips/include/vips/vips.h:130:0,
                 from heifload.c:67:
heifload.c: In function 'vips_foreign_load_heif_init':
heifload.c:981:38: error: invalid application of 'sizeof' to incomplete type 'struct heif_reader'
  heif->reader = VIPS_ARRAY( NULL, 1, struct heif_reader );
                                      ^
../../libvips/include/vips/memory.h:65:56: note: in definition of macro 'VIPS_ARRAY'
  ((T *) vips_malloc( VIPS_OBJECT( OBJ ), (N) * sizeof( T )))
                                                        ^
heifload.c:985:14: error: dereferencing pointer to incomplete type 'struct heif_reader'
  heif->reader->reader_api_version = 1;
              ^~
Makefile:695: recipe for target 'heifload.lo' failed
make[3]: Leaving directory '/vips-8.10.1/libvips/foreign'
make[3]: *** [heifload.lo] Error 1
Makefile:875: recipe for target 'all-recursive' failed
make[2]: Leaving directory '/vips-8.10.1/libvips'
make[2]: *** [all-recursive] Error 1
Makefile:629: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/vips-8.10.1'
make[1]: *** [all-recursive] Error 1
Makefile:536: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/sh -c wget https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz     && tar -xf vips-${VIPS_VERSION}.tar.gz     && cd vips-${VIPS_VERSION}     && ./configure     && make && make install && ldconfig' returned a non-zero code: 2 

Environnement
Docker / ubuntu 18

Voici une partie de mon Dockerfile

RUN apt-get -qq update && apt-get -qqy install vim zlib1g-dev libreadline-dev \
    libncurses5-dev libpcre3-dev libssl-dev gcc perl make curl git-core curl \
    luarocks libsass-dev glib2.0-dev libexpat1-dev \
    libjpeg-dev libwebp-dev libpng-dev libexif-dev libgif-dev \
    libde265-dev libheif-dev

ARG VIPS_VERSION=8.10.1

RUN wget https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz \
    && tar -xf vips-${VIPS_VERSION}.tar.gz \
    && cd vips-${VIPS_VERSION} \
    && ./configure \
    && make && make install && ldconfig
bug

Tous les 3 commentaires

Ubuntu 18.04 fournit libheif v1.1.0 mais heif_context_read_from_reader été ajouté dans libheif v1.3.0.

@jcupitt Peut-être

Cela semble être une bonne idée @lovell. Augmentons le minimum pour 8.10.2.

@solisoft, vous devrez créer vous-même libheif, désolé. Mais comme le dit Lovell, vous ne devriez probablement pas utiliser celui d'Ubuntu18.04 de toute façon, alors peut-être que c'est une bonne chose.

OK, ce changement sera dans 8.10.2. Merci pour le rapport @solisoft !

Cette page vous a été utile?
0 / 5 - 0 notes