Comment 9 for bug 992124

su_v (suv-lp) wrote :

1) the patch 'variable-length-array-error.diff' does not apply - I'm not sure what's wrong with the patch (all hunks fail and are rejected).
Attaching a redone version which does apply.

2) testing build on OS X 10.7.4 with (outdated) Xcode 4.3.2

$ xcodebuild -version
Xcode 4.3.2
Build version 4E2002
$ clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix

Configuration:

        Source code location: ..
        Destination path prefix: /Volumes/cyan/src/inkscape/inkscape-repo/mp-quartz-clang/inst
        Compiler: /usr/bin/clang++
        CPPFLAGS: -DG_DISABLE_DEPRECATED -DGLIBMM_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DGDKMM_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED -Werror=format-security -DGSEAL_ENABLE -DG_DISABLE_SINGLE_INCLUDES -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -DWITH_MESH -DLPE_ENABLE_TEST_EFFECTS -I/Volumes/cyan/mp-quartz/with-a-long-long-long-directory-name/include
        CXXFLAGS: -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -pipe -O2 -Wno-return-type -Wno-mismatched-tags -Wno-format-security
        CFLAGS: -Wno-pointer-sign -pipe -O2 -Wno-return-type -Wno-mismatched-tags -Wno-format-security
        LDFLAGS: -L/Volumes/cyan/mp-quartz/with-a-long-long-long-directory-name/lib

        Use gnome-vfs: yes
        Use openoffice files: yes
        Use relocation support: no
        Internal Python: skipped
        Internal Perl: skipped
        Enable LittleCms: yes
        Enable DBUS: no
        Enable Poppler-Cairo: yes
        ImageMagick Magick++: yes
        Libwpg: yes
        Libvisio: yes
        Libcdr: yes
        Doing Local Install: no
        GTK+ backend target: quartz

Compilation completes, and the resulting binary launches as expected (does find all resources etc., so that part seems to be a misconfiguration of your build, not related to clang). Further tests with regard to stability and possible regressions yet to be done.

Notes:
- no OpenMP support detected ("unknown"). That's expected AFAIU - with llvm-gcc-4.2, it's at least possible though not so stable (see bug #984836)
- Instructions/help needed with defining correct CFLAGS/CXXFLAGS
- It would be great if someone on Mountain Lion with Xcode 4.6 could test the changes and the resulting builds (personally, I'm not using the latest available versions of OS X and of Xcode (incl. clang), and have no plans to upgrade in the near future)
- PPC support: What about older versions of OS X? AFAIK Xcode 3.1.4 on Mac OS X 10.5.8 Leopard - the last version which runs on PPC arch - does not include clang. Depending on how bug #1122364 is implemented, it is likely to cut off support for PPC Macs completely (if newer GCC versions or clang are required unconditionally).