Robert Swindells <[email protected]> wrote: > > Kevin Bloom <ktnb%posteo.net@localhost> wrote: > > I've been wanting to try out NetBSD compat_linux(8) for a long time > > and I've finally had a situation that seems like a good candidate for > > testing it out. I've done the setup as explained in the man page, > > however, it appears that there is some issue with finding some key > > functions, specifically: execve, access, open, stat64, statfs, > > and connect. When I view the ktrace(1) dump > > I see lines like: > > > > 13390 13390 nix-env CALL execve(0x7f7fffffdec0, 0x7f7fff223a90, > > 0x7f7fff223ab0) > > 13390 13390 nix-env NAMI "/nix/store/${hash1}-nix-2.32.2/bin/nix-env" > > 13390 13390 nix-env NAMI "/emul/linux" > > 13390 13390 nix-env NAMI > > "/emul/linux/nix/store/${hash2}-glibc-2.40-66/lib/ld-linux-x86-64.so.2"a > > 13390 13390 nix-env NAMI > > "/nix/store/${hash2}-glibc-2.40-66/lib/ld-linux-x86-64.so.2" > > 13390 13390 nix-env EMUL "linux" > > 13390 13390 nix-env RET execve -1 errno -2 No such file or directory > > > > When I look in the glibc directory I do see that shared lib in there > > so I'm confused why it's saying it's missing. > > > > I honestly don't no much about how the compat layer works other than > > what is in the wiki and man page. Any ideas to debug this more? > > > > PS: I know that nix doesn't work on NetBSD but I have a situation > > where being able to ues nix on NetBSD for _linux_ programs would be > > handy. > > What is the hash1 & hash2 for?
I'm not totally sure why nix does that. Every program in nix is given a hash. My guess would be to avoid confusion with the naming of the program or something. > Are they really part of the names of actual files or is some part of > the nix environment expected to expand them to something else? 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
