Steps To Reproduce
$ cat > test.nix <<EOF
with import <nixpkgs> {
crossSystem.config = "x86_64-unknown-linux-musl";
};
stdenv
EOF
$ nix-build test.nix
Build log
Build is successful, however the installation produces an inaccessible file:
$ ls -l /nix/store/fgkznmnz1swzp8ck75fa2zvj62pkjgvq-musl-x86_64-unknown-linux-musl-1.2.3/lib/ld-musl-x86_64.so.1
ls: cannot read symbolic link '/nix/store/fgkznmnz1swzp8ck75fa2zvj62pkjgvq-musl-x86_64-unknown-linux-musl-1.2.3/lib/ld-musl-x86_64.so.1': Permission denied
lrwx------ 1 root wheel 7 Jan 1 1970 /nix/store/fgkznmnz1swzp8ck75fa2zvj62pkjgvq-musl-x86_64-unknown-linux-musl-1.2.3/lib/ld-musl-x86_64.so.1
The permissions are 0700, which is only possible on a mac (on linux symlinks always have permission 0777 reference).
The relevant log is:
Running phase: installPhase
install flags: -j12 SHELL=/nix/store/1jir4q091l8df6n00ialfwc6c7j5yark-bash-5.2-p15/bin/bash pkgconfigdir=/nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/lib/pkgconfig m4datadir=/nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/share/aclocal aclocaldir=/nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/share/aclocal install
./tools/install.sh -D -m 644 lib/Scrt1.o /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/Scrt1.o
./tools/install.sh -D -m 644 lib/crt1.o /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/crt1.o
./tools/install.sh -D -m 644 lib/rcrt1.o /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/rcrt1.o
./tools/install.sh -D -m 644 lib/crti.o /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/crti.o
./tools/install.sh -D -m 644 lib/crtn.o /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/crtn.o
./tools/install.sh -D -m 644 lib/libc.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libc.a
./tools/install.sh -D -m 755 lib/libc.so /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libc.so
./tools/install.sh -D -m 644 lib/libm.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libm.a
./tools/install.sh -D -m 644 lib/librt.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/librt.a
./tools/install.sh -D -m 644 lib/libpthread.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libpthread.a
./tools/install.sh -D -m 644 lib/libcrypt.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libcrypt.a
./tools/install.sh -D -m 644 lib/libutil.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libutil.a
./tools/install.sh -D -m 644 lib/libxnet.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libxnet.a
./tools/install.sh -D -m 644 lib/libresolv.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libresolv.a
./tools/install.sh -D -m 644 lib/libdl.a /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/libdl.a
./tools/install.sh -D -m 644 lib/musl-gcc.specs /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/musl-gcc.specs
./tools/install.sh -D -l libc.so /nix/store/a6kkq8ckik47p85xvzacy8rqdkdrcasm-musl-x86_64-unknown-linux-musl-1.2.3/lib/ld-musl-x86_64.so.1 || true
./tools/install.sh -D -m 644 include/aio.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/aio.h
./tools/install.sh -D -m 644 include/alloca.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/alloca.h
./tools/install.sh -D -m 644 include/ar.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/ar.h
./tools/install.sh -D -m 644 include/arpa/ftp.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/arpa/ftp.h
./tools/install.sh -D -m 644 include/arpa/inet.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/arpa/inet.h
./tools/install.sh -D -m 644 include/arpa/nameser.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/arpa/nameser.h
./tools/install.sh -D -m 644 include/arpa/nameser_compat.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/arpa/nameser_compat.h
./tools/install.sh -D -m 644 include/arpa/telnet.h /nix/store/r1qd33gkzdxipfdidbvnhpnrn66gpp9x-musl-x86_64-unknown-linux-musl-1.2.3-dev/include/arpa/telnet.h
( ... )
Note that the line for installing lib/ld-musl-x86_64.so.1 doesn't include the -m 644 flag
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
Add a 👍 reaction to issues you find important.
Steps To Reproduce
Build log
Build is successful, however the installation produces an inaccessible file:
The permissions are 0700, which is only possible on a mac (on linux symlinks always have permission 0777 reference).
The relevant log is:
Note that the line for installing lib/ld-musl-x86_64.so.1 doesn't include the
-m 644flagAdditional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"and paste the result.Add a 👍 reaction to issues you find important.