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

Add linux-arm64-lts and linux-arm64-musl #27

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

DanSnow
Copy link
Contributor

@DanSnow DanSnow commented Jun 26, 2022

Description

This PR add two docker images:

  • linux-arm64-lts: arm64 image with glibc 2.27
  • linux-arm64-musl: arm64 image with musl as libc

Context

We are running Node.js on an arm server. But when prebuilding native extension, we encounter the following issue:

  • linux-arm64 image has Glibc 2.34, which is higher than the official image on the docker hub (node:lts-bullseye), which is 2.31
  • no alpine (musl) base image for arm64

@vweevers
Copy link
Member

vweevers commented Jun 26, 2022

linux-arm64-musl is good to have.

I'm not so sure about linux-arm64-lts. Why is a higher glibc version a problem for you? Maybe we should fix our existing linux-arm64 image instead. What other differences are there between the two dockcross base images?

@DanSnow
Copy link
Contributor Author

DanSnow commented Jun 26, 2022

Why is a higher glibc version a problem for you?

We tried to use node:lts-bullseye as base image. But we got an error like this:

/lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /path/to/project/node_modules/rocksdb/prebuilds/linux-arm64/node.napi.armv8.node)

This is because the glibc version in linux-arm64 is higher then the version in node:lts-bullseye. linux-arm64-lts will target to a lower version of glibc 2.27 which is compitable with node:lts-bullseye.

Maybe we should fix our existing linux-arm64 image instead

I can modify the PR to use linux-arm64-lts as the base image for linux-arm64

What other differences are there between the two dockcross base images?

According to the document for dockcross, the main difference is the version of glibc and gcc

@vweevers
Copy link
Member

vweevers commented Jun 26, 2022

I can modify the PR to use linux-arm64-lts as the base image for linux-arm64

Due to the GCC version difference, that might be a breaking change. We can hold off on that for now, keep this PR as-is. At some point I want to align and upgrade GCC versions (prebuild/prebuildify-cross#13), when we get there we'll do a major version bump and evaluate whether to keep linux-arm64-lts.

Copy link
Member

@vweevers vweevers left a comment

Choose a reason for hiding this comment

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

Can you please add these new images to the README?

@DanSnow
Copy link
Contributor Author

DanSnow commented Jun 27, 2022

@vweevers Added 👍. Could you take a look?

@vweevers vweevers merged commit 901f570 into prebuild:master Jul 1, 2022
@vweevers
Copy link
Member

vweevers commented Jul 1, 2022

2.1.0

@DanSnow
Copy link
Contributor Author

DanSnow commented Jul 1, 2022

Thanks

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