From d078c26f1263aae26dc2c7c39737b6705523ef6a Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 12 Dec 2024 17:06:40 -0500 Subject: [PATCH] ext: stop precompiling native gems for x86-linux and x86-mingw32 Also, backfill documentation changes for dropping Ruby 3.0 and x64-mingw32 which should have been part of #3368. Closes #3369 --- .cross_rubies | 6 ------ .github/workflows/ci.yml | 24 ------------------------ CHANGELOG.md | 8 +++++++- LICENSE-DEPENDENCIES.md | 12 ++++++------ README.md | 4 ++-- rakelib/extensions.rake | 22 ++-------------------- 6 files changed, 17 insertions(+), 59 deletions(-) diff --git a/.cross_rubies b/.cross_rubies index 1aecb42cf4d..211fa1df46a 100644 --- a/.cross_rubies +++ b/.cross_rubies @@ -2,23 +2,17 @@ 3.1.0:arm-linux 3.1.0:arm64-darwin 3.1.0:x64-mingw-ucrt -3.1.0:x86-linux -3.1.0:x86-mingw32 3.1.0:x86_64-darwin 3.1.0:x86_64-linux 3.2.0:aarch64-linux 3.2.0:arm-linux 3.2.0:arm64-darwin 3.2.0:x64-mingw-ucrt -3.2.0:x86-linux -3.2.0:x86-mingw32 3.2.0:x86_64-darwin 3.2.0:x86_64-linux 3.3.0:aarch64-linux 3.3.0:arm-linux 3.3.0:arm64-darwin 3.3.0:x64-mingw-ucrt -3.3.0:x86-linux -3.3.0:x86-mingw32 3.3.0:x86_64-darwin 3.3.0:x86_64-linux diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fda2d929cef..714c98da15c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -569,8 +569,6 @@ jobs: - "arm-linux" - "arm64-darwin" - "x64-mingw-ucrt" - - "x86-linux" - - "x86-mingw32" # github actions does not support this runtime as of 2022-12, but let's build anyway - "x86_64-darwin" - "x86_64-linux" runs-on: ubuntu-latest @@ -594,28 +592,6 @@ jobs: path: gems retention-days: 1 - cruby-x86-linux-install: - needs: ["cruby-package", "ruby_versions"] - strategy: - fail-fast: false - matrix: - ruby: ${{ fromJSON(needs.ruby_versions.outputs.minors) }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/download-artifact@v4 - with: - name: cruby-x86-linux-gem - path: gems - - run: | - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - docker run --rm -v "$(pwd):/nokogiri" -w /nokogiri \ - --platform=linux/386 \ - ruby:${{matrix.ruby}} \ - ./scripts/test-gem-install gems - cruby-aarch64-linux-install: needs: ["cruby-package", "ruby_versions"] strategy: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac00a3ba50..4408d2914d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,13 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA ## next / unreleased -### ... +### Notable Changes + +#### Ruby + +This release ends support for Ruby 3.0, for which [upstream support ended 2024-04-23](https://www.ruby-lang.org/en/downloads/branches/). + +This release drops precompiled native platform gems for `x86-linux` and `x86-mingw32`. **These platforms are still supported.** Users on these platforms must install the "ruby platform" gem which requires a compiler toolchain. See [Installing the `ruby` platform gem](https://nokogiri.org/tutorials/installing_nokogiri.html#installing-the-ruby-platform-gem) in the installation docs. (#3369, #3081) ## v1.17.1 / 2024-12-10 diff --git a/LICENSE-DEPENDENCIES.md b/LICENSE-DEPENDENCIES.md index 8dc5e857fc4..1e950b6e37e 100644 --- a/LICENSE-DEPENDENCIES.md +++ b/LICENSE-DEPENDENCIES.md @@ -10,9 +10,9 @@ Note that this document is broken into multiple sections, each of which describe - [Platform Releases](#platform-releases) * [Default platform release ("ruby")](#default-platform-release-ruby) - * [Native LinuxⓇ platform releases ("x86_64-linux", "arm64-linux", "aarch64-linux", and "arm-linux")](#native-linux%E2%93%A1-platform-releases-x86_64-linux-arm64-linux-aarch64-linux-and-arm-linux) + * [Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux")](#native-linux%E2%93%A1-platform-releases-x86_64-linux-aarch64-linux-and-arm-linux) * [Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin")](#native-darwin-macos%E2%93%A1-platform-releases-x86_64-darwin-and-arm64-darwin) - * [Native WindowsⓇ platform releases ("x86-mingw32" and "x64-mingw32")](#native-windows%E2%93%A1-platform-releases-x86-mingw32-and-x64-mingw32) + * [Native WindowsⓇ platform releases ("x64-mingw-ucrt")](#native-windows%E2%93%A1-platform-releases-x64-mingw-ucrt) * [JavaⓇ (JRuby) platform release ("java")](#java%E2%93%A1-jruby-platform-release-java) - [Appendix: Dependencies' License Texts](#appendix-dependencies-license-texts) * [libgumbo](#libgumbo) @@ -51,7 +51,7 @@ The default platform release distributes the following dependencies in source fo This distribution can be identified by inspecting the included Gem::Specification, which will have the value "ruby" for its "platform" attribute. -### Native LinuxⓇ platform releases ("x86_64-linux", "arm64-linux", "aarch64-linux", and "arm-linux") +### Native LinuxⓇ platform releases ("x86_64-linux", "aarch64-linux", and "arm-linux") The native LinuxⓇ platform release distributes the following dependencies in source form: @@ -60,7 +60,7 @@ The native LinuxⓇ platform release distributes the following dependencies in s * [libgumbo](#libgumbo) * [zlib](#zlib) -This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "arm64-linux" for its "platform.cpu" attribute. +This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-linux" or "aarch64-linux" for its "platform.cpu" attribute. ### Native Darwin (macOSⓇ) platform releases ("x86_64-darwin" and "arm64-darwin") @@ -76,7 +76,7 @@ The native Darwin platform release distributes the following dependencies in sou This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x86_64-darwin" or "arm64-darwin" for its "platform.cpu" attribute. Darwin is also known more familiarly as "OSX" or "macOSⓇ" and is the operating system for many AppleⓇ computers. -### Native WindowsⓇ platform releases ("x86-mingw32" and "x64-mingw32") +### Native WindowsⓇ platform releases ("x64-mingw-ucrt") The native WindowsⓇ platform release distributes the following dependencies in source form: @@ -86,7 +86,7 @@ The native WindowsⓇ platform release distributes the following dependencies in * [zlib](#zlib) * [libiconv](#libiconv) -This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-mingw32" or "x86-mingw32" for its "platform.cpu" attribute. +This distribution can be identified by inspecting the included Gem::Specification, which will have a value similar to "x64-mingw-ucrt" for its "platform.cpu" attribute. ### JavaⓇ (JRuby) platform release ("java") diff --git a/README.md b/README.md index dc324b11163..1ec023dd4e0 100644 --- a/README.md +++ b/README.md @@ -131,11 +131,11 @@ If you are compiling the native extension against a system version of libxml2: Nokogiri ships pre-compiled, "native" gems for the following platforms: - Linux: - - `x86-linux` and `x86_64-linux` (req: `glibc >= 2.17`) + - `x86_64-linux` (req: `glibc >= 2.17`) - `aarch64-linux` and `arm-linux` (req: `glibc >= 2.29`) - Note that musl platforms like Alpine **are** supported - Darwin/MacOS: `x86_64-darwin` and `arm64-darwin` -- Windows: `x86-mingw32`, `x64-mingw32`, and `x64-mingw-ucrt` +- Windows: `x64-mingw-ucrt` - Java: any platform running JRuby 9.4 or higher To determine whether your system supports one of these gems, look at the output of `bundle platform` or `ruby -e 'puts Gem::Platform.local.to_s'`. diff --git a/rakelib/extensions.rake b/rakelib/extensions.rake index 3181dfed85d..fc37a97a2fb 100644 --- a/rakelib/extensions.rake +++ b/rakelib/extensions.rake @@ -46,14 +46,8 @@ CrossRuby = Struct.new(:version, :platform) do @host ||= case platform when "x64-mingw-ucrt" "x86_64-w64-mingw32" - when "x64-mingw32" - "x86_64-w64-mingw32" - when "x86-mingw32" - "i686-w64-mingw32" when "x86_64-linux" "x86_64-linux-gnu" - when "x86-linux" - "i686-linux-gnu" when "aarch64-linux" "aarch64-linux" when "x86_64-darwin" @@ -67,14 +61,10 @@ CrossRuby = Struct.new(:version, :platform) do def tool(name) (@binutils_prefix ||= case platform - when "x64-mingw-ucrt", "x64-mingw32" + when "x64-mingw-ucrt" "x86_64-w64-mingw32-" - when "x86-mingw32" - "i686-w64-mingw32-" when "x86_64-linux" "x86_64-redhat-linux-gnu-" - when "x86-linux" - "i686-redhat-linux-gnu-" when "aarch64-linux" "aarch64-linux-gnu-" when "x86_64-darwin" @@ -90,14 +80,10 @@ CrossRuby = Struct.new(:version, :platform) do def target_file_format case platform - when "x64-mingw-ucrt", "x64-mingw32" + when "x64-mingw-ucrt" "pei-x86-64" - when "x86-mingw32" - "pei-i386" when "x86_64-linux" "elf64-x86-64" - when "x86-linux" - "elf32-i386" when "aarch64-linux" "elf64-littleaarch64" when "x86_64-darwin" @@ -123,10 +109,6 @@ CrossRuby = Struct.new(:version, :platform) do case platform when "x64-mingw-ucrt" "x64-ucrt-ruby#{api_ver_suffix}.dll" - when "x64-mingw32" - "x64-msvcrt-ruby#{api_ver_suffix}.dll" - when "x86-mingw32" - "msvcrt-ruby#{api_ver_suffix}.dll" else raise "CrossRuby.libruby_dll: unmatched platform: #{platform}" end