It does not work nor compile with >=media-gfx/imagemagick-6.9.6 since 2016. Today I needed OCR program, so I can confirm, that with media-gfx/graphicsmagick (1.3.30) Cuneiform just works :-) (after re-emerging with USE=graphicsmagick) Conclusion: remove Imagemagick support with remark in ebuild file, so nobody will even ever try to add it back.
it compiles perfectly for me with: media-gfx/imagemagick-7.0.8.23:0/7.0.8.23::gentoo USE="X bzip2 cxx djvu jpeg lcms lzma openmp pango perl png raw svg tiff truetype xml zlib -corefonts -fftw -fontconfig -fpx -graphviz -hdri -heif -jbig -jpeg2k -lqr (-opencl) -openexr -postscript -q32 -q8 -static-libs -test -webp -wmf" 0 KiB Please provide the build.log and emerge --info output, maybe imagemagick needs to be compiled with some USE enabled
I'm really sorry: forget about it, make this bug non-existent. It was my broken system... Now Cuneiform compiles both with Image- and Graphics-magick.