[tex-live] test 20051021: mips-irix pdfetex dumps core on png images

Nelson H. F. Beebe beebe at math.utah.edu
Fri Oct 21 22:47:24 CEST 2005


>> I should test this as I use a system libpng to link statically against.
>> Any set of files I can download somewhere which might fail?

I don't have any test files beyond those in the libpng distributions
(I'm ignoring libz issues for now: let's figure out first whether the
bug is in libpng or libz).

Here is a simple test file that you can use on your system(s):

% cat pngver.c
/***********************************************************************
Report PNG header file and library version numbers and strings:

Usage:
	cc  -I/usr/local/include pngver.c -L/usr/local/lib -R/usr/local/lib -lpng && ./a.out
	gcc -I/usr/local/include pngver.c -L/usr/local/lib -Wl,rpath=/usr/local/lib -lpng && ./a.out
	cc pngver.c -lpng && ./a.out

[21-Oct-2005]
***********************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <png.h>

int
main(int argc, char* argv[])
{
    (void)printf("png.h  version number = %lu.%lu.%lu\n",
		 (unsigned long)PNG_LIBPNG_VER_MAJOR,
		 (unsigned long)PNG_LIBPNG_VER_MINOR,
		 (unsigned long)PNG_LIBPNG_VER_RELEASE);
    (void)printf("png.h  version string = %s\n\n", PNG_HEADER_VERSION_STRING);
    (void)printf("libpng version number = %lu\n", png_access_version_number());
    (void)printf("libpng version string = %s\n", png_get_header_version(NULL));

    return (EXIT_SUCCESS);
}

On one local system running Sun Solaris 10, I get this:

	% cc -I/usr/local/include pngver.c -L/usr/local/lib -R/usr/local/lib -lpng && ./a.out
	png.h  version number = 1.2.8
	png.h  version string =  libpng version 1.2.8 - December 3, 2004 (header)

	libpng version number = 10208
	libpng version string =  libpng version 1.2.8 - December 3, 2004 (header)

Shared libraries are a nuisance, because the Unix linker fails to
record library locations in the executables unless the -R or
-Wl,-rpath options are given (and compilers do not agree about which
of those two is acceptable).

The same executable can give different answers, depending on which
library version is used at run time, which in turn depends on the
LD_LIBRARY_PATH environment variable, and on GNU/Linux systems, the
contents of /etc/ld.so.conf (Sun Solaris has a similar mechanism, but
we refuse to use it): thus, it may work for one user, and fail for
another, on exactly the same set of input data.

-------------------------------------------------------------------------------
- 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 tex-live mailing list