prebuild / docker-images

Docker images for cross compiling prebuilt binaries for Node.js native addons.
GNU General Public License v3.0
10 stars 7 forks source link

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

Closed DanSnow closed 2 years ago

DanSnow commented 2 years ago

Description

This PR add two docker images:

Context

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

vweevers commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 (https://github.com/prebuild/prebuildify-cross/issues/13), when we get there we'll do a major version bump and evaluate whether to keep linux-arm64-lts.

DanSnow commented 2 years ago

@vweevers Added :+1:. Could you take a look?

vweevers commented 2 years ago

2.1.0

DanSnow commented 2 years ago

Thanks