2015-11-04 18:03 GMT+01:00 Papoj Thamjaroenporn <pt2277@...3110...>:
Dear Inkscape-devel,
I became tired of seeing these same warning messages over and over again whenever I compile and debug the code:
/opt/local/include/gc/gc.h:804:23: warning: unknown attribute '__alloc_size__' ignored [-Wunknown-attributes] GC_API GC_ATTR_MALLOC GC_ATTR_ALLOC_SIZE(1) void * GC_CALL
It would be best if libgc was fixed so that it defined GC_ATTR_ALLOC_SIZE to nothing when it detects clang.
../trunk/configure --prefix=YOUR_BUILD_DIRECTORY --disable-static --enable-shared CC="clang" CXX="clang++" CXXFLAGS="-std=c++11 -stdlib=libc++ -I/opt/local/include -Wno-unknown-attributes" CPPFLAGS="-I/opt/local/include -U__STRICT_ANSI__ -Wno-unknown-attributes"
You only need the parameter in CPPFLAGS. (CPPFLAGS stands for "C preprocessor flags", but in practice it means flags common to C and C++ files.)
If I re-configure the build, do I have to run "make install" again before "make -j 4"?
No, you need to run "make install" only after "make -jN".
I’m also not sure if globally suppressing this kind of warning is recommended. I have not seen this kind of warning other than this, and I couldn’t even find its definition on the official Clang documentation. If this is not recommended, does anyone know how I can specifically suppress this particular warning?
Attributes are often compiler-specific, so specifying -Wno-unknown-attributes globally may be a reasonable idea. Is anyone against this?
Regards, Krzysztof