mapnik-org/mapnik — Issue #770: compile fails with png 1.5.2 and clang trunk
Author: artemp
Created: 2011-10-11 08:11:34+00:00
State: closed
Labels: Core_Library

libpng 1.4.5 works fine, but after upgrading to libpng 1.5.2 I get this compile error with clang trunk:

{{{
$ clang --version
clang version 3.0 (trunk 131789)
Target: x86_64-apple-darwin10.7.0
Thread model: posix
}}}

{{{
In file included from bindings/python/mapnik_image.cpp:37:
include/mapnik/png_io.hpp:91:18: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp((*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))))
^~~~~~~~~~~~~~~~~~
/Library/Frameworks/UnixImageIO.framework/unix/include/png.h:985:19: note: candidate function not viable: no known conversion from 'void (int *, int)' to 'png_longjmp_ptr' (aka 'void (*)(int *, int) __attribute__((noreturn))') for 2nd argument
extern jmp_buf* ( png_set_longjmp_fn) (png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size);
^
In file included from bindings/python/mapnik_image.cpp:1:
In file included from bindings/python/mapnik_image.cpp:37:
include/mapnik/png_io.hpp:240:18: error: no matching function for call to 'png_set_longjmp_fn'
if (setjmp((*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))))
^~~~~~~~~~~~~~~~~~
/Library/Frameworks/UnixImageIO.framework/unix/include/png.h:985:19: note: candidate function not viable: no known conversion from 'void (int *, int)' to 'png_longjmp_ptr' (aka 'void (*)(int *, int) __attribute__((noreturn))') for 2nd argument
extern jmp_buf* ( png_set_longjmp_fn) (png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size);
^
2 errors generated.
}}}