9

I am compiling Emacs from source and can't figure out what libraries I need to enable imagemagick and m17n. I have imagemagick and libm17n-dev installed (I am on Debian).

My ./configure script says:

  Does Emacs use imagemagick?                             no
  [...]
  Does Emacs use -lm17n-flt?                              no
phils
  • 48,657
  • 3
  • 76
  • 115
Łukasz Gruner
  • 1,008
  • 8
  • 16
  • We need more information. You should look at the **config.log** file that contains details and results about the tests that the configure script ran. Search for imagemagick and m17n-flt. Post details on the failing tests or the cut out sections of the log. – dfeich Oct 26 '14 at 10:20
  • I have installed libmagickcore-dev and libmagick++-dev, and now configure finds imagemagick. Still no luck with m17n-flt (no such package on debian). – Łukasz Gruner Oct 26 '14 at 15:01
  • 1
    What Debian version are you on? `m17n-flt` [is part of `libm17n`](http://www.nongnu.org/m17n/manual-en/group__m17nIntro.html) and the [headers are included in `libm17n-dev`](http://pkgs.org/debian-wheezy/debian-main-amd64/libm17n-dev_1.6.3-2_amd64.deb.html). –  Oct 30 '14 at 09:15
  • 4
    The safest procedure to solve dependency issues when compiling from source (including Git) is to run `apt-get build-dep emacs24`, or if you're using Wheezy, `apt-get build-dep emacs23`. That should install all dependency packages and solve the issue. If you're planning to compile Emacs 24.4 or higher, check that the `libacl1-dev` package has been installed, otherwise you'll need to install it manually. – undostres Nov 18 '14 at 17:57

3 Answers3

8

After crawling the configure script, I think I have found your missing packet: libmagickwand-dev. On my machine, after installing this packet, ./configure finally says:

  Does Emacs use imagemagick?                             yes

NB1: as with other features (eg libxml2-dev for eww), I do not get the purpose of --with-feature:

  • If the libraries and development headers are on your system, configure will enable the feature even if you do not explicitly ask --with-feature;
  • If the libraries and development headers are not on your system, configure will ignore --with-feature and exit with status 0.

NB2: This has been tested on Ubuntu 14.04; libmagickwand-dev seems to exist in Debian too.

NB3: A general "methodology" to figure out the necessary packages from the configure script:

  • search configure for "imagemagick"
  • find these snippets:

    IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
    ...
    if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE"...
    
  • apt-cache search Wand

    • libmagickwand-dev - image manipulation library - development files
Peniblec
  • 213
  • 2
  • 7
6

To avoid having to track down the packages that are required to build Emacs, use apt-get to install them for you.

apt-get build-dep emacs

Actually this may not be enough, as this just installs the libraries the Debian maintainer has chosen to link Emacs against. I think you need:

apt-get install libm17n-dev libmagickcore-dev

However after this I still got use -lm17n-flt? no even when I explicitly used --with-m17n-flt. And I did not actually install libmagickcore-dev` because it resulted in a conflict.

tarsius
  • 25,298
  • 4
  • 69
  • 109
1

As the existing answer leaves out how to compile with m17n support, I add this to answer that. In my system m17n is not used and otf is also not used. To build with m17n support, install libraries needed for m17n and also for otf. Then Emacs will be compiled with both of them.

I don't know why compiling with m17n requires otf but this works :)

nitishch
  • 103
  • 7