gen2brain / cbconvert

CBconvert is a Comic Book converter
GNU General Public License v3.0
202 stars 14 forks source link

fatal error: MagickWand/MagickWand.h: No such file or directory #23

Closed kianmeng closed 10 months ago

kianmeng commented 10 months ago

Env:

$ go version
go version go1.18 gccgo (Ubuntu 13.2.0-4ubuntu3) 13.2.0 linux/amd64

Steps to reproduce:

git clone https://github.com/gen2brain/cbconvert
cd cbconvert
go build
...
# gopkg.in/gographics/imagick.v3/imagick
/home/foobar/go/pkg/mod/gopkg.in/gographics/imagick.v3@v3.4.3/imagick/affine_matrix.go:8:10: fatal error: MagickWand/MagickWand.h: No such file or directory
    8 | #include <MagickWand/MagickWand.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Extras:

$ apt-file search MagickWand.h
imagemagick-6-doc: /usr/share/doc/imagemagick-6-common/html/www/api/MagickWand/struct__MagickWand.html
libmagickwand-6-headers: /usr/include/ImageMagick-6/wand/MagickWand.h

$ sudo apt install libmagickwand-6-headers
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libmagickwand-6-headers is already the newest version (8:6.9.11.60+dfsg-1.6ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded
gen2brain commented 10 months ago

The requirements are clearly stated in the README. You are missing ImageMagick7 libraries and headers.

gen2brain commented 10 months ago

You have an example of how to build on distros with old IM in GitHub actions https://github.com/gen2brain/cbconvert/blob/master/.github/workflows/test.yml.