I'm trying to build cuneiform from source with imageMagick support, but it looks like the debian package missing a header file. When I'm running make it fails at the very end of the process:

[100%] Building CXX object cuneiform_src/cli/CMakeFiles/cuneiform-cli.dir/cuneiform-cli.cpp.o
In file included from /usr/include/ImageMagick-6/Magick++/Include.h:13:0,
                 from /usr/include/ImageMagick-6/Magick++.h:9,
                 from /tmp/cuneiform-linux-1.1.0/cuneiform_src/cli/cuneiform-cli.cpp:156:
/usr/include/ImageMagick-6/magick/magick-config.h:21:38: fatal error: magick/magick-baseconfig.h: No such file or directory
 #include "magick/magick-baseconfig.h"
compilation terminated.

By searching for the header, it turns out it can be found in a different ImageMagick directory:

$ find /usr/include/ -name "*baseconfig*"

Dumb soft linking the missing file didn't solved the problem.

How can I get the compiler use the other include directory?

  • What does pkg-config --cflags ImageMagick print on your system? On my Jessie systems, the appropriate -I flags are included already. Apr 13, 2017 at 16:16
  • -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/x86_64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 Apr 13, 2017 at 16:30

2 Answers 2


Cuneiform’s CMakeLists.txt doesn’t include libraries’ arch-specific include path. To fix this for ImageMagick, change line 40 of cuneiform_src/CMakeLists.txt from



include_directories(${ImageMagick_Magick++_INCLUDE_DIR} ${ImageMagick_Magick++_ARCH_INCLUDE_DIR})

CMake’s pkg-config integration retrieves the information correctly.


Ref. http://bazaar.launchpad.net/~jpakkane/cuneiform-linux/trunk/files

The files in cuneiform_src/ have a time stamp = 2010 or earlier. No wonder the new fancy Debian path isn't found. ( magick/magick-baseconfig.h not found ).

An easy fix : # mkdir /usr/local/include/magick

# cp /usr/include/x86_64-linux-gnu/ImageMagick-6/magick/magick-baseconfig.h /usr/local/include/magick/

... And the executable cuneiform is created.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .