[MacPorts] #15635: Ruby 1.8.7 dumps core on 10.5 ppc
#15635: Ruby 1.8.7 dumps core on 10.5 ppc --------------------------------+------------------------------------------- Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: | --------------------------------+------------------------------------------- I can compile and test ruby 1.8.7 fine on 10.5.3 i386, but it dumps core on 10.5.3 ppc: {{{ /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c string.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c struct.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c time.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c util.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c variable.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c version.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c ./missing/alloca.c ./missing/alloca.c:144: warning: conflicting types for built-in function 'alloca' /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c dmyext.c ar rcu libruby-static.a array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o alloca.o dmyext.o /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c main.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -I. -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c dmydln.c /usr/bin/gcc-4.0 -O2 -fno-common -pipe -fno-common -DRUBY_EXPORT -L. -L/opt/local/lib main.o dmydln.o libruby-static.a -lpthread -ldl -lobjc -o miniruby ./ext/purelib.rb:5: [BUG] Segmentation fault ruby 1.8.7 (2008-05-31 patchlevel 0) [powerpc-darwin9.3.0] make: *** [.rbconfig.time] Abort trap (core dumped) Warning: the following items did not execute (for ruby): org.macports.build Error: Status 1 encountered during processing. }}} -- Ticket URL: <http://trac.macports.org/ticket/15635> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by blair@macports.org): Some more information. This is the first command that fails from Makefile: {{{ root# ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./mkconfig.rb -timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb ./ext/purelib.rb:5: [BUG] Segmentation fault ruby 1.8.7 (2008-05-31 patchlevel 0) [powerpc-darwin9.3.0] Abort trap (core dumped) }}} Running it in a debugger to get a stack trace: {{{ # gdb ./miniruby GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:11:19 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .... done (gdb) run -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./mkconfig.rb -timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb Starting program: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ruby/work/ruby-1.8.7/miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./mkconfig.rb -timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb Reading symbols for shared libraries +++... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xc0003ff8 0x00025610 in rb_eval () (gdb) bt #0 0x00025610 in rb_eval () #1 0x00034510 in rb_load () #2 0x00034ac0 in rb_require_safe () #3 0x0001b010 in rb_protect () #4 0x00089434 in require_libraries () #5 0x0008b1f8 in load_file () #6 0x0008aa6c in proc_options () #7 0x0008abd4 in ruby_process_options () #8 0x0002deb4 in ruby_options () #9 0x00001e20 in main () (gdb) }}} -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by raimue@macports.org): Did you already report this upstream? I think this is out of range what we can fix easily, so upstream should have a look. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by blair@macports.org): Me, no, I didn't report it upstream. It's the port maintainer's job to handle the MacPorts issue, doing whatever it takes to have a successful MacPorts build, such as reporting it upstream, finding a patch, etc. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by febeling@macports.org): Hm, does still segfault on PPC/10.5.3 after update to p17, unfortunately. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by febeling@macports.org): It does build and install without error when you remove the "--enable- pthread" line from the portfile. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by pguyot@kallisys.net): From what I understand, it will break tk support. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by febeling@macports.org): Replying to [comment:7 pguyot@kallisys.net]:
From what I understand, it will break tk support.
Yes, I've seen that note as well. I don't know what is best to do. Maybe it's better to break only Tk than the entire PPC target, and do some dodgy if arch == powerpc thing. I've filed a bug with the ruby project for this though, because it happens with a pure tar ball as well: http://redmine.ruby-lang.org/issues/show/193 I mean there is no working ruby 1.8.7 for that machine right now, it seems. But I think most people want it for rails and such, where tk is quite secondary. I think have never invoked a single Tk widget in the 3 years I use ruby. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment (by kimuraw@macports.org): The following change against ruby's Portfile disables "--enable-pthread" on 10.5 ppc Mac. I think this is not so bad to solve the problem temporally. {{{ Index: lang/ruby/Portfile =================================================================== --- lang/ruby/Portfile (revision 783) +++ lang/ruby/Portfile (working copy) @@ -74,6 +74,12 @@ configure.args-delete --enable-pthread } +platform darwin 9 powerpc { + # pthreads breaks ruby-1.8.7 on 10.5 ppc + # http://trac.macports.org/ticket/15635 + configure.args-delete --enable-pthread +} + variant tk conflicts mactk { configure.args-delete --without-tk configure.args-append --with-tk }}} -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#15635: Ruby 1.8.7 dumps core on 10.5 ppc ---------------------------------+------------------------------------------ Reporter: blair@macports.org | Owner: pguyot@kallisys.net Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: fixed | Keywords: ---------------------------------+------------------------------------------ Changes (by pguyot@kallisys.net): * status: new => closed * resolution: => fixed Comment: Committed the workaround in r37694 where I also changed the maintainer to kimuraw@. -- Ticket URL: <http://trac.macports.org/ticket/15635#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts