Skip to content

Conversation

@EyeCantCU
Copy link
Member

These changes implement support for arm64 in our builds of Chromium. Here are the changes at a high level:

  • Build Chromium with our toolchain. Use our Clang, our Rust, our Java, etc to produce builds of Chromium independent of Chromium's toolchain. Chromium's toolchain only supports x64 systems. Ours supports x64 and arm64
  • Use Gentoo's Chromium tarballs. Google's depot tools do not work on arm64. Dependencies must be synced before we start building Chromium, and Gentoo actively maintains tarballs containing Chromium's source and dependencies after they've been synced with gclient. In the future, we should be able to perform syncs using qemu

Inheritance does not work in the package environment

Also do some cleanup

Signed-off-by: RJ Sampson <[email protected]>
Since arm64 can't use gclient to sync dependencies

Signed-off-by: RJ Sampson <[email protected]>
Signed-off-by: RJ Sampson <[email protected]>
@octo-sts
Copy link
Contributor

octo-sts bot commented Feb 28, 2025

⚠️ EXPERIMENTAL

Please use 👍 or 👎 on this comment to indicate if you agree or disagree with the recommendation.

To provide more detailed feedback please comment on the recommendation prefixed with /ai-verify:

e.g. /ai-verify partially helpful but I also added bash to the build environment

Gen AI suggestions to solve the build error:

• Detected Error: "ninja: file is missing and not created by any action: '../../third_party/node/linux/node-linux-x64/bin/node'"

• Error Category: Dependency

• Failure Point: The ninja build system cannot find the Node.js binary that was supposed to be symlinked earlier

• Root Cause Analysis: The symlink creation to the system Node.js binary failed or the system Node.js is not available as expected

• Suggested Fix:

  1. Add nodejs to the environment packages list:
environment:
  contents:
    packages:
      - nodejs
      # ... existing packages ...
  1. Update the Node.js symlink creation step in the "Use system libraries" pipeline:
# Use host node
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -sf $(which node) third_party/node/linux/node-linux-x64/bin/node

• Explanation: Chromium's build system expects Node.js to be available at a specific path. The current symlink attempt fails because either Node.js isn't installed in the build environment or the symlink creation isn't working correctly. Adding nodejs to the environment packages ensures it's available, and using $(which node) ensures we link to the correct binary path.

• Additional Notes:

  • Node.js is required for various build tasks in Chromium
  • The symlink needs to be created in the exact path expected by Chromium's build system
  • Using $(which node) is more robust than assuming /usr/bin/node
  • The -f flag on ln ensures the symlink is created even if the target already exists

• References:

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Feb 28, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Feb 28, 2025
Copy link
Member

@jamonation jamonation left a comment

Choose a reason for hiding this comment

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

🤞

@EyeCantCU EyeCantCU merged commit 4f5d74e into wolfi-dev:main Feb 28, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/skip-comment Stop AI from commenting on PR bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants