Skip to content

fix: Build with a correct OpenSSL config on loongarch64#2482

Closed
arrowd wants to merge 1 commit intonodejs:mainfrom
arrowd:alpine-loong64-24-fix
Closed

fix: Build with a correct OpenSSL config on loongarch64#2482
arrowd wants to merge 1 commit intonodejs:mainfrom
arrowd:alpine-loong64-24-fix

Conversation

@arrowd
Copy link
Copy Markdown

@arrowd arrowd commented May 4, 2026

Description

This change sets OPENSSL_ARCH to a correct value for loongarch64 and also passes --openssl-no-asm to the configure script, because there is no asm configuration in gyp files for loongarch64.

Motivation and Context

Trying to use asm config makes gyp pick up the fallback x86-64 config instead of loongarch64 one. This in turn leads to -m64 being passed to the compiler, which finally leads to compilation errors.

Testing Details

docker image build successfully creates a corresponding image.

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

Copy link
Copy Markdown
Contributor

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

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

I can't speak to the loongarch64 target with any experience. I do see that loong64 is listed under https://github.com/nodejs/node/blob/main/BUILDING.md#platform-list as "Support Type: Experimental" though.

If this is generally accepted as a change, it would need to go into the https://github.com/nodejs/docker-node/blob/main/Dockerfile-alpine.template file

The individual Dockerfile, that are used to build, are overwritten by the script update.sh, so it doesn't work to submit a PR to change any of these files directly.

Trying to use asm config makes gyp pick up the fallback x86-64 config instead
of loongarch64 one. This in turn leads to -m64 being passed to the compiler.
@arrowd arrowd force-pushed the alpine-loong64-24-fix branch from 6e89875 to 87c4b49 Compare May 4, 2026 15:39
@nschonni
Copy link
Copy Markdown
Member

nschonni commented May 4, 2026

Doesn't look like the Official Images support loongarch64 docker-library/official-images#16404, so this doesn't make sense to land.

@nschonni nschonni closed this May 4, 2026
Copy link
Copy Markdown
Contributor

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

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

@arrowd

I see you also tried through alpinelinux/docker-alpine#488 so I guess you won't be surprised that your PR can't be accepted here either.

We also wouldn't have any way to test it in CI as far as I can see, based on the link that @nschonni gave as well.

@arrowd
Copy link
Copy Markdown
Author

arrowd commented May 4, 2026

Doesn't look like the Official Images support loongarch64 docker-library/official-images#16404, so this doesn't make sense to land.

Can't agree with this statement. Docker itself does support loong64, as well as Podman running in the Docker compat mode. My understanding is that repositories like this one or docker-alpine exist to allow other people, not only Docker Hub builders, to build images. My change removes the need for users to debug and fix Dockerfiles if they're building for loong64. It also do not incur any maintenance burder on you. Why turn back this contribution only because Docker Inc does not want to support loong64?

@nschonni
Copy link
Copy Markdown
Member

nschonni commented May 4, 2026

This repo is used to create the Official Images PRs and some light guidance

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.

3 participants