Magick++

Everything related to the development of modules in jamovi
Post Reply
nicrobe
Posts: 2
Joined: Sat Apr 27, 2024 10:45 am

Magick++

Post by nicrobe »

I'm trying to develop a module using the 'summarytools' package. This package has a dependency on the 'magick' package. While building the module, I get the following error :

Code: Select all

Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Magick++' not found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the Magick++ library. Try installing:
 - deb: libmagick++-dev (Debian, Ubuntu)
 - rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL)
 - csw: imagemagick_dev (Solaris)
 - brew imagemagick@6 (MacOS)
If Magick++ is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: erreur fatale: Magick++.h : Aucun fichier ou dossier de ce type
compilation terminée.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘magick’
I also got this error when I installed 'summarytools' on my usual R installation (Ubuntu OS) and I managed to solve it by installing libmagick++-dev. But inside Jamovi, I don't know if there is a way to install libmagick++-dev. Would you have any advice about it ?
User avatar
jonathon
Posts: 2644
Joined: Fri Jan 27, 2017 10:04 am

Re: Magick++

Post by jonathon »

hi, yes, packages that rely on OS libraries are a bit tricky with the flatpak.

the flatpak is designed to isolate the program from the host operating system, so installing libmagick++-dev into the host won't help unfortunately.

sometimes R packages provide an alternative, so V8 for example allows you to download the library it uses (Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1)), however it doesn't look like magick has this option.

there's an even chance that the parts of summarytools you want to use won't even touch the magick package ... which makes it even more annoying.

this won't be a problem under windows or macOS.

jonathon
Post Reply