这是关于雪豹的XCode 3.2.6(gcc 4.2.1)。尝试编译一个Hello World program并获得一个段错误,其崩溃报告如下所示(这是在艰难的方式中尝试学习C中的第一个例子)。任何可能解决方案的提示都会很棒。
此外,当您尝试打开或创建项目时,XCode与“+ entityForName:无法找到实体名称'DTExtensionPointDescription'的NSManagedObjectModel”崩溃。
Process: as [44911]
Path: /usr/bin/as
Identifier: as
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: i686-apple-darwin10-gcc-4.2.1 [44909]
Date/Time: 2012-06-11 08:47:14.521 -0400
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff851cdad2 rindex + 8
1 as 0x0000000100000775 0x100000000 + 1909
2 as 0x00000001000006d4 0x100000000 + 1748
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff5fbff2a0 rcx: 0x000000000000002f rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x000000000000002f rbp: 0x00007fff5fbfee40 rsp: 0x00007fff5fbfee40
r8: 0x0000000000000001 r9: 0x8080808080808080 r10: 0x00007fff8a96c169 r11: 0x00007fff851cdaca
r12: 0x00007fff5fbfee98 r13: 0x0000000000000000 r14: 0x00007fff5fbff708 r15: 0x0000000000000007
rip: 0x00007fff851cdad2 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Binary Images:
0x100000000 - 0x100002fff as ??? (???) <44A4A2BA-257C-914C-FA97-714D15FFDBE1> /usr/libexec/gcc/i686-apple-darwin10/4.2.1/as
0x7fff5fc00000 - 0x7fff5fc3be0f dyld 132.1 (???) <DD3F7F3E-8612-A7BD-F508-9EF29132C419> /usr/lib/dyld
0x7fff82f8a000 - 0x7fff82f8eff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff85191000 - 0x7fff85352fef libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69> /usr/lib/libSystem.B.dylib
这里有一些有趣的东西 - 这里是我系统中所有'as'二进制文件(和/或链接):
/Developer/usr/bin/as
/Developer/usr/libexec/gcc/darwin/i386/as
/Developer/usr/libexec/gcc/darwin/ppc/as
/Developer/usr/libexec/gcc/darwin/ppc64/as
/Developer/usr/libexec/gcc/darwin/x86_64/as
/Developer/usr/libexec/gcc/i686-apple-darwin10/4.0.1/as
/Developer/usr/libexec/gcc/i686-apple-darwin10/4.2.1/as
/Developer/usr/libexec/gcc/powerpc-apple-darwin10/4.0.1/as
/Developer/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as
/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/as
/Developer/usr/llvm-gcc-4.2/libexec/gcc/powerpc-apple-darwin10/4.2.1/as
这是i686的segfault(即使在没有输入的情况下调用)。有没有办法(一个环境变量)我可以用来告诉GCC使用x86_64架构(我在i7上,所以它应该是合适的一个)
答案 0 :(得分:1)
Hello World program的要点是确认您的编译系统正在运行,并且您知道如何使用它。
使用Hello World炸毁汇编程序非常清楚地表明您的编译系统无法正常工作。