Comment 6 for bug 1193025

Revision history for this message
David Evans (devans-n) wrote :

Just to add another comment, it would be nice to have inkscape (trunk at least) build with clang since it is Apple's preferred compiler for recent versions of Mac OS X.

In this case, however, the problem is not really with clang but the CPPFLAGS set in configure.ac in combination with the offending code. I believe that any recent compiler that understands the flags given would fail in the same way.

Using clang, trunk r12556 and ---disable-strict-build with MacPorts, the status display after configure shows

        CPPFLAGS: -Werror=format-security -DGSEAL_ENABLE -DG_DISABLE_SINGLE_INCLUDES -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/opt/local/include

and the compile fails as shown above. Removing -Werror=format-security or adding -Wno-format-security allows the build to
complete successfully although with non-fatal warnings also mentioned above.

Fixing the code would be the better solution to prevent potential vulnerabilities but I note that the same construction is used throughout the code base and so more than just this one instance is involved.

For the record, I'm building on OS X 10.8.5 with just released Xcode Version 5.0 (5A1413)

$ clang -v
Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix