Compilation error IM 7.0.10.0 on linux subsystem for windows with Ubuntu 18.04 LTS

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Locked
jesusmartinb64
Posts: 1
Joined: 2020-03-14T02:49:32-07:00
Authentication code: 1152

Compilation error IM 7.0.10.0 on linux subsystem for windows with Ubuntu 18.04 LTS

Post by jesusmartinb64 »

Good Morning,
I am trying to install the latest version of ImageMagick 7.0.10.0 on linux subsystem for windows with Ubuntu 18.04 LTS by the procedure Install from Unix source. https://imagemagick.org/script/install-source.php. After a first installation in which no delegate was installed I proceed to the installation of delegated libraries and have to carry out a new configuration and compilation as indicated in https://askubuntu.com/questions/1042436 ... l-delegate -libraries-for-image-magick-7-0-7 / 1042482 # 1042482.
The result is the following compilation error:

Code: Select all

CC coders / MagickCore_libMagickCore_7_Q16HDRI_la-yuv.lo
  CC coders / MagickCore_libMagickCore_7_Q16HDRI_la-djvu.lo
  CC coders / MagickCore_libMagickCore_7_Q16HDRI_la-exr.lo
  CC coders / MagickCore_libMagickCore_7_Q16HDRI_la-heic.lo
coders / heic.c: In function ‘ReadHEICColorProfile’:
coders / heic.c: 143: 5: warning: unused variable ‘length’ [-Wunused-variable]
     length;
     ^ ~~~~~
coders / heic.c: In function ‘ReadHEICImage’:
coders / heic.c: 452: 9: warning: implicit declaration of function ‘heif_context_read_from_memory_without_copy’; did you mean ‘heif_context_read_from_memory’? [-Wimplicit-function-declaration]
   error = heif_context_read_from_memory_without_copy (heif_context, file_data,
         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         heif_context_read_from_memory
coders / heic.c: 452: 8: error: incompatible types when assigning to type ‘struct heif_error’ from type ‘int’
   error = heif_context_read_from_memory_without_copy (heif_context, file_data,
        ^
At top level:
coders / heic.c: 94: 3: warning: ‘xmp_namespace’ defined but not used [-Wunused-const-variable =]
   xmp_namespace [] = "http://ns.adobe.com/xap/1.0/";
   ^ ~~~~~~~~~~~~
Makefile: 9877: recipe for target 'coders / MagickCore_libMagickCore_7_Q16HDRI_la-heic.lo' failed
make [1]: *** [coders / MagickCore_libMagickCore_7_Q16HDRI_la-heic.lo] Error 1
make [1]: Leaving directory '/home/jmartinblan/ImageMagick-7.0.10-0'
Makefile: 5988: recipe for target 'all' failed
make: *** [all] Error 2
jmartinblan @ DESKTOP-6HEOGF4: ~ / ImageMagick-7.0.10-0 $
How can i solve this problem?

Thank you.

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: Compilation error IM 7.0.10.0 on linux subsystem for windows with Ubuntu 18.04 LTS

Post by magick »

Perhaps you have an older version of the libheif delegate library. Check the heif.h header file. Ours declares heif_context_read_from_memory_without_copy():

Code: Select all

// Same as heif_context_read_from_memory() except that the provided memory is not copied.
// That means, you will have to keep the memory area alive as long as you use the heif_context.
LIBHEIF_API
struct heif_error heif_context_read_from_memory_without_copy(struct heif_context*,
                                                             const void* mem, size_t size,
                                                             const struct heif_reading_options*);

Locked