24 Aug 2025 |
K900 | I don't know how it would do that though | 16:25:40 |
dramforever | no it's in DT_NEEDED | 16:25:38 |
Artturin | Don't remember if ldd is supposed to work | 16:25:41 |
dramforever | but not runpath | 16:25:42 |
K900 | Given it should be static | 16:25:45 |
K900 | Or is it not static? | 16:25:48 |
K900 | Oh god why are our emulators not static | 16:25:58 |
Grimmauld (any/all) | can we even build a static qemu? | 16:26:20 |
dramforever | oh it's not static | 16:26:30 |
Grimmauld (any/all) | iirc it depends on sdl which explodes in funny ways on static due to dlopen.... | 16:26:35 |
dramforever | emulators being non static is fine tho | 16:26:36 |
dramforever | binfmt being non static is sad | 16:26:43 |
dramforever | this is why emulators don't have sdl | 16:27:00 |
Grimmauld (any/all) | our qemu does | 16:27:10 |
dramforever | but anyway qemu-user being dynamic is a-okay | 16:27:23 |
Grimmauld (any/all) | https://github.com/NixOS/nixpkgs/blob/20075955deac2583bb12f07151c2df830ef346b4/pkgs/applications/virtualization/qemu/default.nix#L48 | 16:27:30 |
dramforever | you say our qemu | 16:27:32 |
dramforever | but we have like, four different qemu or something | 16:27:42 |
dramforever | and i'm pretty sure at least the static binfmt one doesn't have sdl | 16:28:08 |
Artturin | $ ldd /nix/store/mfj180vhpbvak9rk1ksfjyglrffqny5v-qemu-user-10.0.2/bin/qemu-aarch64
linux-vdso.so.1 (0x00007f491e5dd000)
libz.so.1 => /nix/store/97jdzvwjgwy2g4xcijimadl0vpj6laqh-zlib-1.3.1/lib/libz.so.1 (0x00007f491e0ad000)
libgnutls.so.30 => /nix/store/7a7z89h9g0s18w3cq0pif7h1pw0z07qx-gnutls-3.8.10/lib/libgnutls.so.30 (0x00007f491de72000)
libm.so.6 => /nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib/libm.so.6 (0x00007f491dd8a000)
libglib-2.0.so.0 => /nix/store/kww24b3s330m61gy3n7fdl6517vpayv6-glib-2.84.3/lib/libglib-2.0.so.0 (0x00007f491dc2b000)
libgmodule-2.0.so.0 => /nix/store/kww24b3s330m61gy3n7fdl6517vpayv6-glib-2.84.3/lib/libgmodule-2.0.so.0 (0x00007f491dc22000)
libc.so.6 => /nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib/libc.so.6 (0x00007f491da19000)
libp11-kit.so.0 => /nix/store/5gnn2yvp740nyhmjb05wl9v5cn8sdgvb-p11-kit-0.25.5/lib/libp11-kit.so.0 (0x00007f491d86a000)
libidn2.so.0 => /nix/store/v9rj8vr6q5j3kr9nmdwhc3mi7cg55xcs-libidn2-2.3.8/lib/libidn2.so.0 (0x00007f491d839000)
libunistring.so.5 => /nix/store/562jc9ym7vd1zsw6sbq7i6j1vg8k1x32-libunistring-1.3/lib/libunistring.so.5 (0x00007f491d64c000)
libdl.so.2 => /nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib/libdl.so.2 (0x00007f491d647000)
libtasn1.so.6 => /nix/store/71alk3baa9mhvbh2ddwbdri45vljcwm7-libtasn1-4.20.0/lib/libtasn1.so.6 (0x00007f491d630000)
libhogweed.so.6 => /nix/store/14fwawdd17cdcm67p8xa1ad38sy6sqjc-nettle-3.10.1/lib/libhogweed.so.6 (0x00007f491d5e4000)
libnettle.so.8 => /nix/store/14fwawdd17cdcm67p8xa1ad38sy6sqjc-nettle-3.10.1/lib/libnettle.so.8 (0x00007f491d58d000)
libgmp.so.10 => /nix/store/f6yc9mbdp17kh3p70lhlix1w21jlj5kp-gmp-with-cxx-6.3.0/lib/libgmp.so.10 (0x00007f491d4e0000)
/nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib/ld-linux-x86-64.so.2 => /nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib64/ld-linux-x86-64.so.2 (0x00007f491e5df000)
libpcre2-8.so.0 => /nix/store/7bgq9cg5ak81wf8ci849649z4qxkqlf7-pcre2-10.44/lib/libpcre2-8.so.0 (0x00007f491d43e000)
libffi.so.8 => /nix/store/qfz8slc34jinyfkvmskaplijj8a79w25-libffi-3.5.1/lib/libffi.so.8 (0x00007f491d42d000)
$ /nix/store/mfj180vhpbvak9rk1ksfjyglrffqny5v-qemu-user-10.0.2/bin/qemu-aarch64
qemu: no user program specified
$ ldd /nix/store/qil3nqnisxb8kmpjfp3i50wgfgdbhh76-qemu-user-10.0.3/bin/qemu-aarch64
linux-vdso.so.1 (0x00007f7ffae81000)
libz.so.1 => not found
libgnutls.so.30 => not found
libm.so.6 => /nix/store/8p33is69mjdw3bi1wmi8v2zpsxir8nwd-glibc-2.40-66/lib/libm.so.6 (0x00007f7ffa887000)
libglib-2.0.so.0 => not found
libgmodule-2.0.so.0 => not found
libc.so.6 => /nix/store/8p33is69mjdw3bi1wmi8v2zpsxir8nwd-glibc-2.40-66/lib/libc.so.6 (0x00007f7ffa67c000)
/nix/store/8p33is69mjdw3bi1wmi8v2zpsxir8nwd-glibc-2.40-66/lib/ld-linux-x86-64.so.2 => /nix/store/lmn7lwydprqibdkghw7wgcn21yhllz13-glibc-2.40-66/lib64/ld-linux-x86-64.so.2 (0x00007f7ffae83000)
$ /nix/store/qil3nqnisxb8kmpjfp3i50wgfgdbhh76-qemu-user-10.0.3/bin/qemu-aarch64
/nix/store/qil3nqnisxb8kmpjfp3i50wgfgdbhh76-qemu-user-10.0.3/bin/qemu-aarch64: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
| 16:28:55 |
Grimmauld (any/all) | uhm | 16:29:06 |
Grimmauld (any/all) | yeah that looks busted | 16:29:10 |
Grimmauld (any/all) | but why | 16:29:13 |
dramforever | nevermind libz is not in needed directly | 16:29:26 |
dramforever | there's something wrong in fixupPhase | 16:29:53 |
dramforever | $out/bin/qemu-riscv64
Dynamic section at offset 0x2fd9f8 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libgnutls.so.30]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgmodule-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]
0x000000000000001d (RUNPATH) Library runpath: [/nix/store/2hcy8bvfswxsvsxq5s9bwibhivs25aif-glibc-2.40-66/lib]
build/qemu-riscv64
Dynamic section at offset 0x2fd9f8 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libgnutls.so.30]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgmodule-2.0.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]
0x000000000000001d (RUNPATH) Library runpath: [/nix/store/nlrfi2xsm3whpqawwr2xn76nzc889p9z-gnutls-3.8.10/lib:/nix/store/9h0qgsb2r5shr143q0bq82pzzagp2pc5-glib-2.84.3/lib:/home/dram/code/nixpkgs/tmp/outputs/out/lib:/nix/store/2hcy8bvfswxsvsxq5s9bwibhivs25aif-glibc-2.40-66/lib:/nix/store/n1s3b2pj80r3hd3mknr1xgig0yasifan-gcc-14.3.0-lib/lib]
| 16:31:26 |
dramforever | * ~~nevermind libz is not in needed directly~~ | 16:39:32 |
dramforever | no, correction | 16:43:46 |
dramforever | ninja install is messing up rpath | 16:43:52 |
Artturin | Weird that the pkgsCross.aarch64-multiplatform.buildPackages.qemu-user on the working rev of 72f5bfc3b5338a608e268fa867d4706dec66fd25 includes libtasn1 which is behind a !minimal conditional and qemu-user has userOnly minimal ? toolsOnly || userOnly, | 16:44:12 |