the setup:
i cross-compiled nix to s390x
(yes i know its not officially supported).
on an s390x fedora lpar i am running an ubuntu container with this cross compiled nix.
all nix-*
tools are working so far. I can run nix-shell -p bash
and many more.
the problem:
when i run nix-shell -p e2fsprogs --keep-failed
the build fails in the check phase:
...
384 tests succeeded 2 tests failed │PATH=/home/eddy/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Tests failed: m_minrootdir m_rootdir │MAIL=/var/mail/eddy
make[1]: *** [Makefile:401: test_post] Error 1 │OLDPWD=/
make[1]: Leaving directory '/tmp/nix-build-e2fsprogs-1.47.2.drv-3/e2fsprogs-1.47.2/tests' │_=/usr/bin/env
make: *** [Makefile:430: check-recursive] Error 1 │eddy@4e44df7a7b92:~$ history | grep channel
note: keeping build directory '/tmp/nix-build-e2fsprogs-1.47.2.drv-3'
...
$ cat /tmp/nix-build-e2fsprogs-1.47.2.drv-3/e2fsprogs-1.47.2/tests/m_rootdir.log │1;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.m
populate_fs2: Operation not supported while copying xattrs on root directory │ka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak
mke2fs: Operation not supported while populating file system │=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00
dumpe2fs: Bad magic number in super-block while trying to open test.img │;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:
Couldn't find valid filesystem superblock. │NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
debugfs: stat /emptyfile │LESSCLOSE=/usr/bin/lesspipe %s %s
stat: Filesystem not open │TERM=xterm
debugfs: stat /bigfile │LESSOPEN=| /usr/bin/lesspipe %s
stat: Filesystem not open │USER=eddy
debugfs: stat /sparsefile │SHLVL=2
stat: Filesystem not open │XDG_DATA_DIRS=/usr/local/share:/usr/share:/home/eddy/.nix-profile/share:/nix/var/nix/profiles/default/share
debugfs: stat /bigzerofile │PATH=/home/eddy/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
stat: Filesystem not open │MAIL=/var/mail/eddy
debugfs: stat /fifo │OLDPWD=/
stat: Filesystem not open │_=/usr/bin/env
debugfs: stat /emptydir │eddy@4e44df7a7b92:~$ history | grep channel
stat: Filesystem not open
...
BUT if i switch to the kept directory and run make check
manually all checks pass!
Same problem happens with --option sandbox false
and also with nix-build '<nixpkgs>' --attr e2fsprogs --no-sandbox
.
I also tried manually setting and reading xattr and everything works!
Also I tried it in a --privileged
container but that also fails.
Question:
has nix
another layer except sandbox
that may cause an issue? It seems impossible to debug because running the make check
manually always succeeds but only fails if called by nix-shell or nix-build.