I was just
‘strace ls’
as you do…
on Nixos 20.03… .
However , the command works fine, but it’s seems to be missing a lof of libraries.
The are not specified in ‘ldd ls’
Is this just dark magic of nixos linker or something else.
execve("/run/current-system/sw/bin/ls", ["ls"], 0x7ffff782e390 /* 72 vars */) = 0
brk(NULL) = 0x11a1000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f916de5b000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/tls/x86_64/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/tls/x86_64/x86_64", 0x7ffc2f7b43f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/tls/x86_64", 0x7ffc2f7b43f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
ldd shows
ldd /run/current-system/sw/bin/ls
linux-vdso.so.1 (0x00007ffc2f6e6000)
librt.so.1 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/librt.so.1 (0x00007ff403554000)
libacl.so.1 => /nix/store/rq9vqzjqay8fz8qdidmbgs3lqpq0y6zb-acl-2.2.53/lib/libacl.so.1 (0x00007ff403549000)
libattr.so.1 => /nix/store/b3yikpnxly8vgr2c0sspwqckx44hb474-attr-2.4.48/lib/libattr.so.1 (0x00007ff403541000)
libcrypto.so.1.1 => /nix/store/hysf4ll023i4q51hymgcqzxik4inq8gm-openssl-1.1.1g/lib/libcrypto.so.1.1 (0x00007ff403255000)
libpthread.so.0 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libpthread.so.0 (0x00007ff403234000)
libc.so.6 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6 (0x00007ff403073000)
libdl.so.2 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libdl.so.2 (0x00007ff40306e000)
/nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/ld-linux-x86-64.so.2 => /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007ff403560000)
These seems to be there, is it just some danging dependcies? or libraries that are trying to load other libraries that don’t exist?