<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang-11 in qemu: error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'"
href="https://bugs.llvm.org/show_bug.cgi?id=48318">48318</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-11 in qemu: error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>crusoe@debian.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Using clang-11 in an up-to-date s390x Debian unstable/sid cowbuilder chroot 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)
Note, this is qemu user-mode emulation of s390x, not qemu full system emulation
of s390x
The Debian package version is 1:11.0.0-5+b1, Sylvestre Ledru of the Debian LLVM
packaging team suggested that I file the bug here as he did not think it was a
packaging error.
Recipe for reproduction Debian/Ubuntu:
$ 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 <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>