-
Notifications
You must be signed in to change notification settings - Fork 200
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
"symbol not found" on alpine 3.19 #434
Comments
Similar report just came in #435, too. I believe something changed in the alpine image, since we test alpine in the CI pipeline and it passed last week, but started failing yesterday with the new image
Will investigate. In the meantime, a workaround is to use |
I copied By looking the exported symbols from the library (e.g., |
Just a note: the symbol missing for the user in #435 is |
OK, it seems this was an intentional breaking change in Musl 1.24:
So if I understood correctly, functions with the Here are examples of other projects that were also affected by this: |
@pdfrod Thank you so much for doing this research! I should have time tomorrow to investigate if I can work around this in the native (precompiled) gems. |
I'm not sure there's a fix for this other than for rake-compiler-dock to support generating native musl-specific gems. Upstream issue is rake-compiler/rake-compiler-dock#75 |
Workarounds:
(2023-12-19 - Maintainer's note: these workarounds will compile the gem at installation time on the target machine, and are fully explained in INSTALLATION.md) |
Thanks for looking into this; I did wonder if it was upstream. I'll pin to alpine-3.18 for now. |
because 3.19 fails due to #434. While I work on better musl support, this makes CI a bit more meaningful.
I've updated the issue description with a TLDR summary of the workarounds. |
because 3.19 fails due to #434. While I work on better musl support, this makes CI a bit more meaningful.
because 3.19 fails due to #434. While I work on better musl support, this makes CI a bit more meaningful.
Confirm a breaking change in the Alpine image. I redeployed the same app with no change to the
And that this diff got my deploy working again: --- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ruby:3.2.2-alpine AS base
+FROM ruby:3.2.2-alpine3.18 AS base ( 👋 👋 Hi Mike) |
Please follow #442 for the fix-in-progess for this issue. |
See: sparklemotion/sqlite3-ruby#434 which is apparently a problem in rake-compiler-dock, see: rake-compiler/rake-compiler-dock#75
There were 2 issues that were breaking the build and tests. 1. Updating Ruby Gems itself without specifying a version causes it to update to the latest version which requires Ruby 3. Instead, we specify the latest version compatible with the installed Ruby. Compatibility versions found here: https://rubygems.org/api/v1/versions/rubygems-update.json 2. All builds were having issues with missing shared libraries. In the case of the Ruby 2.6 images it was nokogiri and for the Ruby 3.0 image it was sqlite3. A common fix for all the builds was to configure Bundler to consider the platform during dependency resolution. More information found here: https://bundler.io/v1.14/whats_new.html sparklemotion/sqlite3-ruby#434 github/pages-gem#839 - alt. fix for Ruby 2.6
Should be fixed in v2.0.0 with the linux-musl native gem. |
Problems with `sqlite3-ruby` and 3.19 have been fixed in version 2.0.0 of the gem, so upgrade that too. See sparklemotion/sqlite3-ruby#434
sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434
sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434
sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434
sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434
* Add support for SQLite * Use async actioncable adapter in sqlite mode * Downgrade sqlite3 gem for Rails compatibility * Use slim docker image to fix sqlite3 issue sqlite3 gem version 2.x fixes this but 1.x is required by Rails. Reference: sparklemotion/sqlite3-ruby#434 * Use LOWER + LIKE instead of ILIKE since SQLite doesn't have ILIKE
TL;DR from the maintainers -- read me first!
You can work around this issue in three ways:
>= v2.0.0
(The original bug description follows)
On the latest ruby image with alpine 3.19, I can install
sqlite3
ruby gem, but it emits "symbol not found" errors at runtime.This is a quick test on alpine 3.18:
And here's the same on 3.19:
I'm not sure if this is the gem or the docker image causing the issue here.
The text was updated successfully, but these errors were encountered: