Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesa package build error #2455

Closed
mrkcee opened this issue Jul 9, 2024 · 3 comments
Closed

mesa package build error #2455

mrkcee opened this issue Jul 9, 2024 · 3 comments

Comments

@mrkcee
Copy link

mrkcee commented Jul 9, 2024

I am currently exploring cbuild on a Chimera system running on qemu aarch64. I tried building the mesa package but it always fails.

Here are the steps I did:

  1. Clone cports repo (as of commit 22433cb)
  2. cbuild keygen
  3. cbuild binary-bootstrap
  4. cbuild pkg main/mesa

Snippet of the error log on stdout:

[3687/3775] Linking target src/gallium/targets/dri/libgallium_dri.so
FAILED: src/gallium/targets/dri/libgallium_dri.so
clang++ .... <long arguments/parameters here>
clang++: error: unable to execute command: Killed
clang++: error: linker command failed due to signal (use -v to see invocation)
[3692/3775] Linking target src/intel/vulkan/libvulkan_intel.so
ninja: build stopped: subcommand failed.
=> A failure has occurred!
=> Stack trace:
=> <stack trace here>
=> Phase 'build' failed for package 'mesa'

What can be the cause of the failure? It looks like the latest successful build was just a few days ago.

@q66
Copy link
Member

q66 commented Jul 9, 2024

looks like you're running out of memory?

@mrkcee
Copy link
Author

mrkcee commented Jul 9, 2024

Ah that was it! Thank you!

@mrkcee mrkcee closed this as completed Jul 9, 2024
@nekopsykose
Copy link
Contributor

there's no jobserver integration between ninja/lld, so when you build a project that has a lot of huge links (like mesa), you end up with e.g. yournumberofthreads link jobs that each do yournumberofthreads thinlto threads in parallel... and for mesa that means with nproc=16 you need like 18gb of memory (roughly, from memory)

the only way to fix that is for ninja to start support being a jobserver (upstream has blocked that forever) and lld to use the jobserver tokens, or to at least limit links (#2028 which would work for meson in this case) though that's more of a bandaid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants