Opened 4 years ago

Closed 4 years ago

#13932 closed defect (fixed)

emacs-27.1 does not build with ImageMagick-6.9.11-27

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone: 10.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by ken@…)

I was in the middle of updating ImageMagick to current versions. Since emacs is now the only package in the book which uses IM6 I tried to build that to confirm it was ok.

My first build, using what is in the book, installed - but when I looked at the configure output I saw:

  Does Emacs use -llcms2?                                yes
  Does Emacs use imagemagick?                             no
  Does Emacs support sound?                               yes

Emacs now needs --with-imagemagick (and comments in configure show it looks for IM6).

But after adding that:

image.c:8594:11: fatal error: MagickCore/version.h: No such file or directory
 8594 | # include <MagickCore/version.h>
      |           ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I can work around that with

ln -sv /usr/include/ImageMagick-6/{wand,MagickWand}             

But then it fails with

image.c:8594:11: fatal error: MagickCore/version.h: No such file or directory
 8594 | # include <MagickCore/version.h>
      |           ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Again, work around that with

ln -sv /usr/include/ImageMagick-6/{magick,MagickCore}           

But it then fails badly:

image.c:8597:9: error: unknown type name 'PixelInfo'
 8597 | typedef PixelInfo MagickPixelPacket;
      |         ^~~~~~~~~
image.c:8597:19: error: conflicting types for 'MagickPixelPacket'
 8597 | typedef PixelInfo MagickPixelPacket;
      |                   ^~~~~~~~~~~~~~~~~
In file included from /usr/include/ImageMagick-6/magick/color.h:21,
                 from /usr/include/ImageMagick-6/magick/image.h:21,
                 from /usr/include/ImageMagick-6/magick/draw.h:22,
                 from /usr/include/ImageMagick-6/magick/annotate.h:21,
                 from /usr/include/ImageMagick-6/magick/MagickCore.h:80,
                 from /usr/include/ImageMagick-6/MagickWand/MagickWand.h:77,
                 from image.c:8593:
/usr/include/ImageMagick-6/magick/pixel.h:127:3: note: previous declaration of 'MagickPixelPacket' was here
  127 | } MagickPixelPacket;
      |   ^~~~~~~~~~~~~~~~~
image.c: In function 'imagemagick_compute_animated_image':
image.c:8837:37: warning: passing argument 2 of 'PixelGetMagickColor' from incompatible pointer type [-Wincompatible-pointer-types]
(lots more output)

There is a patch for 26.1 to use IM7 at https://github.com/WolfgangRamos/emacs-26.1-with-imagemagick-7/blob/master/001-emacs-26.1-imagemagick-7.patch but that is windoze-specific and wraps includes in #ifdef MINGW64 and #ifdef WINDOWSNT and also refers to dll files at one point.

We previously used 26.3, trying that with 6.9.11-27 installs and has some warnings about the Magick-6 include files (and it is using the old 6-specific names).

I suggest that we should either drop ImageMagick-6 from emacs (and therefore drop ImageMagick-6), or else revert to emacs-26.3.

ISTR the emacs release notes mentioned something now worked even if not compiled agaisnt ImageMagick, but maybe I'm mistaken.

Looking at Arch, they seem to be building 27.1 without specifying imagemagick.

Change History (4)

comment:1 by ken@…, 4 years ago

Description: modified (diff)

comment:2 by Bruce Dubbs, 4 years ago

Lets just drop IM from emacs and the book. Good riddance.

in reply to:  2 comment:3 by ken@…, 4 years ago

Owner: changed from blfs-book to ken@…
Status: newassigned

Replying to bdubbs:

Lets just drop IM from emacs and the book. Good riddance.

Now that I've slept, I am reminded that the changes of the header directories (wand -> MagickWand etc) were like what I had seen when IM7 came out and inkscape hit problems. Except these are the reverse.

I've just got as far as configuring emacs-27.1 with (only) '--with-imagemagick' added:

checking for MagickWand >= 7... yes
checking for MagickRelinquishMemory... yes
checking for MagickExportImagePixels... yes
checking for MagickMergeImageLayers... yes
checking for MagickAutoOrientImage... yes

OK, that builds and does a DESTDIR install, src/emacs -Q works. Archiving IM6.

comment:4 by ken@…, 4 years ago

Resolution: fixed
Status: assignedclosed

Hmm, IM6 was optional for transcode - but full transcode has not built for years. Replacing by an external link to legacy imagemagick.

r23535.

Note: See TracTickets for help on using tickets.