Bug #5701

Compilation under Lion with clang 2.1 fails

Added by Cake Pie over 2 years ago. Updated about 2 years ago.

[ruby-core:41458]
Status:Rejected
Priority:Low
Assignee:-
Category:build
Target version:1.9.3
ruby -v:1.9.3-p0 Backport:

Description

New MacBook Air, installed Xcode 4.2 through Appstore, never had gcc installed. I have not compiled anything else, modified my environment, or any special setup. It's a brand new machine.

Same issue on my iMac, which has been upgraded from Leopard to Lion and Xcode 4.2.

Ruby 1.9.3-p0 (http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz)

I did configure it with "--with-gcc=clang".

Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.2.0
Thread model: posix

Attached "make" output and crash report.





CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration  -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I. -I.ext/include/x86_64-darwin11.2.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace  
SOLIBS = 

compiling main.c
compiling dmydln.c
compiling dmyencoding.c
compiling version.c
compiling dmyversion.c
compiling miniprelude.c
compiling array.c
compiling bignum.c
compiling class.c
compiling compar.c
compiling complex.c
compiling dir.c
compiling dlnfind.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling load.c
compiling proc.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
compiling string.c
compiling struct.c
compiling time.c
compiling transcode.c
compiling util.c
compiling variable.c
compiling compile.c
compiling debug.c
compiling iseq.c
compiling vm.c
compiling vm
dump.c
compiling thread.c
compiling cont.c
compiling ./enc/ascii.c
compiling ./enc/usascii.c
compiling ./enc/unicode.c
compiling ./enc/utf
8.c
compiling newline.c
compiling ./missing/setproctitle.c
compiling dmyext.c
linking miniruby
internal:prelude:1: [BUG] Bus Error
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]

-- Control frame information -----------------------------------------------
c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 TOP internal:prelude:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000c48 d:000c48 TOP

-- Ruby level backtrace information ----------------------------------------
internal:prelude:1:in `'

-- C level backtrace information -------------------------------------------

See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

  • Loaded script: ./miniruby

  • Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6





Process: miniruby [91578]
Path: /Users/USER/Downloads/*/miniruby
Identifier: miniruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: gnumake [91298]

Date/Time: 2011-11-26 10:22:33.631 -0800
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXCBADACCESS (SIGABRT)
Exception Codes: KERNPROTECTIONFAILURE at 0x000000010d8eaee7

VM Regions Near 0x10d8eaee7:
--> _TEXT 000000010d8a7000-000000010da8c000 [ 1940K] r-x/rwx SM=COW /Users/USER/Downloads/*
_
DATA 000000010da8c000-000000010daa8000 [ 112K] rw-/rwx SM=PRV /Users/USER/Downloads/*

Application Specific Information:
objc[91578]: garbage collection is OFF
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystemkernel.dylib 0x00007fff9071ece2 _pthreadkill + 10
1 libsystem
c.dylib 0x00007fff9a3677d2 pthreadkill + 95
2 libsystem
c.dylib 0x00007fff9a358a7a abort + 143
3 miniruby 0x000000010d8d6e59 rbbug + 185
4 miniruby 0x000000010d985866 sigbus + 54
5 libsystem
c.dylib 0x00007fff9a3b9cfa sigtramp + 26
6 miniruby 0x000000010d9dde0e vm
execcore + 2734 (vm.inc:494)
7 miniruby 0x000000010d9e93fe vm
exec + 94 (vm.c:1221)
8 miniruby 0x000000010d9e9332 rbiseqeval + 402 (vm.c:1448)
9 miniruby 0x000000010d980fe8 rubyprocessoptions + 1432 (ruby.c:1098)
10 miniruby 0x000000010d8db0c0 ruby_options + 128 (eval.c:73)
11 miniruby 0x000000010d8a7ba7 main + 71 (main.c:38)
12 miniruby 0x000000010d8a7b54 start + 52

Thread 1:
0 libsystemkernel.dylib 0x00007fff9071edf2 _select + 10
1 miniruby 0x000000010d9f8b2c threadtimer + 380 (threadpthread.c:1154)
2 libsystemc.dylib 0x00007fff9a3658bf _pthreadstart + 335
3 libsystemc.dylib 0x00007fff9a368b75 threadstart + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x000000010dbda938 rdx: 0x0000000000000000
rdi: 0x0000000000000303 rsi: 0x0000000000000006 rbp: 0x000000010dbda960 rsp: 0x000000010dbda938
r8: 0x00007fff7fdf5fb8 r9: 0x000000010dbda4e8 r10: 0x00007fff9071ed0a r11: 0xffffff80002d8220
r12: 0x000000010dd00028 r13: 0x00007f9831c0d250 r14: 0x00007fff7fdf8960 r15: 0x000000010ddfff50
rip: 0x00007fff9071ece2 rfl: 0x0000000000000246 cr2: 0x000000010d9ef8c0
Logical CPU: 0

Binary Images:
0x10d8a7000 - 0x10da8bfff +miniruby (??? - ???) /Users/USER/Downloads/*/miniruby
0x7fff6d4a7000 - 0x7fff6d4dbac7 dyld (195.5 - ???) /usr/lib/dyld
0x7fff8e4e5000 - 0x7fff8e4e5fff libkeymgr.dylib (23.0.0 - compatibility 1.0.0) /usr/lib/system/libkeymgr.dylib
0x7fff8f0c9000 - 0x7fff8f0cefff libcompilerrt.dylib (6.0.0 - compatibility 1.0.0) /usr/lib/system/libcompilerrt.dylib
0x7fff8f172000 - 0x7fff8f1b4ff7 libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) /usr/lib/system/libcommonCrypto.dylib
0x7fff8f203000 - 0x7fff8f20afff libcopyfile.dylib (85.1.0 - compatibility 1.0.0) /usr/lib/system/libcopyfile.dylib
0x7fff90702000 - 0x7fff90707fff libcache.dylib (47.0.0 - compatibility 1.0.0) /usr/lib/system/libcache.dylib
0x7fff90708000 - 0x7fff90728fff libsystemkernel.dylib (1699.23.2 - compatibility 1.0.0) /usr/lib/system/libsystemkernel.dylib
0x7fff91033000 - 0x7fff91037fff libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib
0x7fff924cd000 - 0x7fff924cffff libquarantine.dylib (36.0.0 - compatibility 1.0.0) /usr/lib/system/libquarantine.dylib
0x7fff93650000 - 0x7fff9369efff libauto.dylib (??? - ???) /usr/lib/libauto.dylib
0x7fff94638000 - 0x7fff9463eff7 libunwind.dylib (30.0.0 - compatibility 1.0.0) /usr/lib/system/libunwind.dylib
0x7fff94742000 - 0x7fff9474cff7 liblaunch.dylib (392.18.0 - compatibility 1.0.0) /usr/lib/system/liblaunch.dylib
0x7fff94759000 - 0x7fff94762ff7 libsystemnotify.dylib (80.1.0 - compatibility 1.0.0) /usr/lib/system/libsystemnotify.dylib
0x7fff947fe000 - 0x7fff948e2def libobjc.A.dylib (228.0.0 - compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff948e3000 - 0x7fff94910fe7 libSystem.B.dylib (159.1.0 - compatibility 1.0.0) /usr/lib/libSystem.B.dylib
0x7fff94911000 - 0x7fff9494cff7 libsysteminfo.dylib (??? - ???) /usr/lib/system/libsysteminfo.dylib
0x7fff94c67000 - 0x7fff94c68fff libsystemsandbox.dylib (??? - ???) /usr/lib/system/libsystemsandbox.dylib
0x7fff9586e000 - 0x7fff9587cfff libdispatch.dylib (187.7.0 - compatibility 1.0.0) /usr/lib/system/libdispatch.dylib
0x7fff95cfd000 - 0x7fff95cfefff libdnsinfo.dylib (395.7.0 - compatibility 1.0.0) /usr/lib/system/libdnsinfo.dylib
0x7fff95de1000 - 0x7fff95de6ff7 libsystemnetwork.dylib (??? - ???) /usr/lib/system/libsystemnetwork.dylib
0x7fff97ce3000 - 0x7fff97d00ff7 libxpc.dylib (77.17.0 - compatibility 1.0.0) /usr/lib/system/libxpc.dylib
0x7fff97e8e000 - 0x7fff97e94fff libmacho.dylib (800.0.0 - compatibility 1.0.0) /usr/lib/system/libmacho.dylib
0x7fff9990c000 - 0x7fff99914fff libsystemdnssd.dylib (??? - ???) /usr/lib/system/libsystemdnssd.dylib
0x7fff99c30000 - 0x7fff99c31ff7 libremovefile.dylib (21.0.0 - compatibility 1.0.0) /usr/lib/system/libremovefile.dylib
0x7fff9a317000 - 0x7fff9a3f4fef libsystemc.dylib (763.12.0 - compatibility 1.0.0) /usr/lib/system/libsystemc.dylib
0x7fff9a42b000 - 0x7fff9a49efff libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) /usr/lib/libstdc++.6.dylib
0x7fff9a607000 - 0x7fff9a608ff7 libsystemblocks.dylib (53.0.0 - compatibility 1.0.0) /usr/lib/system/libsystemblocks.dylib
0x7fff9a718000 - 0x7fff9a78dff7 libc++.1.dylib (19.0.0 - compatibility 1.0.0) /usr/lib/libc++.1.dylib
0x7fff9aa41000 - 0x7fff9aa45fff libdyld.dylib (195.5.0 - compatibility 1.0.0) /usr/lib/system/libdyld.dylib
0x7fff9aa46000 - 0x7fff9aa47fff libunc.dylib (24.0.0 - compatibility 1.0.0) /usr/lib/system/libunc.dylib
0x7fff9adc1000 - 0x7fff9adccff7 libc++abi.dylib (14.0.0 - compatibility 1.0.0) /usr/lib/libc++abi.dylib

External Modification Summary:
Calls made by other processes targeting this process:
taskforpid: 0
threadcreate: 0
thread
setstate: 0
Calls made by this process:
task
forpid: 0
thread
create: 0
threadsetstate: 0
Calls made by all processes on this machine:
taskforpid: 48696
threadcreate: 0
thread
set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=54.4M resident=16.7M(31%) swappedoutorunallocated=37.7M(69%)
Writable regions: Total=84.0M written=752K(1%) resident=1408K(2%) swapped
out=0K(0%) unallocated=82.7M(98%)

REGION TYPE VIRTUAL
=========== =======
MALLOC 19.4M
MALLOC guard page 16K
MALLOCLARGE (reserved) 256K reserved VM address space (unallocated)
STACK GUARD 4K
Stack 64.0M
_
DATA 676K
_LINKEDIT 47.9M
_
TEXT 6636K
shared memory 12K
=========== =======
TOTAL 138.8M
TOTAL, minus reserved VM space 138.5M

make.log (11.7 KB) Cake Pie, 12/03/2011 05:20 PM


Related issues

Related to ruby-trunk - Bug #5082: test_context_switch(TestMarshal) was failed on OS X 10.7 ... Closed 07/23/2011

History

#1 Updated by Motohiro KOSAKI over 2 years ago

What's mean clang 2.1?

My clang on Lion + Xcode 4.2 environment show following.

~% clang -v
Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn)

#2 Updated by Nobuyoshi Nakada over 2 years ago

  • Status changed from Open to Feedback

Have you run "Install Xcode.app"?

#3 Updated by Yui NARUSE about 2 years ago

  • Status changed from Feedback to Rejected

Try ruby 1.9.3-p125.

Also available in: Atom PDF