Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug #20085] Use consistent default options for -mbranch-protection #9371

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

kateinoigakukun
Copy link
Member

We need to use the same options for both C compiler and assembler when -mbranch-protection is guessed by configure. Otherwise, coroutine/arm64/Context.{h,S} will use incompatible PAC strategies.

We need to use the same options for both C compiler and assembler
when `-mbranch-protection` is guessed by configure. Otherwise,
`coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.
@kateinoigakukun kateinoigakukun marked this pull request as ready for review December 27, 2023 07:00
@kateinoigakukun kateinoigakukun merged commit 02973b7 into ruby:master Dec 28, 2023
96 checks passed
@kateinoigakukun kateinoigakukun deleted the katei/pac-as-flags branch December 28, 2023 03:20
@flavorjones
Copy link
Contributor

@kateinoigakukun I saw your comment "Unfortunately, we don't have a CI node that affects the issue" and wanted to say that it's possible to test this architecture using qemu, see for example https://github.com/sparklemotion/nokogiri/blob/34571990eaac1c95a3dea31fd8f31b6baa18df47/.github/workflows/ci.yml#L597-L617

I'm not sure where in the ruby github actions suite to place this, but the general idea would be:

      - run: |
          docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
          docker run --rm -v "$(pwd):/ruby" -w /ruby \
            --platform=linux/arm64/v8 ubuntu:22.04 \
            ./script-to-build-and-test-ruby

miharekar added a commit to miharekar/ohanami that referenced this pull request Dec 28, 2023
Build ruby with ruby/ruby#9371 patch
@kateinoigakukun
Copy link
Member Author

@flavorjones Thanks for your info :)

@saviogl
Copy link

saviogl commented Jan 8, 2024

When is this fix coming out? Would love not have to revert back to 3.2.2 unless necessary

@kobaltz
Copy link

kobaltz commented Jan 16, 2024

Notating this here since this PR is the first thing that comes up on a "Apple Silicon Docker Ruby 3.3.0" search. For anyone else having issues on Apple Silicon and Docker with Ruby 3.3.0, this is what I'm currently doing until the next release. This is just for my local development environment and I'll use ruby:3.3.0-slim on production images.

FROM debian:bullseye-slim as base
RUN apt update && apt install -y build-essential wget autoconf
RUN wget https://github.com/postmodern/ruby-install/releases/download/v0.9.3/ruby-install-0.9.3.tar.gz \
  && tar -xzvf ruby-install-0.9.3.tar.gz \
  && cd ruby-install-0.9.3/ \
  && make install
RUN ruby-install -p https://github.com/ruby/ruby/pull/9371.diff ruby 3.3.0
ENV PATH="/opt/rubies/ruby-3.3.0/bin:${PATH}"

It definitely takes longer to do a fresh build locally, but at least it is a workaround until the patch is available in the mainstream Ruby docker images.

huwd added a commit to govuk-one-login/tech-docs that referenced this pull request Jan 30, 2024
We're having difficult building on Macs.
Looks like that'll change in Ruby 3.3.1.

Until then, let's try this workaround:
ruby/ruby#9371 (comment)
huwd added a commit to govuk-one-login/tech-docs that referenced this pull request Jan 30, 2024
We're getting some C library errors when we try to build Ruby 3.3.0 on
apple processors. That's a problem becuase quite a few of our Tech
Writers are using them.

The issue is known to Ruby here[1], and they'll merge a fix as Ruby
v3.3.1 reasonably soon. We can upgrade then.

However until then ./preview-with-docker.sh is broken. This should
resolve the issue.

[1]: ruby/ruby#9371
huwd added a commit to govuk-one-login/tech-docs that referenced this pull request Jan 31, 2024
We're getting some C library errors when we try to build Ruby 3.3.0 on
apple processors. That's a problem becuase quite a few of our Tech
Writers are using them.

The issue is known to Ruby here[1], and they'll merge a fix as Ruby
v3.3.1 reasonably soon. We can upgrade then.

However until then ./preview-with-docker.sh is broken. This should
resolve the issue.

[1]: ruby/ruby#9371
robsimmons added a commit to robsimmons/twelflive that referenced this pull request Feb 2, 2024
ledermann added a commit to templatus/templatus-hotwire that referenced this pull request Feb 14, 2024
ledermann added a commit to templatus/templatus-hotwire that referenced this pull request Feb 14, 2024
osyoyu added a commit to osyoyu/docker-library-ruby that referenced this pull request Feb 16, 2024
Ruby 3.3.0 has a bug which crashs many practical programs on
linux-aarch64.
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream and planned to be backported, but no date
is given yet for the 3.3.1 release.
ruby/ruby#9371

This patch workarounds this bug by passing ASFLAGS to ./configure as
described in https://bugs.ruby-lang.org/issues/20085#note-5 .
osyoyu added a commit to osyoyu/docker-library-ruby that referenced this pull request Feb 16, 2024
Ruby 3.3.0 has a bug which crashs many practical programs on
linux-aarch64.
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream and is planned to be backported, but no
date is given yet for the 3.3.1 release.
ruby/ruby#9371

This patch workarounds this bug by passing ASFLAGS to ./configure as
described in https://bugs.ruby-lang.org/issues/20085#note-5 .
osyoyu added a commit to osyoyu/docker-library-ruby that referenced this pull request Feb 16, 2024
Ruby 3.3.0 has a bug which crashs many practical programs on
linux-aarch64 (especially on Linux VMs on macOS, e.g. Docker Desktop).
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream and is planned to be backported, but no
date is given yet for the 3.3.1 release.
ruby/ruby#9371

This patch workarounds this bug by passing ASFLAGS to ./configure as
described in https://bugs.ruby-lang.org/issues/20085#note-5 .
osyoyu added a commit to osyoyu/docker-library-ruby that referenced this pull request Feb 16, 2024
Ruby 3.3.0 has a bug which crashs many practical programs on
linux-aarch64 (especially on Linux VMs on macOS, e.g. Docker Desktop).
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream and is planned to be backported, but no
date is given yet for the 3.3.1 release.
ruby/ruby#9371

This patch workarounds this bug by passing ASFLAGS to ./configure as
described in https://bugs.ruby-lang.org/issues/20085#note-5 .
osyoyu added a commit to osyoyu/docker-library-ruby that referenced this pull request Feb 17, 2024
Ruby 3.3.0 has a bug which crashes many programs on arm64.
https://bugs.ruby-lang.org/issues/20085

This bug is fixed in upstream (ruby/ruby#9371)
and is planned to be backported, but no date is given yet for the 3.3.1
release.

This patch workarounds this bug by applying the upstream fix/backport in
ruby/ruby#9385 .

Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
chadlwilson added a commit to gocd-contrib/gocd-oss-cookbooks that referenced this pull request Feb 27, 2024
chadlwilson added a commit to gocd-contrib/gocd-oss-cookbooks that referenced this pull request Feb 27, 2024
csutter added a commit to alphagov/search-admin that referenced this pull request Apr 10, 2024
3.3.0 has a critical build bug on ARM, which prevents developers on
non-x86 from running the app through GOV.UK Docker (which builds Ruby
from scratch instead of using prebuilt Ruby images). Downgrading until
3.3.1 is out.

see: ruby/ruby#9371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants