Opened 10 years ago

Closed 10 years ago

#42571 closed defect (fixed)

libpng headers are invalid with older versions of clang

Reported by: jeremyhu (Jeremy Huddleston Sequoia) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: haspatch Cc: cooljeanius (Eric Gallager), dbevans (David B. Evans)
Port: libpng

Description

https://sourceforge.net/p/libpng/bugs/220/

/opt/local/include/libpng16/pngconf.h:379:26: error: token is not a valid binary operator in a preprocessor subexpression
if __has_extension(attribute_unavailable_with_message)

This occurred when building gimp2 using the version of clang in the Xcode 3.2.6 for Snow Leopard:

$ /usr/bin/clang --version
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix

For compatibility, please add:

#ifndef __has_extension
#define __has_extension(x) 0
#endif

Change History (4)

comment:1 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 10 years ago by dbevans (David B. Evans)

Cc: devans@… added

Confirming that this problem effects all versions of gimp2 (gimp2, gimp2-devel, gimp3-devel), gegl (gegl gegl-devel) and probably any dependent that includes <png.h>.

Upstream patch in response to issue 220 can be found here: http://sourceforge.net/p/libpng/code/ci/dd6679dce8e03e8874ca758440b51c50d11d9890/

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added
Status: newassigned

Testing now; will commit shortly.

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.