Menu

#50 Compilation fails for 0.7.5 and Hg (possibly libpng)

v1.0 (example)
open
nobody
None
5
2015-03-28
2015-03-28
No

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?

Related

Commit: <Commit _id='a9d8ace0ee2f1aab641b787d252c166373bdeddc' tree_id='142a2c0c47b2782df1db987a78c7ddd9e984c2ef' committed=I{'date': datetime.datetime(2013, 12, 29, 3, 32, 5), 'email': 'oliver@assarbad.net', 'name': 'Oliver Schneider'} authored=I{'date': datetime.datetime(2013, 12, 29, 3, 32, 5), 'email': 'oliver@assarbad.net', 'name': 'Oliver Schneider'} message='libpng 1.6.8 from upstream' parent_ids=I['c310380238fc8fc8b8f9fb3187f2c6fd290e0cb2'] child_ids=I[] repo_ids=I[ObjectId('518aa6dfe88f3d77c185c90b'), ObjectId('544facf6b9363c1575fa1ee7'), ObjectId('5547328481b24b1feca7bc45')]>

Discussion


Log in to post a comment.

MongoDB Logo MongoDB