-
Notifications
You must be signed in to change notification settings - Fork 257
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
Add arm64 architecture #399
Merged
Conversation
This file contains 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
larskanis
force-pushed
the
arm64
branch
4 times, most recently
from
December 27, 2024 17:51
2bc608a
to
ed282ec
Compare
@larskanis thanks for your great work on this!! I've raised the PR for Rubygems/Bundler here: https://github.com/rubygems/rubygems/pull/8378/files to support |
larskanis
force-pushed
the
arm64
branch
3 times, most recently
from
January 8, 2025 19:49
2ba8851
to
6078b89
Compare
Name the arm package only "arm" instead of arm64, since there is no Windows for arm 32 bit. Install to c:/Ruby34-arm by default
…on.so file So far ruby.exe and rubyw.exe contained a process-global manifest for side-by-side loading. This way the DLLs bundled to RubyInstaller could be moved to a dedicated directory, so that they aren't loaded accidently by other apps because they are in the PATH. It was introduced in b2bd630 The downside of a global manifest is that the dependent DLLs are always preferred over other DLL versions with the same name. This caused for instance openssl.gem to fail, when the libssl DLL linked at build time was newer than the libssl bundled with RubyInstaller. This patch introduces manifests per extension.so file with dedicated private dependencies. This way the bundled openssl.so is directly linked to it's own libssl.dll by an embedded manifest. It's similar to static linking libssl into openssl.so, but it allows to use unchanged libssl.dll from MINGW packages. If a new openssl.gem version is installed per "gem install openssl", it links to MSYS2/MINGW packages at build time. Since the resulting openssl.so doesn't contain the manifest, it also links to the MINGW packages at run time. Patching extension.so files requires to add all single files recursively as file tasks. Fixes #60
With the latest changes to rubyinstaller-packages, the ruby-core manifests are stored in the exe files. It's then sufficient to add manifests to the DLLs bundled to rubyinstaller, in order to declare the dependencies.
It was moved in ruby-3.2 to etc/ssl and short time later to bin/etc/ssl because of changes in MSYS2-MINGW. Both directory names are suboptimal. Now we have to move the libssl.dll, due to the SxS changes, so that the certs directory would change another time. To avoid another move this is now solved with a link (junction) to the original directory ruby/ssl . Downside is that mklink always creates a junction with absolute path, even when only a relative path is given to the command. It also needs a NTFS drive. When the ruby installation is moved to a USB stick, then the CA certs are no longer found. It can be manually fixed by moving the certs directory ruby/ssl into ruby/lib/ruby/<vers>/etc .
larskanis
force-pushed
the
arm64
branch
3 times, most recently
from
January 9, 2025 09:36
10a3042
to
c9db38d
Compare
Add DLL search path for legacy.dll loading libcrypto.dll and libcrypto.dll loading zlib.dll .
Adding file tasks within a rake tasks doesn't work. Dependencies must be defined prior to running the rake resolver. It also had the downside of priting too many log messages. Implementing own cp_r which invokes tasks definitions is the better solution.
It was introduced in InnoSetup-6.0
larskanis
force-pushed
the
arm64
branch
4 times, most recently
from
January 14, 2025 18:18
98ad477
to
ae90b30
Compare
It it too heavy to be introduced in stable releases. The creation of the junction file for OpenSSL is backported to Ruby-3.2.x and 3.3.x but it links to the old destination /bin/etc/ssl there. This should ease the transition to ruby-3.4 and makes the documentation unifrom.
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.
This add rake tasks for building RubyInstaller-head for arm64. They use the ruby-head version provided by oneclick/rubyinstaller2-packages#21
In general the installed Ruby+Devkit is already quite usable, but there are currently several issues with the build:
ruby_builtin_dlls
doesn't work. This also affectsbin/etc
directory with OpenSSL certificates. Workaround is to copy DLLs andetc
one level up.make btest
here. Currently one and the same coroutine switcher arm64 is used on Linux and Windows and although ABI is very similar, it probably needs to be adjusted for Windows like on x86/x64.gem "tzinfo-data", platforms: %i[ windows jruby ]
doesn't install the gem, since Ruby on Windows-Arm64 isn't recognized aswindows
platform.sqlite3
library. Workaround isgem install sqlite3 -- --enable-system-libraries
.libxml2
library. Workaround isgem install nokogiri -- --use-system-libraries
.Rails already works:
Closes #362