libpng needs update on x86_64

Bug #1348144 reported by Torbjörn Rathsman
This bug report is a duplicate of:  Bug #1524328: libpng 1.6 transition. Edit Remove
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libpng (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Libpng needs to be updated to a later version than version 1.2 on x86_64. The reason is that version 1.2 assumes sizeof(unsigned long int)==4, which is not true on Linux x86_64

Message from GCC:

error: cannot convert 'uint32_t* {aka unsigned int*}' to 'png_uint_32* {aka long unsigned int*}' for argument '3' to 'png_uint_32 png_get_pHYs(png_structp, png_infop, png_uint_32*, png_uint_32*, int*)'
     , &res_x, &res_y,&unit);

In version 1.6 (I use that version when compiling on windows)

#if INT_MIN < -2147483646 && INT_MAX > 2147483646
   typedef int png_int_32;
#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
   typedef long int png_int_32;
#else
# error "libpng requires a signed 32 bit (or more) type"
#endif

#if UINT_MAX > 4294967294
   typedef unsigned int png_uint_32;
#elif ULONG_MAX > 4294967294
   typedef unsigned long int png_uint_32;
#else
# error "libpng requires an unsigned 32 bit (or more) type"
#endif

Clearly, this bug is fixed in version 1.6.

I could install my own libpng, but since this is a very central library I feel that it could be risky and I do not have time to recompile the hole system just for an old library. Suggestion: Fix this for version 14.10 (it strange that a newer libpng did not enter 14.04 LTS)

affects: ubuntu-system-settings (Ubuntu) → libpng (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

that's the version in Debian as well, https://packages.qa.debian.org/libp/libpng.html

tags: added: upgrade-software-version
Changed in libpng (Ubuntu):
importance: Undecided → Low
Revision history for this message
Torbjörn Rathsman (milasudril) wrote :

The present typedef change would really break the ABI on x86_64 so the entire system needs to be compiled with the new header.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libpng (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.