| Summary: | SDL_image fails to load an image with libpng-compat installed | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | David North <bigchimp2005> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | bigchimp2005, yaohan.chen |
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
config.log with both libpng 1.2 and 1.6 installed, default configure options
config.log with both libpng 1.2 and 1.6 installed, --disable-png-shared config.log with libpng 1.6 installed, and without libpng 1.2 installed |
||
|
Description
David North
2013-01-09 13:38:25 UTC
Can you download the source and send me the output of configure with and without libpng-compat installed? My guess is that it's finding newer libpng headers, and finding the old png library and using that as the one to load. Created attachment 1182 [details]
config.log with both libpng 1.2 and 1.6 installed, default configure options
Created attachment 1183 [details]
config.log with both libpng 1.2 and 1.6 installed, --disable-png-shared
Created attachment 1184 [details]
config.log with libpng 1.6 installed, and without libpng 1.2 installed
I also have this problem on Arch Linux. I have the following library files owned by the libpng 1.6 and 1.2 packages:
libpng 1.6
/usr/lib/libpng.so
/usr/lib/libpng16.so
/usr/lib/libpng16.so.16
/usr/lib/libpng16.so.16.2.0
libpng 1.2
/usr/lib/libpng.so.3
/usr/lib/libpng.so.3.50.0
/usr/lib/libpng12.so
/usr/lib/libpng12.so.0
/usr/lib/libpng12.so.0.50.0
With both packages installed, configure will by default generate both -lpng and -lpng.so.3. With both packages installed and --disable-png-shared, configure will generate only -lpng, which produces a working build for me. With libpng 1.2 removed, it also produces a working build.
The problem seems to be due to in lines 218 to 226 of configure.in:
png_lib=[`find_lib "libpng.so.[0-9]"`]
if test x$png_lib = x; then
png_lib=[`find_lib "libpng.so.[0-9]*"`]
fi
if test x$png_lib = x; then
png_lib=[`find_lib "libpng*.so.[0-9]"`]
fi
if test x$png_lib = x; then
png_lib=[`find_lib "libpng*.so.[0-9]*"`]
fi
This matches libpng.so.3 but not ligpng.so. Maybe this is not even necessary since another part of configure uses pkg-config to get flags for libpng 1.6 correctly.
Okay, this should be fixed. http://hg.libsdl.org/SDL_image/rev/2608ba5feac1 Please let me know if this doesn't work or breaks something else. Thanks! |