xattrs set during install of gcc
I've already asked about this and had a lot of help figuring this out by several users on the #musl irc channel and was told to raise an issue here.
So I'm currently trying to create a custom aarch64 raspberry pi package. Thus I ended up with running an aarch64 alpine image through the use of multiarch/qemu-user-static
. However, it turned out that when installing gcc or g++, it threw up xattr errors (note that this stops the abuild-apk
that is run by scripts/mkimage.sh
).
$ docker run --rm -it arm64v8/alpine:3.10 sh
/ # uname -m
aarch64
/ # apk add --no-cache gcc
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/aarch64/APKINDEX.tar.gz
(1/10) Installing binutils (2.32-r0)
(2/10) Installing gmp (6.1.2-r1)
(3/10) Installing isl (0.18-r0)
(4/10) Installing libgomp (8.3.0-r0)
(5/10) Installing libatomic (8.3.0-r0)
(6/10) Installing libgcc (8.3.0-r0)
(7/10) Installing mpfr3 (3.1.5-r1)
(8/10) Installing mpc1 (1.1.0-r0)
(9/10) Installing libstdc++ (8.3.0-r0)
(10/10) Installing gcc (8.3.0-r0)
ERROR: Failed to set xattrs on usr/libexec/gcc/aarch64-alpine-linux-musl/8.3.0/.apk.e7f97aa03b8e515a97a9eb65f467457a2c02cba9c11c4651: Function not implemented
Executing busybox-1.30.1-r2.trigger
1 error; 77 MiB in 24 packages
/ # apk fix
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/aarch64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/aarch64/APKINDEX.tar.gz
(1/1) Reinstalling gcc (8.3.0-r0) ERROR: Failed to set xattrs on usr/libexec/gcc/aarch64-alpine-linux-musl/8.3.0/.apk.e7f97aa03b8e515a97a9eb65f467457a2c02cba9c11c4651: Function not implemented
Executing busybox-1.30.1-r2.trigger
1 error; 77 MiB in 24 packages
Running it through strace gets me an xsetattr syscall that's not entirely useful:
# /usr/bin/qemu-aarch64-static -strace `which apk` add gcc
....
250 openat(3,"usr/libexec/gcc/aarch64-alpine-linux-musl/8.3.0/.apk.e7f97aa03b8e515a97a9eb65f467457a2c02cba9c11c4651",O_RDWR|O_LARGEFILE) = 8
250 fsetxattr(8,274908211816,274908211831,5,0,0) = 0
250 close(8) = 0
...
Finally, tried running the provided netboot package using qemu-system-aarch64
which actually gave me a more useful syscall:
openat(3, "usr/libexec/gcc/aarch64-alpine-linux-musl/8.3.0/.apk.e7f97aa03b8e515a97a9eb65f467457a2c02cba9c11c4651", O_RDWR|O_LARGEFILE) = 8
fsetxattr(8, "user.pax.flags", "pemrs", 5, 0) = -1 EOPNOTSUPP (Not supported)
close(8) = 0
By the way, as mentioned, running alpine aarch64 using qemu-system-aarch64
doesn't fail with this error despite strace actually showing that fsetxattr
syscall.
Happy to post any additional information.
cc @ncopa