Skip to content

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

Description

@sxa

Title says it all. Here's the log and the error is as follows:

In file included from ../src/node_metadata.cc:19:
Release/obj/gen/libffi/ffi.h:247:23: error: extra ';' inside a struct [-Werror,-Wextra-semi]
  247 |   FFI_EXTRA_CIF_FIELDS;
      |                       ^
1 error generated.
make[2]: *** [libnode.target.mk:539: /home/node/node-v26.3.0/out/Release/obj.target/libnode/src/node_metadata.o] Error 1

Activity

added
riscv64Items impacting the RISC-V 64-bit platform
on Jun 1, 2026
changed the title [-]Build break on v26.3.0 on Linux/riscv64[/-] [+]Build break on v26.2.0+ on Linux/riscv64 with libffi being enabled by default[/+] on Jun 1, 2026

sxa commented on Jun 2, 2026

@sxa
MemberAuthor

The underlying error here is because FFI_EXTRA_CIF_FIELDS for riscv in https://github.com/nodejs/node/blob/faa413ea58626556c51b6b70e3333f6ea133fa80/deps/libffi/src/riscv/ffitarget.h#L65 has a ; at the end of it where it doesn't for other platforms.

Two options for resolving this properly (as opposed to the PR which disables libffi):

  • Get libffi fixed and/or float a local patch
  • Stop building with-Werror=extra-semi which is set in node.gypi

sxa commented on Jun 2, 2026

@sxa
MemberAuthor

Reopening until the underlying issue is fixed in node.js and backported to 26.

reopened this on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    riscv64Items impacting the RISC-V 64-bit platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions