Bug#975973: clang-11 in qemu: error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

Michael R. Crusoe crusoe at debian.org
Fri Nov 27 14:31:30 GMT 2020


Package: clang-11
Version: 1:11.0.0-5+b1
Severity: important

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Using clang-11 in an up-to-date s390x Sid cowbuilder on amd64 using qemu, I am
unable to query its defines using the normal construction:

echo | /usr/bin/clang-11 -E -dM  -

The error received is 

error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

The same command works without error outside of qemu on real s390x
hardware using the same package version (on zelenka.debian.org, for example)

Recipe:
$ cowbuilder-dist sid s390x create # if needed
$ cowbuilder-dist sid s390x update
$ cowbuilder-dist sid s390x login

# apt install clang-11 -y

# echo | /usr/bin/clang-11 -E -dM  -
error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

All of the above is true for clang-10 but not clang-9

If `-fgnuc-version=` is added to the command line, then there is a fatal
error

# echo | /usr/bin/clang-11 -E -dM  -fgnuc-version=0 - -v
Debian clang version 11.0.0-5+b1
Target: s390x-ibm-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/s390x-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/s390x-linux-gnu/10
Selected GCC installation: /usr/bin/../lib/gcc/s390x-linux-gnu/10
Candidate multilib: .;@m64
Selected multilib: .;@m64
 (in-process)
 "/usr/lib/llvm-11/bin/clang" -cc1 -triple s390x-ibm-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -target-cpu z10 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-11/lib/clang/11.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-11/lib/clang/11.0.0/include -internal-externc-isystem /usr/include/s390x-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir / -ferror-limit 19 -fno-signed-char -fcolor-diagnostics -dM -faddrsig -o - -x c -
clang -cc1 version 11.0.0 based upon LLVM 11.0.0 default target s390x-ibm-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/llvm-11/lib/clang/11.0.0/include
 /usr/include/s390x-linux-gnu
 /usr/include
End of search list.
fatal error: error opening file '<invalid loc>':
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/bin/clang-11 -E -dM -fgnuc-version=0 - -v
/usr/lib/s390x-linux-gnu/libLLVM-11.so.1(+0xc58b1a)[0x4005af2b1a]
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Debian clang version 11.0.0-5+b1
Target: s390x-ibm-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: Error generating preprocessed source(s) - ignoring input from stdin.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.




-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEck1gkzcRPHEFUNdHPCZ2P2xn5uIFAl/BDcESHGNydXNvZUBk
ZWJpYW4ub3JnAAoJEDwmdj9sZ+biAjUQAJqvimGN5R4hWuhTBtVlhXNTbXFosDpd
aYEIBLnNsmM89fQtSkrfGlb7BDBTMtaw/cncTGri5X3dravhhggXmHP4zm/3wxP/
WmDoBf6R2/ih6cgeqfTTFaDywry9gPIWKuYMHOlEfGnwAFWhQ7Q5x64izUJCUp9+
5LIOP1GvD6w8hmtq3FKdYqwVMRDCDrWsWu5DbIIt5bsiHtLmdxWSiJxQdIT5V8sJ
FEMFfdGBKa1fGm880m3XPnZzF3lg7fPZiNoGeFF6bEeQy6QFYwopbthiaZgrNoDp
Rgh+rxKhWXwR6eUDu4d2EYj3OpvvcC2M9cbrWAnd/iKqiiXMTig7M+ui72iELEQm
NCN0uaWGZ5qzVkpf4Nlbbt0ouo1Tdhps7duVsrtM0D52R5fgZCb5qB6PS68ZmrVS
crE6B+Vo75/tW6fTHgsbMFj79uKNjnhQHTmahpn2uvlMVLucHH/lW2Je748ZoD6B
s7EW0j+JPiSMMlBmoZrUIPdaynbmDQz74RGmRhnA/23iWh0DQty1U6h27SMb92QN
NCiIHxZBiTXqNIojBb2eLTPNpzvCKLy2ttdoQB5uxhUMXsvOUihI6AUGAysHIRRf
0+M9Iqlr7Mmo9adRlDAYurnpqlaZTOJ8IGKQTrKTe+cGvbi9NH8LeGvb+9Xfq+uE
iHzWygMAAzw7
=RhjC
-----END PGP SIGNATURE-----



More information about the Pkg-llvm-team mailing list