System:
Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64
zlib1g-dev 1:1.2.8.dfsg-2+b1 (installed from the repository)
libpng 1.6.16-1 (from libpng.org, compiled with configure, make, make install)
optipng snapshot
Tree [a9d8ac] (offered as the Hg dev version as of 2015-03-27)
Same applies to version 0.7.5 stable.
./configure:
./configure -with-system-libs
make log:
— Hg version:
...
gcc -s -o optipng optipng.o strconv.o ../opnglib/libopng.a ../opngreduc/libopngreduc.a ../pngxtern/libpngxtern.a ../gifread/libgifread.a ../pnmio/libpnmio.a ../minitiff/libminitiff.a -lpng -lz -lm
../opnglib/libopng.a(codec.o): In function opng_write_data':
codec.c:(.text+0xed): undefined reference topng_get_io_state'
../opnglib/libopng.a(codec.o): In function opng_read_data':
codec.c:(.text+0x618): undefined reference topng_get_io_state'
../opnglib/libopng.a(codec.o): In function opng_copy_png':
codec.c:(.text+0x139a): undefined reference topng_write_sig'
collect2: error: ld returned 1 exit status
Makefile:87: recipe for target 'optipng' failed
make[1]: *** [optipng] Error 1
— 0.7.5 version:
...
gcc -s -o optipng optipng.o optim.o bitset.o ratio.o osys.o wildargs.o ../opngreduc/libopngreduc.a ../pngxtern/libpngxtern.a ../gifread/libgifread.a ../pnmio/libpnmio.a ../minitiff/libminitiff.a -lpng -lz -lm
optim.o: In function opng_copy_file':
optim.c:(.text+0x5d8): undefined reference topng_write_sig'
optim.o: In function opng_read_data':
optim.c:(.text+0x908): undefined reference topng_get_io_state'
optim.o: In function opng_write_data':
optim.c:(.text+0x2723): undefined reference topng_get_io_state'
collect2: error: ld returned 1 exit status
Makefile:99: recipe for target 'optipng' failed
make[1]: *** [optipng] Error 1
If I do not use system libs and just ./configure and make, it works! It is libpng 1.6.16 that is broken? On Ubuntu 14.10 with hand-compiled libpng 1.6.16, it used to work. After I had installed Linux Mint Debian Betsy and compiled the same version of libpng, it just broke. What might be wrong?