Skip to content

firefox: PGO build failure on riscv64 rva20/rva23 #709

Description

@misaka00251

Package name

firefox

openRuyi version

151.0.4

Relevant log output

Firefox 151.0.4 fails to build on riscv64 when MOZ_PGO=1 is enabled. This happens on both rva20 and rva23 build targets.

The build is configured with crashreporter disabled on riscv64:

ac_add_options --disable-crashreporter
ac_add_options MOZ_PGO=1

The Wayland compositor used for the PGO profile run appears to start successfully:

KWin is running, /home/abuild/firefox-pgo-wayland-0 is here.

However, the build fails before the actual PGO profile run, during the instrumented build link step for libxul.so:

toolkit/library/build/libxul.so
/bin/clang++ ... -fprofile-generate ... -o ../../../dist/bin/libxul.so ...
clang++: error: unable to execute command: Aborted (core dumped)
clang++: error: linker command failed due to signal

The failure happens on both rva20 & rva23.

Additional context

This issue was found while trying to enable PGO for the Firefox package on riscv64.

The current packaging already disables Firefox crashreporter on riscv64 because the C++ Breakpad crash reporter code is not yet ported to riscv64. After disabling crashreporter, the build proceeds further, but PGO still fails during the instrumented libxul.so link stage.

The current suspicion is that the riscv64 PGO instrumented build is too heavy for the current LLVM/lld setup, especially because %{optflags} still contains LTO-related flags such as:

-flto=auto
-ffat-lto-objects

The failing link line also contains -fprofile-generate, so the problematic combination may be:

riscv64 + Firefox libxul.so + PGO instrumentation + LTO/lld

I assert that this issue is relevant for openRuyi

  • I assert that this is a bug and not a support request.
  • I assert that this is not a duplicate of an existing issue.
  • I assert that I have read the openRuyi Code of Conduct and agree to abide by it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Target: RollingTargeting rolling/current branch.Type: Build FailureIssues related to build failures (compile/link/test during build).

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions