[tlbuild] libpng16
Nelson H. F. Beebe
beebe at math.utah.edu
Mon Feb 3 01:23:05 CET 2020
Elad Lahav <e2lahav at gmail.com> reports on Sun, 2 Feb 2020 14:54:08
-0500 that on QNX, -lpng maps to libpng16.*, but the symbols in that
library are prefixed with png16_ instead of png_.
I checked on an Ubuntu 20.04 system, which has
/usr/lib/x86_64-linux-gnu/libpng16.so.16.37.0, and all of its symbols
(reported with "nm -D ... | grep ' T '") have the prefix png_.
Is there a system header file on QNX that would map the nonstandard
png16_ prefix back to png_?
If not, then you may have to build your own version of that library
from source code. Fortunately, libpng builds almost everywhere
without problems, so that should be easy: build a libpng16.a file, and
hide the libpng16.so* files, so that your linking does not refer to a
nonstandard shared library.
The official PNG download location is at
https://sourceforge.net/projects/libpng/files/latest/download
I just grabbed the latest version, libpng-1.6.37.tar.xz, unpacked it
on a CentOS 7.7.1908 x86_64 server, and in its directory, ran
./configure --prefix=$prefix libdir=$prefix/lib64 && \
make all check && make install
All 33 tests passed.
That installed these files in $prefix/lib64:
-rw-r--r-- 1 1494898 Feb 2 17:17 libpng16.a
-rw-r--r-- 1 1494898 Feb 2 17:17 libpng.a
-rwxr-xr-x 1 863696 Feb 2 17:17 libpng16.so.16.37.0
-rwxr-xr-x 1 863696 Feb 2 17:17 libpng16.so.16
-rwxr-xr-x 1 863696 Feb 2 17:17 libpng16.so
-rwxr-xr-x 1 863696 Feb 2 17:17 libpng.so
-rwxr-xr-x 1 940 Feb 2 17:18 libpng16.la
-rwxr-xr-x 1 940 Feb 2 17:18 libpng.la
All external symbols are properly prefixed "png_".
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe at math.utah.edu -
- 155 S 1400 E RM 233 beebe at acm.org beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
More information about the tlbuild
mailing list.