#983949 nbdkit: ftbfs with -march=x86-64-v3

#983949#5
Date:
2021-03-03 15:39:16 UTC
From:
To:
Starting with LLVM 12 and GCC 11 (and backported to gcc-10 for Debian),
GCC introduces optimizations for new micro-architecture levels from
the x86-64 psABI.  Filing these bug reports for packages building with
the current level (x86-64), but not with x86-64-v3.

To reproduce these issues, append -march=x86-64-v3 to the compiler
flags (CFLAGS, CXXFLAGS, ...).  You also need hardware supporting these.
The easiest way is to call the dynamic linker in glibc 2.33 like
  /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --help
Otherwise look at the flags in /proc/cpuinfo and compare these with
those from table 3.1 in the System V Application Binary Interface doc:
https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/x86-64-psABI

Please don't upload a package setting these flags by default.  The
x86-64 baseline is still unchanged.

The full build log can be found at:
http://people.debian.org/~doko/logs/20210228/filtered/gcc10-v3/nbdkit_1.24.1-1_unstable_gcc10-v3.log
The last lines of the build log are at the end of this report.

[...]

uptime: + cat /proc/uptime

7.57 1.01

+ cmd=guestfsd

++ grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline

+ eval

+ test x '!=' x

+ test 1 = 1

+ cmd='guestfsd --verbose'

+ test '' = 1

+ false

+ test '' = 1

+ echo guestfsd --verbose

guestfsd --verbose

+ guestfsd --verbose

[    7.893291] traps: guestfsd[153] trap invalid opcode ip:7f98cc5e1e8e sp:7fff34c15520 error:0 in libstdc++.so.6.0.28[7f98cc59e000+de000]

/init: line 257:   153 Illegal instruction     $cmd

+ sync

+ test '' = 1

+ reboot -f

Rebooting.

[    7.980178] sd 2:0:1:0: [sdb] Synchronizing SCSI cache

[    7.980653] sd 2:0:0:0: [sda] Synchronizing SCSI cache

[    7.981732] reboot: Restarting system

[    7.981879] reboot: machine restart

*stdin*:0: libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x55cc3ab8e0c0: child process died
libguestfs: sending SIGTERM to process 14883
libguestfs: qemu maxrss 438284K
*stdin*:0: libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x55cc3ab8e0c0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsvytYCN
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsn7V7sO
make[4]: *** [Makefile:6457: ext2.img] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/tests'
make[3]: *** [Makefile:6086: check-am] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/tests'
make[2]: *** [Makefile:717: check-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_test: error: make -j1 check VERBOSE=1 returned exit code 2
make[1]: *** [debian/rules:36: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:9: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2