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.
RVP <rvp%SDF.ORG@localhost> wrote:
> 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.)
Yes, I'm not emailing from the machine that I'm trying this on. It's
not for personal. To save on time and typing, I just used ${hash1} etc.
as placeholders.
I've run ldd(1) on the nix-env binary and it points to all value
shared libs that are all exactly where they ought to be.
> 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
I've tried settings LD_LIBRARY_PATH and LD_PRELOAD to no avail. I
can't seem to come up with any other hacks to try to convince nix-env
everything is okay. Any ideas?
Home |
Main Index |
Thread Index |
Old Index