libheif icon indicating copy to clipboard operation
libheif copied to clipboard

cannot find -lpng15

Open ABetterCat opened this issue 1 year ago • 3 comments

centos 7.x cd /tmp && \ tar zvxf libheif-${LIBHEIF_VERSION}.tar.gz && \ cd /tmp/libheif-${LIBHEIF_VERSION} && \ ./configure --prefix=/vips && \ make && \ make install When i installed it returns [2022-09-28 10:33:12] /bin/sh ../libtool --tag=CXX --mode=link g++ -I.. -I../. -I/usr/include/libpng15 -g -O2 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -o heif-convert heif_convert-encoder.o heif_convert-heif_convert.o heif_convert-encoder_y4m.o heif_convert-encoder_png.o ../libheif/libheif.la -lpng15 -lpthread [2022-09-28 10:33:12] libtool: link: g++ -I.. -I../. -I/usr/include/libpng15 -g -O2 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -o .libs/heif-convert heif_convert-encoder.o heif_convert-heif_convert.o heif_convert-encoder_y4m.o heif_convert-encoder_png.o ../libheif/.libs/libheif.so -lpng15 -lpthread -Wl,-rpath -Wl,/vips/lib [2022-09-28 10:33:12] /home/opt/compiler/gcc-8.2/bin/../lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpng15

ABetterCat avatar Sep 28 '22 02:09 ABetterCat

Have you done dnf install libpng-devel? (Or yum install libpng-devel if CentOS 7 hadn't switched to dnf yet.) You'll need pthread library as well, which is part of glibc-devel package if you haven't installed that yet.

silverbacknet avatar Sep 28 '22 03:09 silverbacknet

I have installed it.

ABetterCat avatar Sep 28 '22 04:09 ABetterCat

Something's funky with your build environment then, since 15 is the libpng supplied with CentOS 7. Hm. What is the result of ls /usr/lib64/libpng*? libpng15.so.15.something should appear there. If it does, try modifying the makefile to use --verbose on the ld command, and see where it's looking for libpng. (Or just run the command as shown with --verbose appended.)

silverbacknet avatar Sep 28 '22 05:09 silverbacknet