NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compat_linux failures due to execve, openat, etc.
On Fri, 31 Oct 2025, Robert Swindells wrote:
I'm nix will just symlink in $HOME/.nix-profile/bin to the
/nix/store/ hashed version of /bin. In other words, if you had a
program called foo you'd have:
$ ls -l $HOME/.nix-profile/bin
$HOME/.nix-profile/bin/foo -> /nix/store/hash-foo-1.2.3/bin/foo
You still haven't answered whether the strings listed in each NAMI line
of the ktrace(1) output match real files on your machine or not.
I think ktnb@ has just replaced those long hash values with ${hash1} & ${hash2}.
On NixOS, it actually is:
```
[rvp@nixos:~]$ ldd $(which vim)
linux-vdso.so.1 (0x00007f9e38c71000)
libm.so.6 => /nix/store/g8zyryr9cr6540xsyg4avqkwgxpnwj2a-glibc-2.40-66/lib/libm.so.6 (0x00007f9e38b82000)
libncursesw.so.6 => /nix/store/yw7vb4hamv9mqgbgf7598zvis7k2spyx-ncurses-6.5/lib/libncursesw.so.6 (0x00007f9e38b08000)
libc.so.6 => /nix/store/g8zyryr9cr6540xsyg4avqkwgxpnwj2a-glibc-2.40-66/lib/libc.so.6 (0x00007f9e38800000)
/nix/store/g8zyryr9cr6540xsyg4avqkwgxpnwj2a-glibc-2.40-66/lib/ld-linux-x86-64.so.2 => /nix/store/g8zyryr9cr6540xsyg4avqkwgxpnwj2a-glibc-2.40-66/lib64/ld-linux-x86-64.so.2 (0x00007f9e38c73000)
[rvp@nixos:~]$
```
(If it was a literal ${hash1} etc. there, then the kernel would've returned
ENOENT much earlier.)
On NixOS, binaries and libraries are stored in dirs. based on the hashes of
all the dependencies they were built with, I think. This lets multiple binaries
and libraries versions co-exist on the same system w/o any issues:
https://nixos.org/guides/how-nix-works/
-RVP
Home |
Main Index |
Thread Index |
Old Index