Bug #5883

thread bootstrap tests fail with clang 3.0 on Snow Leopard

Added by Luis Lavena over 2 years ago. Updated over 2 years ago.

[ruby-core:42062]
Status:Rejected
Priority:Normal
Assignee:-
Category:build
Target version:2.0.0
ruby -v:ruby 2.0.0dev (2012-01-12 trunk 34277) [x86_64-darwin10.8.0] Backport:

Description

Hello,

Attempted to use clang to build latest trunk (r34277), using clang-3.0 provided by MacPorts:

$ clang --version
clang version 3.0 (tags/RELEASE30/final)
Target: x86
64-apple-darwin10.8.0
Thread model: posix

And generated the following output:

testthread.rb .................................F................
#927 test
thread.rb:307:in <top (required)>':
g = "abc".enum_for(:scan, /./)
loop { g.next }
#=> killed by SIGABRT (signal 6)
| bootstraptest.tmp.rb:3: [BUG] Bus Error
| ruby 2.0.0dev (2012-01-12 trunk 34277) [x86_64-darwin10.8.0]
|
| -- Control frame information -----------------------------------------------
| c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :loop
| c:0003 p:0029 s:0008 b:0007 l:002078 d:000ee0 EVAL bootstraptest.tmp.rb:3
| c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
| c:0001 p:0000 s:0002 b:0002 l:002078 d:002078 TOP
|
| -- Ruby level backtrace information ----------------------------------------
| bootstraptest.tmp.rb:3:in
'
| bootstraptest.tmp.rb:3:in `loop'
|
| -- 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: bootstraptest.tmp.rb
|
| * Loaded features:
|
| 0 enumerator.so
| 1 /Users/luis/projects/oss/ruby/clangbuild/.ext/x8664-darwin10.8.0/enc/encdb.bundle
| 2 /Users/luis/projects/oss/ruby/clangbuild/.ext/x86
64-darwin10.8.0/enc/trans/transdb.bundle
| 3 /Users/luis/projects/oss/ruby/lib/rubygems/defaults.rb
| 4 /Users/luis/projects/oss/ruby/clangbuild/rbconfig.rb
| 5 /Users/luis/projects/oss/ruby/lib/rubygems/deprecate.rb
| 6 /Users/luis/projects/oss/ruby/lib/rubygems/exceptions.rb
| 7 /Users/luis/projects/oss/ruby/lib/rubygems/custom_require.rb
| 8 /Users/luis/projects/oss/ruby/lib/rubygems.rb
|
| [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
|

FAIL 1/943 tests failed
make: *** [yes-btest-ruby] Error 1

Only reference is

No special flag were used for compilation. Make reported the following prior start compiling:

$ make
CC = clang
LD = ld
LDSHARED = clang -dynamiclib
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -DFORTIFYSOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBYEXPORT
CPPFLAGS = -D
XOPENSOURCE -DDARWINCSOURCE -DDARWINUNLIMITEDSELECT -I. -I.ext/include/x8664-darwin10.8.0 -I../include -I..
DLDFLAGS = -Wl,-undefined,dynamiclookup -Wl,-multiplydefined,suppress -Wl,-flatnamespace -installname /Users/luis/local/ruby2/lib/libruby.2.0.0.dylib -currentversion 2.0.0 -compatibilityversion 2.0.0 -Wl,-unexportedsymbol,Init* -Wl,-unexportedsymbol,threadptr -fstack-protector -Wl,-u,objcmsgSend -fstack-protector -Wl,-u,objcmsgSend

SOLIBS =

BASERUBY was ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]

Thank you.

History

#1 Updated by Yui NARUSE over 2 years ago

  • Status changed from Open to Rejected
  • Assignee deleted (Yusuke Endoh)

Use gcc, clang can't work for ruby yet.

#2 Updated by Luis Lavena over 2 years ago

Oh bummer, where is the fun then?

#3 Updated by Yui NARUSE over 2 years ago

Luis Lavena wrote:

Oh bummer, where is the fun then?

I can't understand this sentence with my poor English skill but kindly speaking,
Yes, it's not work and I know to fix it is not easy because I tried to fix and reported it
to LLVM and sometimes it works (see my tickes and commits related to LLVM/clang).
But LLVM/clang is so a developing product that it sometimes work, sometimes not work
through my experience.
Once clang-trunk works well but at another time it doesn't.

For example I confirm following works well, but on FreeBSD 9.0 it doesn't work.
ruby 2.0.0dev (2012-01-12 trunk 34277) [x8664-darwin11.2.0]
clang version 3.1 (trunk 147813)
Target: x86
64-apple-darwin11.2.0

So I concluded that we can't support clang now and wait it stable.
Under such circumstances, what I should say to a casual user or a bummer like you
will be "Use gcc".Of course an effort to make clang works with ruby is welcome,
and patches are also welcome.
I'll constantly continue such effort.

#4 Updated by Luis Lavena over 2 years ago

Yui NARUSE wrote:

I can't understand this sentence with my poor English skill but kindly speaking,
Yes, it's not work and I know to fix it is not easy because I tried to fix and reported it
to LLVM and sometimes it works (see my tickes and commits related to LLVM/clang).

Yui, was not my intention to say you didn't want to fix this.

It will be great if a clear statement is made in relation to clang, like:

"Don't use clang with Ruby yet, Ruby code does not compile properly under it."

So I concluded that we can't support clang now and wait it stable.
Under such circumstances, what I should say to a casual user or a bummer like you
will be "Use gcc".

The bummer was my silly attempt to make a joke, yet again, it got lost in the translation.

Of course an effort to make clang works with ruby is welcome,
and patches are also welcome.

I'm chasing a longjmp exception right now so won't be able to work on this type of things.

I'll constantly continue such effort.

And we all appreciate it.

Once again, thank you.

Also available in: Atom PDF