Ruby-1.8.6-p111 build on osx 10.5.0 fails; ok on 10.4.10. bug or config?

hi,

not sure if this is a bug or a config issue … since ruby ships on
osx, i thought i’d check here first …

any hints ? thanks!

i’m building ruby-1.8.6-p111 w/

./configure
–prefix=/usr/local/ruby
–mandir=/usr/local/man
–disable-fat-binary
–enable-frame-address
–enable-largefile
–enable-pthread
–enable-shared
–enable-install-doc

a subsequent

make

is OK on OSX 10.4.10/Tiger, but, reproducibly fails at,

./mkconfig.rb:191: [BUG] Bus Error
ruby 1.8.6 (2007-09-24) [powerpc-darwin9.0.0]

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

on OSX 10.5.0/Leopard.

the ruby@leopard crash report is:

Process: miniruby [46319]
Path: miniruby
Identifier: miniruby
Version: ??? (???)
Code Type: PPC (Native)
Parent Process: gnumake [46318]

Date/Time: 2007-11-10 15:42:19.058 -0800
OS Version: Mac OS X 10.5 (9A581)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 libSystem.B.dylib 0x9096eca8 __kill + 12
1 libSystem.B.dylib 0x90a137b4 abort + 84
2 miniruby 0x00013a24 rb_bug + 244
3 miniruby 0x000851f8 sigbus + 104

Thread 0 crashed with PPC Thread State 32:
srr0: 0x9096eca8 srr1: 0x0000d030 dar: 0xa017a62c dsisr: 0x0a000000
r0: 0x00000025 r1: 0xbfffb820 r2: 0x00000000 r3: 0x00000000
r4: 0x00000000 r5: 0x00000001 r6: 0x0000000a r7: 0x00000030
r8: 0x00000008 r9: 0x00000008 r10: 0x90937cf0 r11: 0xa017c490
r12: 0x9096ec94 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000
r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000
r24: 0xbfffc250 r25: 0xa01778c8 r26: 0x00000000 r27: 0x000a3d0c
r28: 0xbfffb8bc r29: 0xa017a424 r30: 0x00000013 r31: 0x90a1376c
cr: 0x22000222 xer: 0x00000004 lr: 0x90a137b8 ctr: 0x9096ec94
vrsave: 0x00000000

Binary Images:
0x1000 - 0xb1ffb +miniruby ??? (???)
<951adb2d58b6d67d1f794bf1c1a1ccd1>
/Volumes/build/ruby-1.8.6-p111/miniruby
0xfb000 - 0x11ffff +libreadline.5.2.dylib ??? (???)
/usr/local/lib/libreadline.5.2.dylib
0x16e000 - 0x1a6ff7 +libssl.0.9.8.dylib ??? (???)

/usr/local/ssl/lib/libssl.0.9.8.dylib
0x1ba000 - 0x2b0ff3 +libcrypto.0.9.8.dylib ??? (???)
<5c01ddb4b9bee434a15a60421a802227>
/usr/local/ssl/lib/libcrypto.0.9.8.dylib
0x30a000 - 0x33efff +libncurses.5.6.dylib ??? (???)
/usr/local/lib/libncurses.5.6.dylib
0x34c000 - 0x36dff1 libmx.A.dylib ??? (???) /usr/lib/libmx.A.dylib
0x375000 - 0x386fff +libz.1.dylib ??? (???)
/usr/local/lib/libz.1.dylib
0x8fe00000 - 0x8fe309d3 dyld 95.3 (???)
/usr/lib/dyld
0x90369000 - 0x90374ffb libgcc_s.1.dylib ??? (???)
/usr/lib/libgcc_s.1.dylib
0x908eb000 - 0x90a84fe3 libSystem.B.dylib ??? (???)
<8a6cd873dfa7ada786efac188f95ed1b> /usr/lib/libSystem.B.dylib
0x9181a000 - 0x9181fff6 libmathCommon.A.dylib ??? (???)
/usr/lib/system/libmathCommon.A.dylib
0x91f0f000 - 0x91ff2feb libobjc.A.dylib ??? (???)
<4a90e315bd1718c3f5ae09ee6c23e36c> /usr/lib/libobjc.A.dylib
0x93196000 - 0x931fdffb libstdc++.6.dylib ??? (???)
/usr/lib/libstdc++.6.dylib
0x95fa0000 - 0x95fcbff7 libauto.dylib ??? (???)
/usr/lib/libauto.dylib
0xfffec000 - 0xfffeffff libobjc.A.dylib ??? (???)
/usr/lib/libobjc.A.dylib
0xffff8000 - 0xffff9703 libSystem.B.dylib ??? (???)
/usr/lib/libSystem.B.dylib

On Nov 10, 2007, at 16:27 , snowcrash+rubytalk wrote:

–prefix=/usr/local/ruby
make

is OK on OSX 10.4.10/Tiger, but, reproducibly fails at,

./mkconfig.rb:191: [BUG] Bus Error
ruby 1.8.6 (2007-09-24) [powerpc-darwin9.0.0]

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

on OSX 10.5.0/Leopard.

I just did:

svn up
make realclean
./configure && make -j 4

and it built fine on (intel) leopard… I would recommend against
configure options and let it figure out what is best.

506 % ./ruby -v
ruby 1.8.6 (2007-11-09 patchlevel 5000) [i686-darwin9.0.0]

On Nov 11, 2007 1:27 AM, snowcrash+rubytalk
removed_email_address@domain.invalid wrote:

hi,

not sure if this is a bug or a config issue … since ruby ships on
osx, i thought i’d check here first …

any hints ? thanks!

[snip]

Try applying this patch:

http://chopine.be/lrz/ruby-osx-patches/ignore-gsetcontext.diff

Then, re-building.

Laurent

hi laurent,

Try applying this patch:

http://chopine.be/lrz/ruby-osx-patches/ignore-gsetcontext.diff

Then, re-building.

i’d 1st checked the

1.8.6-p110 tarball
1.8.6-p111 tarball
branches/ruby_1_8 svn

and all 3 had the same problems …

next, applying the patch to

v1.8.6-p111 tarball

then

./configure ...
make
make install

as above is OK – no errors!

has this patch been committed to either 18-branch svn, or trunk?

and, can (should?) this patch be safely applied to a Tiger sys, as well?

thx for the help!

On Nov 11, 2007 6:01 PM, John J. removed_email_address@domain.invalid
wrote:

Anyone have a tarball of 111 with the patch?
What is being patched?

Here is a description:

In Leopard, the setcontext/getcontext functions have been modified to
confirm to the UNIX norm, however, their implementation changed to not
use the default structure by default, which makes Ruby segfaulting
during initialization. This patch just force the non-set/getcontext
code path for Leopard environments, but use set/getcontext for systems
below.

Any suggestions on the MySQL brokenness?

What do you mean exactly by this?

If you refer to the MySQL extension build problem, check out:

http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#IcannotbuildrubymysqlonLeopardwithmysql.combinaries

Laurent

On Nov 11, 2007 5:33 PM, snowcrash+rubytalk
removed_email_address@domain.invalid wrote:

1.8.6-p110 tarball

./configure ...
make
make install

as above is OK – no errors!

Cool.

has this patch been committed to either 18-branch svn, or trunk?

AFAIK, not yet. The patch was submitted to ruby-core a couple of weeks
ago though.

and, can (should?) this patch be safely applied to a Tiger sys, as well?

Only the Leopard build is concerned by this problem.

Laurent

Anyone have a tarball of 111 with the patch?
What is being patched?

Any suggestions on the MySQL brokenness?

to install mysql gem on ppc leopard (10.5)
had to
sudo env ARCHFLAGS="-arch ppc" gem install mysql –
–with-mysql-config=/usr/local/mysql/bin/mysql_config

(overcame errors with finding ruby.h,
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

from
http://hivelogic.com/narrative/articles/installing-mysql-on-mac-os-x
as a note.

AFAIK, not yet. The patch was submitted to ruby-core a couple of weeks
ago though.

and, can (should?) this patch be safely applied to a Tiger sys, as well?

Only the Leopard build is concerned by this problem.

thx for the clarification!

cheers.

On Dec 5, 2007 9:30 PM, Roger P. removed_email_address@domain.invalid wrote:

http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#cantfindheaderfilesforruby

Laurent

Laurent S. wrote:

On Dec 5, 2007 9:30 PM, Roger P. removed_email_address@domain.invalid wrote:

http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#cantfindheaderfilesforruby

Laurent

Yes that link helps you when you don’t have xcode installed (which is,
by chance, a twist on the same problem).