Libvips: Erro ao compilar com libde265-dev libheif-dev instalado

Criado em 15 set. 2020  ·  3Comentários  ·  Fonte: libvips/libvips

Descreva o bug
Não consigo compilar libvips quando instalo as bibliotecas libde265-dev libheif-dev

Reproduzir
Passos para reproduzir o comportamento:

  1. insteall libde265-dev libheif-dev
  2. compilar o libvips 8.10.1 mais recente
  3. Ver erro

Comportamento esperado
compilar

Comportamento real
falha

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 

Meio Ambiente
Docker / ubuntu 18

Aqui está uma parte do meu 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

Todos 3 comentários

O Ubuntu 18.04 fornece a libheif v1.1.0, mas heif_context_read_from_reader foi adicionado à libheif v1.3.0.

@jcupitt Talvez devêssemos tornar libheif v1.3.0 (junho de 2018) a versão mínima necessária? Houve tantos bugs e, mais importante, correções de segurança para libheif desde a v1.1.0.

Parece uma boa ideia @lovell. Vamos aumentar o mínimo para 8.10.2.

@solisoft, você precisará criar o libheif por conta própria, desculpe. Mas, como diz Lovell, você provavelmente não deveria usar o do Ubuntu 18.04, então talvez seja uma coisa boa.

OK, essa mudança estará em 8.10.2. Obrigado pelo relatório @solisoft !

Esta página foi útil?
0 / 5 - 0 avaliações