fails to build with imagemagick 7
As noted in Debian bug report #1079348 , imagemagick v7 release contains breaking changes. Making Converseen failing to build, first issue is: /usr/bin/c++ -[...] -I/usr/include/ImageMagick-7 [...] -g -O2 [...] -std=gnu++17 -Wall -std=c++17 -fPIC -fPIC -MD -MT CMakeFiles/converseen.dir/src/dialogshowupdatemsg.cpp.o -MF CMakeFiles/converseen.dir/src/dialogshowupdatemsg.cpp.o.d -o CMakeFiles/converseen.dir/src/dialogshowupdatemsg.cpp.o -c converseen-0.12.2.4/src/dialogshowupdatemsg.cpp In file included from /usr/include/ImageMagick-7/Magick++/Include.h:16, from /usr/include/ImageMagick-7/Magick++.h:12, from converseen-0.12.2.4/src/globals.h:28, from converseen-0.12.2.4/src/globals.cpp:26: /usr/include/ImageMagick-7/MagickCore/magick-config.h:25:10: fatal error: MagickCore/magick-baseconfig.h: No such file or directory 25 | #include "MagickCore/magick-baseconfig.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
Hi,
Converseen does not directly include the header file MagickCore/magick-baseconfig.h.
The error seems to indicate that the header file MagickCore/magick-baseconfig.h cannot be found by /usr/include/ImageMagick-7/MagickCore/magick-config.h.
I investigated the issue on a virtual machine running Debian, where I installed the unstable packages for ImageMagick-7.
The problem appears to be that the magick-baseconfig.h file is located in /usr/include/x86_64-linux-gnu/ImageMagick-7/MagickCore rather than in the expected directory with the other header files /usr/include/ImageMagick-7/MagickCore.
By creating a symbolic link from /usr/include/x86_64-linux-gnu/ImageMagick-7/MagickCore/magick-baseconfig.h to /usr/include/ImageMagick-7/MagickCore/magick-baseconfig.h, I was able to compile the program successfully:
- Here is the command I ran:
ln -s /usr/include/x86_64-linux-gnu/ImageMagick-7/MagickCore/magick-baseconfig.h /usr/include/ImageMagick-7/MagickCore/magick-baseconfig.h
Since I’m not a Debian user, I'm unsure whether this is a packaging error, meaning the file MagickCore/magick-baseconfig.h was installed in the wrong directory, or if the issue lies with CMake's FindImageMagick module, which might be failing to detect the correct location of MagickCore/magick-baseconfig.h.