On Fedora 33, I'm trying to compile ImageMagic from git.
libx265 and libheif are installed from the Fedora fusion repos, along with their -devel packages.
When running ./configure --prefix=$HOME --program-prefix=p_ I get these reports:
HEIC --with-heic=yes yes
...
LIBS = -ljbig -ltiff -lfreetype -lraqm -lfreetype -ljpeg -llqr-1 -lglib-2.0 -lpng16 -lz -lfftw3 -lfontconfig -lfreetype -lheif -lwebpmux -lwebpdemux -lwebp -lwebp -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lIlmImf -lImath -lHalf -lIex -lIexMath -lIlmThread -pthread -lopenjp2 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo -lxml2 -lz -lz -lm -lpthread
...
DELEGATES = bzlib fftw fontconfig freetype heic jbig jng jpeg lqr lzma openexr openjp2 pango png ps raqm tiff video webp x xml ziplib zlib zstd
After compiling the binary is linked to the wrong libx265.so, though:
% ./p_magick --version
./p_magick: error while loading shared libraries: libx265.so.169: cannot open shared object file: No such file or directory
ldd on the binary (p_magic in my case) reveals:
libx265.so.169 => not found
(The compiling process is the standard ./configure, make, make install)
This is confusing to me, because libx265.so is installed:
% ll /usr/lib64/libx265*
lrwxrwxrwx 1 root root 14 08-19 03:29 /usr/lib64/libx265.so -> libx265.so.192*
-rwxr-xr-x 1 root root 4.6M 08-19 03:29 /usr/lib64/libx265.so.192*
-rwxr-xr-x 1 root root 5.6M 08-19 03:29 /usr/lib64/libx265_main10.so.192*
-rwxr-xr-x 1 root root 5.5M 08-19 03:29 /usr/lib64/libx265_main12.so.192*
For some reason, p_magick is linked to libx265.so.169 but on my system, libx265.so.192 is installed, I don't quite see how it could be linked to the wrong library, also, I'm struggling to find a mention of libx265 anywhere in the ImageMagick codebase (I've grep-ed for it, etc.).
That's why I'm pretty sure the error is not with ImageMagick, but with my system configuration, but I'm not sure where to start.
Addendum
I've deleted /etc/ld.so.cache and re-created the cache with ldconfig.
ldconfig -p shows:
# ldconfig -p | grep libx265
libx265_main12.so.192 (libc6,x86-64) => /lib64/libx265_main12.so.192
libx265_main10.so.192 (libc6,x86-64) => /lib64/libx265_main10.so.192
libx265.so.192 (libc6,x86-64) => /lib64/libx265.so.192
libx265.so (libc6,x86-64) => /lib64/libx265.so
The link inside /lib64 also seems to be correct:
# ll /lib64/libx265.so
lrwxrwxrwx 1 root root 14 Aug 19 03:29 /lib64/libx265.so -> libx265.so.192
The error still persists, though.