Compiler crash on 10.7

Mojca Miklavec mojca at macports.org
Tue Mar 1 07:35:02 PST 2016


Hi,

I figured out that compiling wxWidgets 3.1.0 crashes on 10.7 when
using the default compiler.

Minimal example:
(from <https://github.com/wxWidgets/wxWidgets/blob/8e3a31739237b0920c736a101d0ab8aa85dcce5a/include/wx/defs.h#L382>;
please check to get a better picture if you plan to reply)

int main()
{
    // it works if I put "#if 1" here
    #if defined(__GNUC__) && !defined(__clang__)
        #define wx_has_cpp11_include(h) 0
    #else
        // this one is used
        #define wx_has_cpp11_include(h) __has_include(h)
    #endif

    // compiler crashes here
    #if wx_has_cpp11_include(<unordered_map>)
        #define HAVE_STD_UNORDERED_MAP
    #endif

    return 0;
}

The question is: should I bother upstream (wxWidgets) with trying to
circumvent the problem? It probably makes no sense to report the
compiler problem to anyone (clang/apple developers) as it is most
likely fixed already (clang-3.4 works just fine).

In the package I can simply blacklist the broken compiler.

Mojca


> clang++ test.cpp
0  clang 0x0000000100c57bb2 main + 12932498
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.0 -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name test.cpp -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 136 -resource-dir /usr/bin/../lib/clang/4.2
-fmodule-cache-path
/var/folders/c8/jhr11xwx2r9c_52q6hq1s4l00000gn/T/clang-module-cache
-fdeprecated-macro -fdebug-compilation-dir /tmp/mp -ferror-limit 19
-fmessage-length 184 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/c8/jhr11xwx2r9c_52q6hq1s4l00000gn/T/test-VGCLwa.o -x c++
test.cpp
1. test.cpp:10:6: current parser token 'if'
2. test.cpp:2:1: parsing function body 'main'
3. test.cpp:2:1: in compound statement ('{}')
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to
see invocation)
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://developer.apple.com/bugreporter/ and include the crash
backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).


More information about the macports-dev mailing list