Skip to content

[LoongArch] Compilation Error in Main Branch Due to Brotli Dependency: "invalid argument of ‘model’ attribute" #60835

@Javonne-liu

Description

@Javonne-liu

Version

v26.0.0-pre

Platform

Linux 90 6.9.0-rc3_default #1 SMP PREEMPT Thu Apr 11 12:24:48 UTC 2024 loongarch64 GNU/Linux

Subsystem

deps/brotli

What steps will reproduce the bug?

./configure --openssl-no-asm && make -j32

How often does it reproduce? Is there a required condition?

Architecture: LoongArch64
Node.js version: Main branch (latest commit)

What is the expected behavior? Why is that the expected behavior?

Expected behavior: Node.js should compile successfully on the LoongArch64 architecture without compilation errors related to the brotli dependency

What do you see instead?

Instead of a successful compilation, we encounter error during the brotli dependency build phase.

Additional information

In the LoongArch architecture, the upstream Node.js CI (https://ci.nodejs.org/job/node-test-commit-loongarch64/nodes=clfs23-64/835/) is encountering a compilation error related to brotli, with the specific error message being "invalid argument of ‘model’ attribute".
During reproduction testing, we found that updating the brotli submodule to commit (e230f474) can effectively prevent Node.js build failures on the LoongArch architecture.
The root cause of this problem is that the GCC compiler does not support the ((model("small"))) attribute.
For reference, please see: google/brotli#1369 and google/brotli/pull/1368.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions