Skip to content
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

Compatibility issue for version 1.0.6+ on ARM64 systems GLIBC_2.33 not found #630

Open
availity-droo opened this issue Jul 21, 2023 · 4 comments

Comments

@availity-droo
Copy link

Using node-18-bullseye-slim image, we receive the following error when loading the libxmljs module on macOS M1 containers. This base image includes GLIBC 2.31.

Error: /lib/aarch64-linux-gnu/libc.so.6: version 'GLIBC_2.33' not found

This same error does not occur on images built for x64 using the bullseye-slim image.

Issue appears to be similiar to #596

Is it possible to perform a similar build change to allow this to function on bullseye based images for arm64?

@PurrBiscuit
Copy link

Just ran into the same error message on my M1 Mac in a Docker container using the node-18-bullseye-slim image.

@lucasadrianof
Copy link

lucasadrianof commented Jul 26, 2023

This is a bit hacky but we were able to get around this issue by recompiling the libxmljs binary on the container using multi-stage builds. Throwing it here in case it helps anyone having similar issues:

FROM node:18-bullseye-slim as base

WORKDIR /home/node/app

COPY package.json package-lock.json ./
RUN npm install --no-save

FROM node:18-bullseye-slim as libxmljs-builder

WORKDIR /home/node/app

RUN apt-get update && apt-get install -y build-essential python3

COPY --from=base /home/node/app/node_modules ./node_modules

RUN rm -rf node_modules/libxmljs/build && \
  cd node_modules/libxmljs && \
  npm run build

FROM node:18-bullseye-slim

USER node
WORKDIR /home/node/app

COPY --chown=node:node --from=libxmljs-builder /home/node/app/node_modules ./node_modules
COPY --chown=node:node . ./

CMD ["npm", "run start"]

When the binaries published by this package are compatible with arm64 on Debian all you'll need to do is remove the libxmljs-builder stage and copy the node_modules from the base stage instead.

@availity-droo
Copy link
Author

We're using that workaround for right now for our aarch64 builds. Is there any potential Github Actions change to have the aarch64/arm build to also use the manylinux_2_28 container that the x64 builds are using?

@lucasadrianof
Copy link

lucasadrianof commented Aug 25, 2023

We're using that workaround for right now for our aarch64 builds. Is there any potential Github Actions change to have the aarch64/arm build to also use the manylinux_2_28 container that the x64 builds are using?

From what I was reading ubuntu-latest has a different glibc version from Debian (and possibly other distros) on
arm64. The solution, from what I could gather, would be to build the arm64 binaries on Debian instead of Ubuntu (or use an older Ubuntu version, currently it's using latest).

commercialhaskell/stack#5876
https://stackoverflow.com/a/71515909 (The Debian and Ubuntu versions here are different, but the mismatching
glibc version seems to remain in current versions.

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

No branches or pull requests

3 participants