Robert Swindells <[email protected]> wrote: > > Kevin Bloom <[email protected]> wrote: > > Robert Swindells <[email protected]> wrote: > >> > >> Kevin Bloom <[email protected]> wrote: > >> > 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? > >> > >> Have you tried running ktrace(1) on a non-nix Linux binary? > >> > >> One that I just tried also returns an error from execve but carries on > >> after that and works correctly. > > > > Hmm, you're right. I ran nodeJS just fine and see the same errors. > > I wonder _what_ exactly is causing the nix-env program to not run > > all the way. When I run it, I get these errors in the STDOUT: > > GC warning: pthread_setname_np failed > > error: setting death signal: Function not implemented > > > > When I look through the ktrace of nix-env, I don't see anything > > obvious. It might be that I just don't know what to look for too. > > Do you have any general rules of thumb when looking at this sort > > of thing? > > UTSL
I've never heard this before so I looked it up. I love it! > Look at the sources to whatever version of glibc is in nix and see what > pthread_setname_np() is doing. Seems to me that this likely isn't the cause of the binary not working since I do get one other non-error/warnings in the stdout as well. After those GC warnings I get one line: installing 'nix-2.32.2' Then I get those errors with the death signal. However, it may be that there is still something valuable in the glibc source. > You could compile tst-setgetname.c into a single executable on Linux, > copy that onto your NetBSD system and try it out. > > You do have an emulated Linux procfs mounted as well as native /proc? I did as the compat_linux man page says, namely: mount_procfs procfs /emul/linux/proc making sure that the -o flag isn't set. Is there more to be done here? nix seems to be convinced that /emul/linux/proc is fine according to ktrace(1). One other note -- readelf(1)'s "NEEDED" libs are all installed on the system where they ought to be. Although ldd(1) points everything to the libs that are in the nix store, not the system's shared libs. > Maybe we need to extend the proc emulation to add some extra things. As mentioned above, nix seems convinced that /proc is okay (from what I've gathered)
