<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Compiling mesa-11.0.6 crashes clang with "fatal error: error in backend: symbol 'x86_64_entry_start' is already defined""
href="https://llvm.org/bugs/show_bug.cgi?id=29169">29169</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Compiling mesa-11.0.6 crashes clang with "fatal error: error in backend: symbol 'x86_64_entry_start' is already defined"
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>3.7
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>other.moxian@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=17064" name="attach_17064" title="the -emit-llvm output that breaks llc">attachment 17064</a> <a href="attachment.cgi?id=17064&action=edit" title="the -emit-llvm output that breaks llc">[details]</a></span>
the -emit-llvm output that breaks llc
I'm compiling mesa-11.0.6 with clang on gentoo from portage, and encounter the
following (reduced) problem:
$ clang -DUSE_X86_64_ASM -DGLX_USE_TLS -I../../include -I../../src
-DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" -c entry.c -v
clang version 3.7.1 (tags/RELEASE_371/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3
"/usr/bin/x86_64-pc-linux-gnu-clang-3.7" -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name
entry.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -coverage-file
/home/moxian/temp/mesa/mesa-11.0.6/src/mapi/entry.c -resource-dir
/usr/bin/../lib/clang/3.7.1 -D USE_X86_64_ASM -D GLX_USE_TLS -D
"MAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"" -I ../../include -I
../../src -internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.7.1/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/moxian/temp/mesa/mesa-11.0.6/src/mapi -ferror-limit 19 -fmessage-length
136 -mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o entry.o -x c entry.c
clang -cc1 version 3.7.1 based upon LLVM 3.7.1 default target
x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
../../include
../../src
/usr/bin/../lib/clang/3.7.1/include
/usr/include
End of search list.
In file included from entry.c:51:
./entry_x86-64_tls.h:65:1: warning: tentative array definition assumed to have
one element
x86_64_entry_start[];
^
fatal error: error in backend: symbol 'x86_64_entry_start' is already defined
x86_64-pc-linux-gnu-clang-3.7: error: clang frontend command failed with exit
code 70 (use -v to see invocation)
clang version 3.7.1 (tags/RELEASE_371/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: PLEASE submit a bug report
to <a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source,
and associated run script.
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: /tmp/entry-85ce4f.c
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg: /tmp/entry-85ce4f.sh
x86_64-pc-linux-gnu-clang-3.7: note: diagnostic msg:
********************
Running with -emit-llvm works fine:
$ clang -DUSE_X86_64_ASM -DGLX_USE_TLS
-DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" -c entry-85ce4f.c
-emit-llvm -o entry-85ce4f.bc
In file included from entry.c:51:
./entry_x86-64_tls.h:65:1: warning: tentative array definition assumed to have
one element
x86_64_entry_start[];
^
1 warning generated.
$ llc entry-85ce4f.bc
LLVM ERROR: symbol 'x86_64_entry_start' is already defined
$ bugpoint run-llc entry-85ce4f.bc
Read input file : 'entry-85ce4f.bc'
*** All input ok
Initializing execution environment: Found lli: /usr/bin/lli
Sorry, I can't automatically select a safe interpreter!
Exiting.
$ uname -a
Linux engi 4.4.6-gentoo #6 SMP Sun Aug 28 05:01:42 UTC 2016 x86_64 Intel(R)
Core(TM) i5-6600 CPU @ 3.30GHz GenuineIntel GNU/Linux
The diagnostic .c (preprocessed) .sh .bc and (just in case) full build log and
gentoo's emerge diagnostic info attached.
It's probably important to note that I don't encounter this problem if I try to
compile the original mesa source (i.e. not from gentoo's portage). Not that I'm
successful in compiling that, but at least this crash does not occur.</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>