C++11 incompatibility

Bug #1298779 reported by Dan Kegel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpng (Debian)
Fix Released
Unknown
libpng (Ubuntu)
Fix Released
High
Brian Murray

Bug Description

In Trusty beta 1, with libpng12-dev 1.2.50-1ubuntu1 installed, I can't build an app that uses libpng.
Symptom here is

/usr/include/libpng12/png.h:2661:31: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
        fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
                               ^
/usr/include/libpng12/png.h:2669:31: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
        fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
                               ^
/usr/include/libpng12/png.h:2677:31: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Werror=literal-suffix]
        fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
                               ^

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676157 for a report
from a year or so ago about the same problem. I've also seen reports
of others hitting this in Trusty, e.g.
http://farm.openttd.org/browse/OTTD-RLS-LUT32BIT-44;jsessionid=1kl6zmtb50hn3sbdsl3kvbry6

Tags: patch
Revision history for this message
Dan Kegel (dank) wrote :
Revision history for this message
Dan Kegel (dank) wrote :

ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng12/libpng-1.2.51.tar.xz appears to lack the problem.

I've attached the minimal diff against Trusty png.h to solve the problem.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "libpng1.50-cxx11.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in libpng (Debian):
status: Unknown → Confirmed
Changed in libpng (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for the patch and the bug report, I've uploaded this to trusty.

Changed in libpng (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpng - 1.2.50-1ubuntu2

---------------
libpng (1.2.50-1ubuntu2) trusty; urgency=medium

  * Add debian/patches/02-required-space.patch, thanks to Dan Kegel for the
    patch. (LP: #1298779)
 -- Brian Murray <email address hidden> Mon, 31 Mar 2014 14:20:51 -0700

Changed in libpng (Ubuntu):
status: In Progress → Fix Released
Changed in libpng (Debian):
status: Confirmed → Fix Released
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.