!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

83 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5127 Servers

Load older messages


SenderMessageTime
30 Jul 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgFWIW we could check for valid ELF-ness by calling patchelf instead of ldd, which would fix the original problem. But it is mighty nice to have that lib... and allowing deps means we can change the input to JSON instead of this really bad lines format18:49:26
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI dunno, I'm torn18:49:38
@k900:0upti.meK900I am pretty sure (native) patchelf does not work correctly for cross18:49:49
@k900:0upti.meK900So we might need a cross patchelf18:49:56
@k900:0upti.meK900Or rather we might need to drag a cross patchelf into the closure18:50:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I thought Linux Hackerman managed to use it to fix their problem before trying your fix 18:50:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt would surprise me if patchelf even had any cross-dependent behavior18:50:42
@k900:0upti.meK900It might work across different bit width, but I'm pretty sure it doesn't work across endianness18:51:02
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghm18:51:20
@k900:0upti.meK900 Because it just does #include <elf.h> which is wrong 18:51:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.orggotcha18:51:28
@k900:0upti.meK900Well, wrong if you're dealing with something that's not the same endianness18:51:38
@k900:0upti.meK900https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L21318:51:59
@k900:0upti.meK900And yep it just casts things around18:52:02
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea. that does mean that we can't use it for cross stuff like this though... Which, wait, doesn't make sense. Because we do use patchelf in fixup phase and whatnot when cross building18:52:07
@k900:0upti.meK900I'm pretty sure it's a cross patchelf18:52:18
@elvishjerricco:matrix.org@elvishjerricco:matrix.orglet me check...18:52:25
@k900:0upti.meK900Either that or no one actually cares about BE architectures18:52:32
@k900:0upti.meK900Both are possible18:52:36
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
It would surprise me if patchelf even had any cross-dependent behavior
You can ask @Mic92 about that, he started maintaining that
18:52:44
@k900:0upti.meK900Oh actually wait18:53:16
@k900:0upti.meK900 It does have some endianness checks 18:53:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
$ nix build --no-link --json nixpkgs#patchelf
[{"drvPath":"/nix/store/kshhm1fpfdv5a1qkd7sf18plxh7ddlg4-patchelf-0.14.5.drv","outputs":{"out":"/nix/store/96q22iw1i2m960x9y3v6fsj55691pzdl-patchelf-0.14.5"}}]

$ nix build --no-link --json nixpkgs#pkgsCross.aarch64-multiplatform.buildPackages.patchelf
[{"drvPath":"/nix/store/kshhm1fpfdv5a1qkd7sf18plxh7ddlg4-patchelf-0.14.5.drv","outputs":{"out":"/nix/store/96q22iw1i2m960x9y3v6fsj55691pzdl-patchelf-0.14.5"}}]
18:53:27
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgLooks the same to me18:53:33
@k900:0upti.meK900Yeah OK it's doing very cursed things18:53:39
@k900:0upti.meK900https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L23918:53:40
@linus:schreibt.jetzt@linus:schreibt.jetzt
In reply to @janne.hess:helsinki-systems.de
Who updates them?
r-ryantm once we've added an update script that runs cargo update
18:54:05
@k900:0upti.meK900This is freaking scary18:55:14
@k900:0upti.meK900It's basically just bytemucking all the values in-place at read time18:55:32
@k900:0upti.meK900RIIR patchelf when18:55:47

Show newer messages


Back to Room ListRoom Version: 6