void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

Building Emacs with ImageMagick support

Open emacsomancer opened this issue 7 years ago • 13 comments

System

  • xuname:
    Void 4.19.12_1 x86_64 GenuineIntel uptodate FFFFFFFF
  • package:
    emacs 26.1.5

Expected behavior

Building Emacs with e.g. ./xbps-src -o imagemagick pkg emacs-x11 followed by xi emacs-x11 should install a version of Emacs that can resize images via ImageMagick.

Actual behavior

Emacs still claims it needs ImageMagick support to resize images.

Steps to reproduce the behavior

git clone the void-packages repo, install the bootstrap via ./xbps-src binary-bootstrap, and then try to build emacs with ./xbps-src -o imagemagick pkg emacs-x11 followed by xi emacs-x11. Similar results occur if emacs-x11 is substituted by emacs-gtk3. Similarly, even editing the template directly to make imagemagick a default option produces the same results.

emacsomancer avatar Dec 31 '18 03:12 emacsomancer

Tried changing to ImageMagick6 ?

Configured for 'x86_64-unknown-linux-gnu'.
  Does Emacs use imagemagick (version 6)?                 no

maxice8 avatar Jan 18 '19 08:01 maxice8

You mean installing ImageMagick6 on my machine? It conflicts with ImageMagick(7). I certainly have Emacs with ImageMagick support working on other machines/distros without having ImageMagick6 installed.

emacsomancer avatar Jan 18 '19 18:01 emacsomancer

Okay, so I've been working on sorting out this same thing and I've gotten to the point where I can clear this up I think.

There are two problems here.

The first one, is that you need to install libmagick6, not ImageMagick6. libmagick6 does not conflict.

The second one, is that changes to the package must be made to use libmagick6-devel instead of libmagick-devel

I'm futzing around with sorting the problem out now, I should be able to toss in a fix for the package soon.

lambdadog avatar Apr 30 '19 23:04 lambdadog

Did you manage to fix the issue? Is it still relevant with up to date packages right now?

obunden avatar Oct 13 '19 03:10 obunden

This still remains an issue with 26.3.

When 27 is released, it should cease to be an issue, as Emacs 27 can handle image manipulation internally, without needing Imagemagick.

emacsomancer avatar Nov 07 '19 12:11 emacsomancer

Did somebody figure out the issue? I locally switched the dependency to libmagick6(-devel) and made sure the configure section contained

Configured for 'x86_64-unknown-linux-gnu'.
  Does Emacs use imagemagick (version 6)?                 yes

Nevertheless emacs claims it wouldn't have imagemagick support.

liketechnik avatar Apr 23 '20 16:04 liketechnik

In the soon to be released version 27, Emacs won't need imagemagick any more to resize images &c., so probably the easiest thing is just to wait for the next version (which'll be along soon).

emacsomancer avatar Apr 24 '20 20:04 emacsomancer

Emacs 27.1 has been merged.

ericonr avatar Sep 29 '20 12:09 ericonr

However, the option is still there and might still be broken.

ericonr avatar Sep 29 '20 12:09 ericonr

emacs-gtk3 when built with imagemagick option ends up linked against libmagick, so I will consider this solved.

ericonr avatar Jan 21 '21 18:01 ericonr

Is there somewhere explaining how to get/build Emacs with ImageMagick support for a newbie? Thanks.

AtomicNess123 avatar Jun 08 '21 06:06 AtomicNess123

Follow the quick start guide (https://github.com/void-linux/void-packages#quick-start) but when building do ./xbps-src -o imagemagick pkg emacs

ericonr avatar Jun 08 '21 12:06 ericonr

Thanks so much. This won't affect my current Prelude configuation of emacs?

AtomicNess123 avatar Jun 08 '21 17:06 AtomicNess123