From: "bkuhlmann (Brooke Kuhlmann) via ruby-core" Date: 2023-02-11T15:58:04+00:00 Subject: [ruby-core:112368] [Ruby master Bug#19434] Fix YJIT compilation for Alpine Linux 3.17.2 Issue #19434 has been reported by bkuhlmann (Brooke Kuhlmann). ---------------------------------------- Bug #19434: Fix YJIT compilation for Alpine Linux 3.17.2 https://bugs.ruby-lang.org/issues/19434 * Author: bkuhlmann (Brooke Kuhlmann) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ## Overview Hello. ���� With the recent [Alpine Linux 3.17.2](https://www.alpinelinux.org/posts/Alpine-3.17.2-released.html) patch release -- which includes OpenSSL security patches -- I'm no longer able to build an Alpine Linux Docker image with YJIT enabled for Ruby. Prior to the 3.17.2 patch release, I could build Ruby + YJIT without issue. Here's the error I'm seeing when building locally: ``` #0 409.6 gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 #0 409.6 Copyright (C) 2022 Free Software Foundation, Inc. #0 409.6 This is free software; see the source for copying conditions. There is NO #0 409.6 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #0 409.6 #0 409.7 compiling ./main.c #0 409.7 compiling dmydln.c #0 409.7 compiling miniinit.c #0 409.7 compiling dmyext.c #0 410.1 making dummy probes.h #0 410.2 compiling ast.c #0 410.7 compiling bignum.c #0 410.8 compiling class.c #0 411.8 compiling compar.c #0 414.1 compiling compile.c #0 414.9 compiling complex.c #0 421.0 compiling cont.c #0 421.7 In file included from cont.c:38: #0 421.7 yjit.h:24:3: error: #error YJIT unsupported platform #0 421.7 24 | # error YJIT unsupported platform #0 421.7 | ^~~~~ ``` ...but what I see in the `yjit.h` source code is: ``` // We generate x86 assembly #if defined(_WIN32) ? defined(_M_AMD64) : defined(__x86_64__) // x86_64 platforms without mingw/msys or x64-mswin #else # error YJIT unsupported platform #endif ``` ...so AMD 64 should still be supported. ## Steps to Recreate Probably the simplest way to recreate this, locally, is to use my Docker project: 1. Run: `git clone https://github.com/bkuhlmann/docker-alpine-ruby` 1. Run: `cd docker-alpine-ruby` 1. Edit the top of the `Dockerfile` so it says: `FROM bkuhlmann/alpine-base:2.0.3` (this ensures Alpine Linux 3.17.2 is being used). 1. Run `docker build --platform linux/amd64 .` 1. Wait for the build to fail. ## Environment **macOS** `macOS 13.2` **Docker** ``` Client: Cloud integration: v1.0.29 Version: 20.10.22 API version: 1.41 Go version: go1.18.9 Git commit: 3a2c30b Built: Thu Dec 15 22:28:41 2022 OS/Arch: darwin/arm64 Context: default Experimental: true Server: Docker Desktop 4.16.2 (95914) Engine: Version: 20.10.22 API version: 1.41 (minimum version 1.12) Go version: go1.18.9 Git commit: 42c8b31 Built: Thu Dec 15 22:25:43 2022 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.14 GitCommit: 9ba4b250366a5ddde94bb7c9d1def331423aa323 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0 ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/