Skip to content

Fix zlib on Windows, remove unused readline, add check for missing DLLs - #352

Open
nmburgan wants to merge 3 commits into
mainfrom
windows_libz_dll
Open

nmburgan wants to merge 3 commits into
mainfrom
windows_libz_dll

Conversation

@nmburgan

Copy link
Copy Markdown
Member

MSYS2's zlib 1.4 package links -lz to libz-1.dll, so Ruby's zlib
extension imports that DLL. The package still has a zlib1.dll, but it
is a separate legacy build that the extension doesn't use. Copying it
left zlib unloadable on Windows in openvox-agent 9.4.0.

Additionally, Ruby 3.2 built readline.so against Cygwin's mingw readline, but the
runtime never contained libreadline7.dll, so the extension could not
load and readline.rb fell back to Reline. Without the readline package
the extension isn't built and Reline is used the same way.

Lastly, this adds a check to the build task to ensure we aren't shipping without
required DLLs.

MSYS2's zlib 1.4 package links -lz to libz-1.dll, so Ruby's zlib
extension imports that DLL. The package still has a zlib1.dll, but it
is a separate legacy build that the extension doesn't use. Copying it
left zlib unloadable on Windows in openvox-agent 9.4.0.

Fixes #350

Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com>
Ruby 3.2 built readline.so against Cygwin's mingw readline, but the
runtime never contained libreadline7.dll, so the extension could not
load and readline.rb fell back to Reline. Without the readline package
the extension isn't built and Reline is used the same way.

Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com>
A DLL from the build toolchain loads during the build, where the
toolchain's bin directory is on PATH, so a runtime that leaves one out
still builds and only fails on other machines. That is how the
2026.11.12.1 runtime shipped a zlib.so that needs libz-1.dll. After the
vanagon build, check every packaged binary with objdump and abort when
it imports a DLL that is in the toolchain's bin directory but not in
the package.

Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com>
@nmburgan

Copy link
Copy Markdown
Member Author

Tests to make sure this works on Windows, since the PR checks don't build Windows
https://github.com/OpenVoxProject/puppet-runtime/actions/runs/43993193715
https://github.com/OpenVoxProject/puppet-runtime/actions/runs/43993146281

@Sharpie Sharpie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct, and matches the change that RubyInstaller made upstream:

oneclick/rubyinstaller2@cd8cb97

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants