systemd: Detect ELF ABI version for bpf build on powerpc64#426919
systemd: Detect ELF ABI version for bpf build on powerpc64#426919flokli merged 1 commit intoNixOS:masterfrom
Conversation
824cad0 to
3418f05
Compare
|
This feels like this should be a patch to systemd's We can make sure they get backported 257. That's not an issue. |
|
That'll need abit more work then, because |
|
Just to explain: Our philosophy is to only accept patches that are required to make systemd work with the nix package manager and the nix store. This way we keep our maintenance burden low. If this is fixing a bug in systemd then I would highly prefer you either open an issue or a pull request there. |
|
Makes sense! Will convert this to a draft for now, just so I don't forget about this matter.
Moved the decision of what ABI version to use into the Meson code, and submitted it upstream: systemd/systemd#38307 |
|
@OPNA2608 the upstream PR already landed, I asked about it being backported to 257.x in systemd/systemd#38307 (comment). In the meantime, can you update this PR to be a Considering the upstream PR is already merged, the URL won't disappear, and if it stays conditionalized on the platform it could go to master directly, without a staging round. |
3418f05 to
3742a72
Compare
|
Done, though I opted to use systemd/systemd@f950919 instead, which is the commit that's actually in the upstream repository now. |
|
I assume you're building natively? I tried |
I'm building natively yeah.
You can give this branch a try if you want, but I haven't checked if there are any cross-specific issues anywhere: https://github.com/OPNA2608/nixpkgs/tree/wip/ppc64-elfv1. Fixes for these packages are submitted to Nixpkgs in #427495 and #422007 respectively. You can find some more submitted ones by searching |
Yeah, this was more of a "I don't even get past systemdMinimal".
I'll try to chery-pick things together later, thanks! |
|
With da9a49a, then #427495 and #422007, and this one cherry-picked on top, I was able to successfully compile all the way up to
|
Can you give the errors that running this command interactively is causing? I imagine this is likely Clang not recognising the explicit ABI part of the target triplet and erroring out when it tries to interpret the value as something different. Try applying #297425 if that's the case. |
Yup: … and cherry-picking #297425 fixes that, thanks! |
|
With all these other PRs, now both |
With the BPF feature enabled, SystemD assumes that ELFv2 ABI will be used on 64-bit POWER:
https://github.com/systemd/systemd/blob/879ed340a1e80ab64890f8f473df406fd0c80b76/meson.build#L1731
On ELFv1, this causes a compilation failure. Patch this so it no longer means ELFv2. The check for this is usually
defined(_CALL_ELF) && _CALL_ELF == 2, so setting the define to1should do the trick.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.