Bug #9665

Ruby 2.1.1 fails to build on PowerPC darwin, due to __builtin_unreachable

Added by Misty De Meo over 1 year ago. Updated about 1 year ago.

[ruby-core:61647]
Status:Closed
Priority:Normal
Assignee:cruby-mac
ruby -v:ruby 2.1.1p76 (2014-02-24 revision 45161) [powerpc-darwin8.0] Backport:2.0.0: DONE, 2.1: DONE

Description

Ruby 2.1.1 (and possibly a few older versions) fails to build on PowerPC Darwin using Apple-provided GCCs. When linking miniruby, the build fails due to:

/usr/libexec/gcc/powerpc-apple-darwin8/4.2.1/ld: Undefined symbols:
___builtin_unreachable

This occurs with Apple GCC 4.0 and 4.2, on Mac OS X 10.4 and 10.5 PowerPC. The issue does not occur using newer FSF GCCs (for instance, 4.8.2) on the same OS X versions. While I'm unable to test on 10.5 Intel, I can confirm that newer Intel OS X versions work fine using Apple GCC 4.2.

Verbose build logs, from Mac OS X 10.4 with Apple GCC 4.2, are attached.

While I suspect this was possibly introduced by r34784, as removing the check from configure allows the build to succeed, that revision is 2 years old and I only noticed these build failures beginning relatively recently.

01.configure - Configure output (18.7 KB) Misty De Meo, 03/23/2014 09:47 PM

02.make - Make output (38.7 KB) Misty De Meo, 03/23/2014 09:47 PM

config.log Magnifier (1.12 MB) Misty De Meo, 03/23/2014 09:47 PM

Associated revisions

Revision 45716
Added by Nobuyoshi Nakada over 1 year ago

configure.in: refine __builtin_unreachable check

  • configure.in (rb_cv_func___builtin_unreachable): try with an external variable not only by a warning, which might not be shown due to the optimization. [Bug #9665]

Revision 45716
Added by Nobuyoshi Nakada over 1 year ago

configure.in: refine __builtin_unreachable check

  • configure.in (rb_cv_func___builtin_unreachable): try with an external variable not only by a warning, which might not be shown due to the optimization. [Bug #9665]

Revision 46201
Added by Usaku NAKAMURA about 1 year ago

merge revision(s) 45716: [Backport #9665]

* configure.in (rb_cv_func___builtin_unreachable): try with an
  external variable not only by a warning, which might not be
  shown due to the optimization.   [Bug #9665]

Revision 46215
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) r45716: [Backport #9665]

* configure.in (rb_cv_func___builtin_unreachable): try with an
  external variable not only by a warning, which might not be
  shown due to the optimization.   [Bug #9665]

History

#1 Updated by Nobuyoshi Nakada over 1 year ago

  • Target version set to current: 2.2.0
  • Description updated (diff)
  • Backport set to 2.0.0: REQUIRED, 2.1: REQUIRED

With MacPorts apple-gcc42, __builtin_unreachable seems detected as no, successfully.

#2 Updated by Nobuyoshi Nakada over 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r45716.


configure.in: refine __builtin_unreachable check

  • configure.in (rb_cv_func___builtin_unreachable): try with an external variable not only by a warning, which might not be shown due to the optimization. [Bug #9665]

#3 Updated by Usaku NAKAMURA about 1 year ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED

backported into ruby_2_0_0 at r46201.

#4 Updated by Tomoyuki Chikanaga about 1 year ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE

r45716 was backported into ruby_2_1 branch at r46215.

Also available in: Atom PDF