Page 1 of 1

Mac OS X 10.7 error: unknown attribute __alloc_size__

Posted: 2014-03-21T10:00:55-07:00
by DanKegel
Apps that use ImageMagick 6.8.8-8 fail to build on Mac OS X 10.7. The error is

In file included from radiology.C:26:
In file included from /foo/include/ImageMagick/Magick++.h:9:
In file included from /foo/include/ImageMagick/Magick++/Include.h:41:
In file included from /foo/include/ImageMagick/magick/MagickCore.h:120:
/foo/include/ImageMagick/magick/memory_.h:29:36: error: unknown attribute '__alloc_size__' ignored [-Werror,-Wattributes]
*(*AcquireMemoryHandler)(size_t) magick_alloc_size(1),
^
/foo/include/ImageMagick/magick/method-attribute.h:127:48: note: expanded from macro 'magick_alloc_size'
# define magick_alloc_size(x) __attribute__((__alloc_size__(x)))
^
$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)