Can't build Docker image with 0.30.0
With 0.29.0, I can run the Docker image.
With 0.30.0, I can't run the Docker image, but I can run the app in an IEX session.
{load_failed,
web-1 | "Failed to load NIF library: '/lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33'
not found (required by /app/lib/exqlite-0.30.0/priv/sqlite3_nif.so)'"
}}}}},
I have the exact same issue, with the same solution.
@cocoa-xu would the change you did here https://github.com/elixir-sqlite/exqlite/pull/322 cause this issue? I have to support both glibc and musl libc backings.
No, it's not relevant.
Thanks!
Ubuntu 20.04 has glibc 2.31.
2.33 is the newer one from https://github.com/elixir-sqlite/exqlite/commit/999a9351a8f5c29031182277d0392de86881fea2

@ndrean what version of glibc are you running in the docker container?
@warmwaffles Using DEBIAN_VERSION=bullseye-20250317-slim ------> : 2.31 (ldd --version)
Running into the same problem trying to deploy a fly.io app. fly auto generates a docker image with
ARG DEBIAN_VERSION=bullseye-20241202-slim
everything deploys but I get
ord [info] ~c"Failed to load NIF library: '/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/lib/exqlite-0.30.0/priv/sqlite3_nif.so)'"}}
in the logs
I see. Okay. Looks like I can't use ubuntu-latest to compile with.
@ndrean and @hlista I've pushed an update to use ubuntu 22.04 for the precompiled images. If this is still a problem for you, I am going to suggest you update your base docker image to a later version of glibc, or use a musl based image, or build this package without the precompiled binaries. (see: https://github.com/elixir-sqlite/exqlite?tab=readme-ov-file#compile-time-configuration)
v0.30.1 was published.
The latest I can get is 20250428 (https://hub.docker.com/r/hexpm/elixir/tags?name=27.3.3) It uses again:
ldd (Debian GLIBC 2.31-13+deb11u11) 2.31
With 0.30.1:
> mix deps | grep exqlite
* exqlite (Hex package) (mix)
locked at 0.30.1 (exqlite) 15714871
and
config :exqlite, force_build: true
it works 🎉
Mainly I was trying to stop github from screaming at me about using an outdated image. I have a love hate with the precompiled binaries. On the one hand super convenient. On the other, boy it's a quagmire having to navigate all the possible glibc's floating out there.
I have this same problem between versions 0.29.0 and 0.32.1.
A tale as old as time. Precompiled binaries being problematic. 😞 I'll take a look soon. The workaround is to do
config :exqlite, force_build: false