Fix OpenSSL version conflict + decouple Ruby & dependencies entirely from Apple base OS libraries#226
Open
trinitronx wants to merge 130 commits into
Open
Fix OpenSSL version conflict + decouple Ruby & dependencies entirely from Apple base OS libraries#226trinitronx wants to merge 130 commits into
trinitronx wants to merge 130 commits into
Conversation
Note: From current chef-workstation manifest, they use 3.0.12. Homebrew uses: 3.3.1 We may need to adjust... but it should be ABI compatible 🤷 Depends on: rvm/rvm#5480 If RVM is insistent on using openssl@1.1, you need to: rvm get master
Current chef-workstation version manifest:
chef-workstation 24.6.1066
Component Installed Version Version GUID Overridden From
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
bzip2 1.0.8 sha256:ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
c_rehash_ruby main path:/Users/anka/buildkite-workspace/omnibus/files/../../components/rehash
cacerts 2022-10-11 sha256:2cff03f9efdaf52626bd1b451d700605dc1ea000c5da56bd0fc59f8f43071040
chef-analyze 0.1.186 git:e1a9d15d95fcaa307343f227a5c165d3b1b16c83 main
chef-workstation-app 0.2.191
config_guess master git:84f04b02a7e2fc8eaa9d52deee5f6d57b06fe447
curl 8.4.0 sha256:816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427
expat 2.5.0 sha256:6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033
gem-permissions 0.0.1
gem-version-manifest 24.6.1066
gems 24.6.1066
git-custom-bindir 2.39.3 sha256:2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e
go 1.21.5 sha256:a2e1d5743e896e5fe1e7d96479c0a769254aed18cf216cf8f4c3a2300a9b3923 1.19.5
go-uninstall 0.0.1
google-protobuf v3.21.12 git:f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c
habitat 1.6.1041 sha256:2dbde6139a47341d63e696014262b37958461fdaed7cfafe5e72f534bc66e40e
libarchive 3.6.2 sha256:ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3
libedit 20120601-3.0 sha256:51f0f4b4a97b7ebab26e7b5c2564c47628cdb3042fd8ba8d0605c719d2541918
libffi 3.4.2 sha256:540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620 3.4.4
libiconv 1.16 sha256:e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 1.17
liblzma 5.2.5 sha256:f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10 5.2.10
libnghttp2 1.58.0 sha256:9ebdfbfbca164ef72bdf5fd2a94a4e6dfb54ec39d2ef249aeb750a91ae361dfb
libxml2 2.12.5 sha256:a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21 2.11.7
libxslt 1.1.39 sha256:2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0
libyaml 0.1.7 sha256:8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729 0.2.5
main-chef-wrapper 24.6.1066
more-ruby-cleanup 24.6.1066
ncurses 6.4 sha256:6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
openssl 3.0.12 sha256:f93c9e8edde5e9166119de31755fc87b4aa34863662f67ddfcba14d0b6b69b61
openssl-customization 24.6.1066
pcre 8.45 sha256:4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09
preparation 1.0.0
rb-fsevent-gem 623f64a7edfd2505e64aa2125f01a54ffd6166ba git:623f64a7edfd2505e64aa2125f01a54ffd6166ba
ruby 3.1.2 sha256:61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e 3.1.3
ruby-cleanup 1.0.0
ruby-env-script 24.6.1066
rubygems-customization 24.6.1066
shebang-cleanup 0.0.2
uninstall-scripts 24.6.1066
version-manifest 0.0.1
zlib 1.3.1 sha256:9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 1.2.13
Due to macOS stock libs being so outdated, and the general hostility of Apple's OS-level changes to installing Ruby + dependencies over **many** years... we must now go down the path of installing everything we need from Homebrew. This will come with its own breakages due to Homebrew's history of formula deprecations, renames, etc... C'est la vie Currently including: - libffi - libreadline - libxslt - libyaml
Part of the effort to decouple our Ruby installation as much as possible from macOS, to insulate against the incessant changes pushed by Apple. Similar to postmodern/ruby-install#484, we will also install `ncurses` from Homebrew. Avoiding Apple's system-installed version for any Ruby versions installed using RVM.
This is because of: Homebrew/homebrew-bundle#547
for more information, see https://pre-commit.ci
./configure script error was:
checking target architectures... arm64e
checking arch option... configure: error: unknown target architecture: arm64e
install.log error was:
rbs 2.1.0
Building native extensions. This could take a while...
/Users/runner/.rvm/src/ruby-3.1.2/lib/rubygems/ext/builder.rb:95:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
current directory: /Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
/Users/runner/.rvm/rubies/ruby-3.1.2/bin/ruby --disable\\=gems -I/Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/arm64-darwin23 -I /Users/runner/.rvm/src/ruby-3.1.2/lib -r ./siteconf20250204-61114-6gdw6r.rb extconf.rb
creating Makefile
current directory: /Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
make DESTDIR\\= clean
dyld[61119]: terminating because inserted dylib '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' could not be loaded: tried: '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[61119]: tried: '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
current directory: /Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0/ext/rbs_extension
make DESTDIR\\=
dyld[61120]: terminating because inserted dylib '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' could not be loaded: tried: '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[61120]: tried: '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.2/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
make failed, uncaught signal 6
Gem files will remain installed in /Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/gems/rbs-2.1.0 for inspection.
Results logged to /Users/runner/.rvm/rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/extensions/arm64-darwin-23/3.1.0/rbs-2.1.0/gem_make.out
RVM warning was:
Required ruby-3.1.3 is not installed.
To install do: 'rvm install "ruby-3.1.3"'
Checking requirements for osx.
Missing required packages: pkg-config openssl@1.1
Somehow it happened there is no executable 'openssl',
run 'brew doctor' and make sure latest 'openssl@1.1' is installed properly.
mkmf.log error was:
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/runner/.rvm/rubies/ruby-3.1.3/lib:/Users/runner/.rvm/src/ruby-3.1.3 "gcc -o conftest -I/Users/runner/.rvm/rubies/ruby-3.1.3/include/ruby-3.1.0/arm64-darwin23 -I/Users/runner/.rvm/rubies/ruby-3.1.3/include/ruby-3.1.0/ruby/backward -I/Users/runner/.rvm/rubies/ruby-3.1.3/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/libffi/3.4.6/include -I/opt/homebrew/opt/gdbm/include -I/opt/homebrew/Cellar/libyaml/0.2.5/include -I/opt/homebrew/Cellar/readline/8.2.13/include -I/opt/homebrew/Cellar/openssl@3/3.4.0/include -I/opt/homebrew/Cellar/jemalloc/5.3.0/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/libksba/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/zlib/include -fdeclspec -Wno-error=implicit-function-declaration -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -fno-common -pipe conftest.c -L. -L/Users/runner/.rvm/rubies/ruby-3.1.3/lib -L/opt/homebrew/opt/gdbm/lib -L/opt/homebrew/Cellar/libyaml/0.2.5/lib -L/opt/homebrew/Cellar/readline/8.2.13/lib -L/opt/homebrew/Cellar/openssl@3/3.4.0/lib -L/opt/homebrew/Cellar/jemalloc/5.3.0/lib -L. -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/libksba/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/zlib/lib -fstack-protector-strong -L/opt/homebrew/opt/gdbm/lib -L/opt/homebrew/Cellar/libyaml/0.2.5/lib -L/opt/homebrew/Cellar/readline/8.2.13/lib -L/opt/homebrew/Cellar/openssl@3/3.4.0/lib -L/opt/homebrew/Cellar/jemalloc/5.3.0/lib -arch arm64 -lruby.3.1 -ljemalloc"
dyld[63108]: terminating because inserted dylib '/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' could not be loaded: tried: '/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), './libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/rubies/ruby-3.1.3/lib/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
dyld[63108]: tried: '/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/src/ruby-3.1.3/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e')), './libruby.3.1.dylib' (no such file), '/Users/runner/.rvm/rubies/ruby-3.1.3/lib/libruby.3.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'arm64e'))
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
Passing `-e` in `RUBYOPT` was not allowed.
Error was:
ruby: invalid switch in RUBYOPT: -e (RuntimeError)
Note: The heredoc did not parse properly for passing to -e
…issues Also, this is the version in chef-workstation 24.12.1073
…atch)
Error was:
Patch 'osx-arch-fix' not found.
There has been an error applying the specified patches. Halting the installation.
Required ruby-3.1.6 is not installed.
Current chef-workstation version manifest:
chef-workstation 25.5.1084
Component Installed Version Version GUID Overridden From
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
autoconf 2.69 sha256:954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969
bzip2 1.0.8 sha256:ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
c_rehash_ruby main path:/Users/anka/buildkite-workspace/omnibus/files/../../components/rehash
cacerts 2022-10-11 sha256:2cff03f9efdaf52626bd1b451d700605dc1ea000c5da56bd0fc59f8f43071040
chef-analyze 0.1.187 git:bb59d4c0a02e719017ff9cde0bb137f19ae7b381 main
chef-workstation-app 0.2.191
config_guess master git:84f04b02a7e2fc8eaa9d52deee5f6d57b06fe447
curl 8.12.1 sha256:7b40ea64947e0b440716a4d7f0b7aa56230a5341c8377d7b609649d4aea8dbcf 8.4.0
expat 2.6.4 sha256:fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278
gecode 3.7.3 sha256:75faaaa025a154ec0aef8b3b6ed9e78113efb543a92b8f4b2b971a0b0e898108
gem-permissions 0.0.1
gem-version-manifest 25.5.1084
gems 25.5.1084
git-custom-bindir 2.39.3 sha256:2f9aa93c548941cc5aff641cedc24add15b912ad8c9b36ff5a41b1a9dcad783e
go 1.23.9 sha256:50200cba5173100a6e880098cf3b2db4063394beaf7374e9766b6c19bb18012d 1.19.5
go-uninstall 0.0.1
google-protobuf v3.21.12 git:f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c
habitat 1.6.1243 sha256:3b8054ee87fa08c12348bb6c661ef140dad100857f0682e84f92a6500edb3add
libarchive 3.7.9 sha256:aa90732c5a6bdda52fda2ad468ac98d75be981c15dde263d7b5cf6af66fd009f 3.6.2
libedit 20120601-3.0 sha256:51f0f4b4a97b7ebab26e7b5c2564c47628cdb3042fd8ba8d0605c719d2541918
libffi 3.4.2 sha256:540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620 3.4.4
libiconv 1.16 sha256:e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 1.17
liblzma 5.2.5 sha256:f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10 5.2.10
libnghttp2 1.58.0 sha256:9ebdfbfbca164ef72bdf5fd2a94a4e6dfb54ec39d2ef249aeb750a91ae361dfb
libxml2 2.12.10 sha256:c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995 2.11.7
libxslt 1.1.43 sha256:5a3d6b383ca5afc235b171118e90f5ff6aa27e9fea3303065231a6d403f0183a 1.1.39
libyaml 0.1.7 sha256:8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729 0.2.5
m4 1.4.18 sha256:ab2633921a5cd38e48797bf5521ad259bdc4b979078034a3b790d7fec5493fab
main-chef-wrapper 25.5.1084
more-ruby-cleanup 25.5.1084
ncurses 6.4 sha256:6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
openssl 3.2.4 sha256:b23ad7fd9f73e43ad1767e636040e88ba7c9e5775bfa5618436a0dd2c17c3716
openssl-customization 25.5.1084
pcre 8.45 sha256:4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09
preparation 1.0.0
rb-fsevent-gem 623f64a7edfd2505e64aa2125f01a54ffd6166ba git:623f64a7edfd2505e64aa2125f01a54ffd6166ba
remove-old-gems 25.5.1084
ruby 3.1.6 sha256:0d0dafb859e76763432571a3109d1537d976266be3083445651dc68deed25c22 3.1.3
ruby-cleanup 1.0.0
ruby-env-script 25.5.1084
rubygems-customization 25.5.1084
shebang-cleanup 0.0.2
uninstall-scripts 25.5.1084
version-manifest 0.0.1
zlib 1.3.1 sha256:9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 1.2.13
…acOS Monterey release (12.7.6)
…prout-wrap into fix-openssl-version-conflict-REBASE Conflicts: bootstrap-scripts/bootstrap.sh
012d611 to
61ec859
Compare
Conflicts: bootstrap-scripts/bootstrap.sh soloistrc.lyra.yml
…ersion-conflict Conflicts: .ruby-version .rubygems-version bootstrap-scripts/bootstrap.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.