Clang: error: failed to execute command: segmentation error: 11

Sorry for my English. I have a problem with clang when I install json gem. I have xcode, xcode comand line tools, etc. I cannot find the problem in stackoverflow, google, and I have no idea. I have Mavericks 10.9.4 with xcode 6.1. I tried everything I found on stackoverflow, google. Magazine:

Building native extensions.  This could take a while...
ERROR:  Error installing json:
ERROR: Failed to build gem native extension.

/Users/terrry/.rvm/rubies/ruby-2.0.0-p576/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
Stack dump:
0.  Program arguments:    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -triple x86_64-apple-macosx10.7.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name generator.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 241.9 -coverage-file /Users/terrry/.rvm/gems/ruby-2.0.0-p576/gems/json-1.8.1/ext/json/ext/generator/generator.o -resource-dir  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0 -D JSON_GENERATOR -D _XOPEN_SOURCE -D _DARWIN_C_SOURCE -D _DARWIN_UNLIMITED_SELECT -D _REENTRANT -I . -I /Users/terrry/.rvm/rubies/ruby-2.0.0-p576/include/ruby-2.0.0/x86_64-darwin13.4.0 -I /Users/terrry/.rvm/rubies/ruby-2.0.0-p576/include/ruby-2.0.0/ruby/backward -I /Users/terrry/.rvm/rubies/ruby-2.0.0-p576/include/ruby-2.0.0 -I . -I /Users/travis/.sm/pkg/active/include -O3 -fdebug-compilation-dir /Users/terrry/.rvm/gems/ruby-2.0.0-p576/gems/json-1.8.1/ext/json/ext/generator -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.7.0 -fencode-extended-block-signature -fno-common -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o generator.o -x c generator.c 
1.<eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'generator.c'.
4.  Running pass 'X86 DAG->DAG Instruction Selection' on function '@cState_initialize'
 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 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
 Target: x86_64-apple-darwin13.1.0
 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: note: diagnostic msg: 
   ********************

    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang: note: diagnostic msg:/var/folders/6g/
     z_zh4w3n1vddfmvbct9205600000gn/T/generator-4b740d.c
    clang: note: diagnostic msg: /var/folders/6g/z_zh4w3n1vddfmvbct9205600000gn/T/generator- 4b740d.sh
  clang: note: diagnostic msg: 

   ********************
   make: *** [generator.o] Error 254

   make failed, exit code 2

   Gem files will remain installed in /Users/terrry/.rvm/gems/ruby-2.0.0-p576/gems/json-1.8.1 for inspection.
   Results logged to /Users/terrry/.rvm/gems/ruby-2.0.0-p576/extensions/x86_64-darwin-13/2.0.0-static/json-1.8.1/gem_make.out
+4
source share
1 answer

According to clang, I got a similar error while compiling a .c file that was longer than the maximum length allowed by the C99 standard: 4095 characters. The error message here is not very helpful.

0
source

All Articles