Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UBUNTU][DOCKER] MagickWand shared library not found. #655

Open
Akado2009 opened this issue Apr 8, 2024 · 2 comments
Open

[UBUNTU][DOCKER] MagickWand shared library not found. #655

Akado2009 opened this issue Apr 8, 2024 · 2 comments

Comments

@Akado2009
Copy link

Akado2009 commented Apr 8, 2024

Hi,

trying to run a wand application in docker container.
Below if the installation processed of ImageMagick:

RUN apt-get update ${APT_UPDATE_OPTIONS} \
    && apt-get install ${APT_INSTALL_OPTIONS} -y \
        build-essential \
        git \
        autoconf \
        libde265-dev \
        libdjvulibre-dev \
        libfftw3-dev \
        libghc-bzlib-dev \
        libgoogle-perftools-dev \
        libgraphviz-dev \
        libgs-dev \
        libheif-dev \
        libjbig-dev \
        libjemalloc-dev \
        libjpeg-dev \
        liblcms2-dev \
        liblqr-1-0-dev \
        liblzma-dev \
        libopenexr-dev \
        libopenjp2-7-dev \
        libpango1.0-dev \
        libraqm-dev \
        libraw-dev \
        librsvg2-dev \
        libtiff-dev \
        libwebp-dev \
        libwmf-dev \
        libxml2-dev \
        libzip-dev \
        libzstd-dev \
        libltdl-dev \
        libperl-dev

RUN git clone --depth 1 --branch 6.9.10-54 https://github.com/ImageMagick/ImageMagick6.git \
    && cd ImageMagick6 \
    && ./configure --prefix="/usr/" \
        --with-modules=yes \
        -disable-opencl \
        --with-ltdl=no \
        --with-bzlib=yes \
        --with-dps=yes \
        --with-fftw=yes \
        --with-flif=yes \
        --with-fontconfig=yes \
        --with-fpx=yes \
        --with-freetype=yes \
        --with-gslib=yes \
        --with-gvc=yes \
        --with-heic=yes \
        --with-jbig=yes \
        --with-jemalloc=yes \
        --with-jpeg=yes \
        --with-jxl=yes \
        --with-lcms=yes \
        --with-lqr=yes \
        --with-lzma=yes \
        --with-magick-plus-plus=yes \
        --with-openexr=yes \
        --with-openjp2=yes \
        --with-pango=yes \
        --with-perl=yes \
        --with-png=yes \
        --with-raqm=yes \
        --with-raw=yes \
        --with-rsvg=yes \
        --with-tcmalloc=yes \
        --with-tiff=yes \
        --with-webp=yes \
        --with-wmf=yes \
        --with-x=yes \
        --with-xml=yes \
        --with-zip=yes \
        --with-zlib=yes \
        --with-zstd=yes \
        --with-gcc-arch=native \
    && make -j 8 \
    && make install \
    && ldconfig /usr/lib

/usr/lib looks fine in terms of so file. All the binaries are good (e.g. mogrify, convert).
image

Wand version is Wand==0.6.13.
When I run without MAGICK_HOME, I get the follow error:
image

if you set MAGICK_HOME=/usr, you get the following one:
image

Feels kinda awkward, since some of the paths the app is trying to look for are actually present.

Also all binaries are properly linked:
image

Any way I can actually run my app?

@anthonyhughes
Copy link

I'm having the same issue. ubuntu:20.04 docker image.

@emcconville
Copy link
Owner

Remove --with-tcmalloc=yes & --with-jemalloc=yes flags when compiling ImageMagick from source. In fact, add --without-jemalloc / --without-tcmalloc to ensure they don't get used. Those are all customized memory allocators that will not work in a docker/ubuntu/python runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants