Opened 13 years ago

Closed 13 years ago

#34311 closed defect (worksforme)

ruby19: segfault while linking miniruby/generating encdb.h during build

Reported by: jowens@… Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: ruby19

Description

First time I've ever installed Ruby. I can't think that this is failing for everyone, yet I'm not understanding what is different about my installation ...

:info:build linking miniruby
:info:build generating encdb.h
:info:build <internal:prelude>:1: [BUG] Segmentation fault
:info:build ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11]
:info:build 
:info:build -- Control frame information -----------------------------------------------
:info:build c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 TOP    <internal:prelude>:1
:info:build c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
:info:build c:0001 p:0000 s:0002 b:0002 l:000f98 d:000f98 TOP   
:info:build 
:info:build -- Ruby level backtrace information ----------------------------------------
:info:build <internal:prelude>:1:in `<compiled>'
:info:build 
:info:build -- C level backtrace information -------------------------------------------
:info:build 
:info:build    See Crash Report log file under ~/Library/Logs/CrashReporter or
:info:build    /Library/Logs/CrashReporter, for the more detail of.
:info:build 
:info:build -- Other runtime information -----------------------------------------------
:info:build 
:info:build * Loaded script: ./miniruby
:info:build 
:info:build * Loaded features:
:info:build 
:info:build     0 enumerator.so
:info:build 
:info:build [NOTE]
:info:build You may have encountered a bug in the Ruby interpreter or extension libraries.
:info:build Bug reports are welcome.
:info:build For details: http://www.ruby-lang.org/bugreport.html
:info:build 
:info:build <internal:prelude>:1: [BUG] Segmentation fault
:info:build ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11]
:info:build 
:info:build -- Control frame information -----------------------------------------------
:info:build c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 TOP    <internal:prelude>:1
:info:build c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
:info:build c:0001 p:0000 s:0002 b:0002 l:000498 d:000498 TOP   
:info:build 
:info:build -- Ruby level backtrace information ----------------------------------------
:info:build <internal:prelude>:1:in `<compiled>'
:info:build 
:info:build -- C level backtrace information -------------------------------------------
:info:build 
:info:build    See Crash Report log file under ~/Library/Logs/CrashReporter or
:info:build    /Library/Logs/CrashReporter, for the more detail of.
:info:build 
:info:build -- Other runtime information -----------------------------------------------
:info:build 
:info:build * Loaded script: ./miniruby
:info:build 
:info:build * Loaded features:
:info:build 
:info:build     0 enumerator.so
:info:build 
:info:build [NOTE]
:info:build You may have encountered a bug in the Ruby interpreter or extension libraries.
:info:build Bug reports are welcome.
:info:build For details: http://www.ruby-lang.org/bugreport.html
:info:build 
:info:build make: *** [encdb.h] Abort trap: 6
:info:build make: *** Waiting for unfinished jobs....
:info:build make: *** [.rbconfig.time] Abort trap: 6

Attachments (4)

main.log (56.5 KB) - added by jowens@… 13 years ago.
Build log
main.2.log (109.2 KB) - added by kimuraw (kimura wataru) 13 years ago.
successful build log
config.log (687.5 KB) - added by jowens@… 13 years ago.
CC_PRINT_OPTIONS (1.3 MB) - added by jowens@… 13 years ago.

Change History (11)

Changed 13 years ago by jowens@…

Attachment: main.log added

Build log

comment:1 Changed 13 years ago by jowens@…

$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

comment:2 Changed 13 years ago by jowens@…

Workaround: install XCode 4.3.2 command-line tools, port install ruby19 configure.compiler=gcc-4.2

This appears to work. What's weird is that the portfile says "# ruby built with llvm-gcc will be broken." as does http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS . I guess my default compiler is an LLVM one. Not sure what others' is.

comment:3 Changed 13 years ago by kimuraw (kimura wataru)

I cannot reproduce the error on my Lion Mac. Show me the version of your `clang' and Xcode.

% /usr/bin/clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
% xcodebuild -version
Xcode 4.3.2
Build version 4E2002
% xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

btw, configure.compiler=gcc-4.2 means using "/usr/bin/gcc-4.2", not "/usr/bin/gcc".

  • gcc-4.2: non LLVM
  • gcc: LLVM

comment:4 Changed 13 years ago by jowens@…

nanaimo-bar 9997$ /usr/bin/clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
nanaimo-bar 9998$ xcodebuild -version
Xcode 4.3.2
Build version 4E2002
nanaimo-bar 9999$ xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

Changed 13 years ago by kimuraw (kimura wataru)

Attachment: main.2.log added

successful build log

comment:5 Changed 13 years ago by kimuraw (kimura wataru)

I attached main.log of my `port build ruby19'. Your log is mostly same as my log expect the errors at last.

please send me the following files to more survey.

  • .CC_PRINT_OPTIONS - detail of compile options
  • config.log - detail of configure
% sudo port clean ruby19
% sudo port build ruby19  # would fail
% cd `port work ruby19`
% ls -l .CC_PRINT_OPTIONS
-rw-r--r--  1 macports  admin  1364707 May  7 23:58 .CC_PRINT_OPTIONS
% cd ruby-1.9.3-p194
% ls -l config.log
-rw-r--r--  1 macports  admin  714886 May  7 23:56 config.log

comment:6 Changed 13 years ago by jowens@…

So, oddly, now my compile is succeeding even after a clean. Perhaps this is because macports is caching my compiler setting? Here's the log. I am attaching the .CC_PRINT_OPTIONS and config.log. If you want to see a failed build and its settings, can you suggest how I can make macports use the default compiler?

nanaimo-bar 9995$ sudo port clean ruby19
Password:
--->  Cleaning ruby19
nanaimo-bar 9995$ sudo port build ruby19
--->  Computing dependencies for ruby19
--->  Fetching ruby19
--->  Verifying checksum(s) for ruby19
--->  Extracting ruby19
--->  Applying patches to ruby19
--->  Configuring ruby19
--->  Building ruby19
nanaimo-bar 9995$ cd `port work ruby19`
nanaimo-bar 9996$ ls -l .CC_PRINT_OPTIONS 
-rw-r--r--  1 root  admin  1329209 May  8 09:22 .CC_PRINT_OPTIONS
nanaimo-bar 9997$ cd ruby-1.9.3-p194/
nanaimo-bar 9998$ ls -l config.log 
-rw-r--r--  1 root  admin  703979 May  8 09:20 config.log

Changed 13 years ago by jowens@…

Attachment: config.log added

Changed 13 years ago by jowens@…

Attachment: CC_PRINT_OPTIONS added

comment:7 Changed 13 years ago by kimuraw (kimura wataru)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.