Project

General

Profile

Actions

Bug #20635

closed

Can't build fat binaries on Darwin (Mac OS X)

Added by gsteemso (Gordon Steemson) 4 months ago. Updated 3 months ago.

Status:
Feedback
Assignee:
-
Target version:
-
ruby -v:
It never gets that far!
[ruby-core:118610]

Description

[background: I'm attempting to build the latest versioned release of Ruby (3.3.4) on a 2005-vintage dual-processor Power Mac G5 – that's a 64-bit big-endian machine. I'm using the newest Mac OS available for it, which is version 10.5.8 from 2011. I also had exactly the same issues described below with release 3.3.3 of Ruby.]

Ruby still maintains the capability, in theory, to be built for multiple architectures at once on Mac OS X (Darwin) by passing "-arch xxxx" flags to the compiler. Alas, that is currently failing to work on PowerPC when it gets to the coroutines, which configure inexplicably thinks ought to be built bi-endian. As Apple only ever implemented big-endian Power Macs, it dies messily when it tries to build the little-endian part. I've been able to inefficiently bypass the issue, albeit for only one architecture at a time, by manually supplying the correct values of "--with-coroutine=xxxx" and "ac_cv_c_bigendian=xxxx" to configure.

While I'm on the subject, on my system configure happens to discover an OS routine called "fcopyfile", which apparently does not behave here as it is expected to on more modern systems. I must manually pass "ac_cv_func_fcopyfile=no" to configure, or chaos ensues.

Even with these tricks apparently solving all the problems, every build I have tried dies with a series of bus errors when it attempts to link miniruby (the specific names given most often are "[builtin_binary.inc]" and "[.rbconfig.time]"). As far as I've been able to work out, "bus error" means it tried to execute something at a misaligned address. I have no idea how to debug that.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0