Skip to content

ffi: port semi-colon fix for riscv64 (and others)#63794

Open
sxa wants to merge 1 commit into
nodejs:mainfrom
sxa:riscv_libffi_fix
Open

ffi: port semi-colon fix for riscv64 (and others)#63794
sxa wants to merge 1 commit into
nodejs:mainfrom
sxa:riscv_libffi_fix

Conversation

@sxa

@sxa sxa commented Jun 8, 2026

Copy link
Copy Markdown
Member

This PR pulls across the fix which has been accepted upstream at libffi/libffi#968 and will therefore be in any future versions of libffi that we take.

@ShogunPanda I'm not sure if we have implemented any specific rules/restrictions on taking fixes like this so hopefully this is ok to go in as a patch since I had it merged upstream before raising this.

Fixes nodejs/unofficial-builds#235 which has the explanation of when and why it occurs.

While this includes all platforms which would have the same issue I'll note that loongarch does not show the problem in the unofficial builds on that platform but that is likely because it is using gcc and node clang. Also noting that we have loongarch64 in this PR as opposed to the upstream loongarch directory - that is because of this upstream change where the directory was renamed.

FYI @nodejs/platform-loong64 @nodejs/platform-riscv64

Signed-off-by: Stewart X Addison <sxa@ibm.com>
@sxa sxa requested a review from ShogunPanda June 8, 2026 14:40
@sxa sxa self-assigned this Jun 8, 2026
@sxa sxa added the riscv64 Issues and PRs related to the riscv64 architecture. label Jun 8, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Jun 8, 2026
@sxa sxa added request-ci Add this label to start a Jenkins CI on a PR. and removed needs-ci PRs that need a full CI run. labels Jun 8, 2026
@ShogunPanda

Copy link
Copy Markdown
Contributor

@sxa I'm not sure about this. I guess we should wait for a official libffi fix and then run the update, or am I wrong?
FWIW, I don't mind accepting this, you did an amazing job following it up. I just want to follow the right procedure.

@sxa

sxa commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@sxa I'm not sure about this. I guess we should wait for a official libffi fix and then run the update, or am I wrong? FWIW, I don't mind accepting this, you did an amazing job following it up. I just want to follow the right procedure.

Yeah I understand that although I'm not sure when that might be. The last release (the one we're on) was in August last year. Given that it causes a build break at the moment with libffi enabled (albeit currently on an unofficial platform) I figured it would be preferable to float the patch for now and then pick up the fix officially when there is another release.

It will be included in 3.6.0 but it currently doesn't have a target release date. (Maybe @atgreen has that information as I don't think there's a regular release schedule)

@sxa

sxa commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Re-running Test Shared libraries / x86_64-darwin: with shared libraries which failed on first attempt. EDIT: Re-run looks good

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

I think we should follow the same pattern we have for floating patches on dependencies. I'm not overly concerned because this is still experimental and libffi is not a fast moving target.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 8, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ShogunPanda

Copy link
Copy Markdown
Contributor

lgtm

I think we should follow the same pattern we have for floating patches on dependencies. I'm not overly concerned because this is still experimental and libffi is not a fast moving target.

Ok, then it LGTM as well.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file. riscv64 Issues and PRs related to the riscv64 architecture.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build break on v26.2.0+ on Linux/riscv64 with libffi being enabled by default

4 participants