I'm struggling to make ImageMagick convert images with XMP Profile.
I use such ImageMagick build in AWS lambda (python). Here's how I assemble it:
In Dockerfile I have:
RUN yum install -y git gcc gcc-c++ cpp python-devel cpio make cmake cmake3 build-essential pkg-config automake autoconf chkconfig clang clang-libs dos2unix zlib zlib-devel zip unzip tar perl libxml2 libxml2-devel bzip2 bzip2-libs xz xz-libs pkgconfig libtool
The script which builds ImageMagick itself:
#!/usr/bin/env bash
#set -e
cd /layer
curl https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-23.tar.gz -L -o tmp-imagemagick.tar.gz
tar xf tmp-imagemagick.tar.gz
cd ImageMagick*
PKG_CONFIG_PATH=/layer/build/cache/lib/pkgconfig \
./configure \
CPPFLAGS=-I/layer/build/cache/include \
LDFLAGS="-L/layer/build/cache/lib -lstdc++" \
--disable-dependency-tracking \
--disable-shared \
--enable-static \
--prefix=/layer/result \
--enable-delegate-build \
--disable-installed \
--without-modules \
--disable-docs \
--with-xml=yes \
--without-magick-plus-plus \
--without-perl \
--without-x \
--disable-openmp
make clean
make all
make install
ldconfig -v /usr/local/lib
ldconfig -v /usr/lib64
I try to execute command: ./magick convert myImage.jpeg output.json
(which works OK with images without XMP Profile)
As a result I get an error:
libxml2.so.2: cannot open shared object file: No such file or directory
Please advise
echo $LD_LIBRARY_PATH
andfind / -name libxml2.so.2 2> /dev/null
magick -version
show for your delegates. Does it list xml? Third post an example image for which you are having this issue.