-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
RuntimeError: ELF .dynamic section is missing.
when building for armv7l-linux and riscv64-linux on NixOS since 254-rc1
#29381
Comments
Cross compilation works fine for me in a debian chroot (arm and riscv64). Something is causing the linker to not emit a .dynamic section when it should. The contents of the cross file as well as adding |
Logs with systemd-armv7l-unknown-linux-gnueabihf-254.3.log [properties]
needs_exe_wrapper = true
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7l'
endian = 'little'
[binaries]
llvm-config = 'llvm-config-native' systemd-riscv64-unknown-linux-gnu-254.3.log [properties]
needs_exe_wrapper = true
[host_machine]
system = 'linux'
cpu_family = 'riscv64'
cpu = 'riscv64'
endian = 'little'
[binaries]
llvm-config = 'llvm-config-native' |
I think I have figured out the cause of this bug, see my explanation here: NixOS/nixpkgs#243242 (comment) |
I can confirm, it builds for armv7l and riscv64 with diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index 2773eaf286..83a615f646 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -164,6 +164,7 @@ efi_c_ld_args = [
# These flags should be passed by -static-pie, but seem to be missing sometimes.
'-Wl,--no-dynamic-linker',
'-z', 'text',
+ '-pie',
# EFI has 4KiB pages.
'-z', 'common-page-size=4096', |
We explicitly set |
Can you check whether meson actually passes |
Yeah, that's weird. It's passing These are the arguments passed with the patch:
|
That's… interesting. Calling the cross gcc with |
|
The attached PR should fix this, please try. It looks pretty much as @lopsided98 says: |
@lopsided98, @medhefgo thank you! |
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 577f75112d47d20eed9b3ed05657bcd47b38d31c) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 577f75112d47d20eed9b3ed05657bcd47b38d31c) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 577f75112d47d20eed9b3ed05657bcd47b38d31c) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 577f75112d47d20eed9b3ed05657bcd47b38d31c) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 0073bb5ddaaa16a4d5af68931ef5e9f5cea6e78e) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 0073bb5ddaaa16a4d5af68931ef5e9f5cea6e78e) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 8aeac41162e793396f05f8fc1f448fb104c33054) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 8aeac41162e793396f05f8fc1f448fb104c33054) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 782790dc6423fe3ae1ce4cd674ab492bfc881230) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 782790d) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 9fbb9b974cc8a92eb77a080c89410fb2c8b311c1) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 782790dc6423fe3ae1ce4cd674ab492bfc881230) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Fixes: systemd#29381 (cherry picked from commit a8b53f4)
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 9fbb9b974cc8a92eb77a080c89410fb2c8b311c1) (From poky rev: 782b0e62ef94225402e82e0db83778cfc4425727) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 782790dc6423fe3ae1ce4cd674ab492bfc881230) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Reed Frandsen <rfrandse@us.ibm.com> Change-Id: Ib50582ba67fdf079906dfaf4c99458cd74476808
Backport a fix to address the build failure on armv7a introduced in systemd v254-rc1. see systemd/systemd#29381 (From OE-Core rev: 782790dc6423fe3ae1ce4cd674ab492bfc881230) Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd version the issue has been seen with
254-rc1
Used distribution
NixOS
Linux kernel version used
6.1.53
CPU architectures issue was seen on
x86_64
Component
systemd, systemd-boot
Expected behaviour you didn't see
systemd with systemd-boot builds without issues on armv7l-linux and riscv64-linux, both native and cross
Unexpected behaviour you saw
When cross-compiling systemd for armv7l-linux:
Full log: systemd-armv7l-unknown-linux-gnueabihf-254-rc1.log
When cross-compiling systemd for riscv64-linux:
Full log: systemd-riscv64-unknown-linux-gnu-254-rc1.log
Steps to reproduce the problem
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix build -L -j4 --cores 4 github:NixOS/nixpkgs/8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2#pkgsCross.armv7l-hf-multiplatform.systemd
(armv7l-linux, v254.3, fails)nix build -L -j4 --cores 4 github:NixOS/nixpkgs/fe6e29938174d1548bdcf02e0100824b272442ed#pkgsCross.armv7l-hf-multiplatform.systemd
(armv7l-linux, v254-rc1, fails)nix build -L -j4 --cores 4 github:NixOS/nixpkgs/18b500811c2676bb2da63594403e581c7c899206#pkgsCross.armv7l-hf-multiplatform.systemd
(armv7l-linux, v253.5, succeeds)nix build -L -j4 --cores 4 github:NixOS/nixpkgs/8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2#pkgsCross.riscv64.systemd
(riscv64-linux, v254.3, fails)nix build -L -j4 --cores 4 github:NixOS/nixpkgs/fe6e29938174d1548bdcf02e0100824b272442ed#pkgsCross.riscv64.systemd
(riscv64-linux, v254-rc1, fails)nix build -L -j4 --cores 4 github:NixOS/nixpkgs/18b500811c2676bb2da63594403e581c7c899206#pkgsCross.riscv64.systemd
(riscv64-linux, v253.5, succeeds)Related:
#26641
NixOS/nixpkgs#243242
NixOS/nixpkgs@fe6e299
Additional program output to the terminal or log subsystem illustrating the issue
No response
The text was updated successfully, but these errors were encountered: