Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 505 by froms...@
gmail.com: Compiling pngdec.c failes with undefined reference to png_get_chunk_malloc_max
https://bugs.chromium.org/p/webp/issues/detail?id=505What steps will reproduce the problem?
1.Trying to compile libwebp without shared libs under Ubuntu 16.04
2.Steps taken
----------------------------------------------------------------------
# lsb_release -d
Description: Ubuntu 16.04.7 LTS
# wget
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz# ac_cv_path_LIBPNG_CONFIG='/usr/bin/libpng12-config --static' LDFLAGS="-static -static-libgcc" BUILD_IMG2WEBP_TRUE=yes enable_libwebpdemux=yes enable_libwebpmux=yes ./configure --disable-shared
[...]
configure:
WebP Configuration Summary
--------------------------
Shared libraries: no
Static libraries: yes
Threading support: yes
libwebp: yes
libwebpdecoder: no
libwebpdemux: yes
libwebpmux: yes
libwebpextras: no
Tools:
cwebp : yes
Input format support
====================
JPEG : yes
PNG : yes
TIFF : yes
WIC : no
dwebp : yes
Output format support
=====================
PNG : yes
WIC : no
GIF support : yes
anim_diff : yes
gif2webp : yes
img2webp : yes
webpmux : yes
vwebp : no
webpinfo : yes
SDL support : no
vwebp_sdl : no
----------------------------------------------------------------------
# make
[...]
Making all in imageio
make[1]: Entering directory '/root/libwebp-1.2.0/imageio'
CC imageio_util.lo
CCLD
libimageio_util.la CC libimagedec_la-image_dec.lo
CC libimagedec_la-jpegdec.lo
CC libimagedec_la-metadata.lo
CC libimagedec_la-pngdec.lo
pngdec.c: In function ‘ReadPNG’:
pngdec.c:264:19: warning: implicit declaration of function ‘png_get_chunk_malloc_max’ [-Wimplicit-function-declaration]
if (data_size > png_get_chunk_malloc_max(png) && data_size < (1u << 24)) {
^
pngdec.c:264:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (data_size > png_get_chunk_malloc_max(png) && data_size < (1u << 24)) {
^
pngdec.c:265:5: warning: implicit declaration of function ‘png_set_chunk_malloc_max’ [-Wimplicit-function-declaration]
png_set_chunk_malloc_max(png, data_size);
^
CC libimagedec_la-pnmdec.lo
CC libimagedec_la-tiffdec.lo
CC libimagedec_la-webpdec.lo
CC libimagedec_la-wicdec.lo
CCLD
libimagedec.la CC libimageenc_la-image_enc.lo
CCLD
libimageenc.lamake[1]: Leaving directory '/root/libwebp-1.2.0/imageio'
Making all in man
make[1]: Entering directory '/root/libwebp-1.2.0/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/root/libwebp-1.2.0/man'
Making all in examples
make[1]: Entering directory '/root/libwebp-1.2.0/examples'
CC dwebp-dwebp.o
CC example_util.lo
CCLD
libexample_util.la CCLD dwebp
CC cwebp-cwebp.o
CCLD cwebp
../imageio/.libs/libimagedec.a(libimagedec_la-pngdec.o): In function `ReadPNG':
/root/libwebp-1.2.0/imageio/pngdec.c:264: undefined reference to `png_get_chunk_malloc_max'
/root/libwebp-1.2.0/imageio/pngdec.c:265: undefined reference to `png_set_chunk_malloc_max'
collect2: error: ld returned 1 exit status
Makefile:572: recipe for target 'cwebp' failed
make[1]: *** [cwebp] Error 1
make[1]: Leaving directory '/root/libwebp-1.2.0/examples'
Makefile:423: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
----------------------------------------------------------------------
Paths seem to be correct:
~/libwebp-1.2.0/imageio# grep -i png Makefile
libimagedec_la-pngdec.lo libimagedec_la-pnmdec.lo \
./$(DEPDIR)/libimagedec_la-pngdec.Plo \
LIBPNG_CONFIG = /usr/bin/libpng12-config --static
PNG_INCLUDES = -I/usr/include/libpng12 -DWEBP_HAVE_PNG
PNG_LIBS = -lpng12 -lz -lm
metadata.c metadata.h pngdec.c pngdec.h pnmdec.c pnmdec.h \
libimagedec_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) \
libimageenc_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) \
include ./$(DEPDIR)/libimagedec_la-pngdec.Plo # am--include-marker
libimagedec_la-pngdec.lo: pngdec.c
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libimagedec_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libimagedec_la-pngdec.lo -MD -MP -MF $(DEPDIR)/libimagedec_la-pngdec.Tpo -c -o libimagedec_la-pngdec.lo `test -f 'pngdec.c' || echo '$(srcdir)/'`pngdec.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libimagedec_la-pngdec.Tpo $(DEPDIR)/libimagedec_la-pngdec.Plo
# $(AM_V_CC)source='pngdec.c' object='libimagedec_la-pngdec.lo' libtool=yes \
# $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libimagedec_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libimagedec_la-pngdec.lo `test -f 'pngdec.c' || echo '$(srcdir)/'`pngdec.c
-rm -f ./$(DEPDIR)/libimagedec_la-pngdec.Plo
-rm -f ./$(DEPDIR)/libimagedec_la-pngdec.Plo
----------------------------------------------------------------------
What version of the product are you using? On what operating system?
1.2.0 with Ubuntu 16.04
Please provide any additional information below.
Last version I compiled successfully was 1.0.3 on the same system.
Any hints why PNG libs are not found at this compile step?
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings