https://llvm.org/bugs/show_bug.cgi?id=29169
Bug ID: 29169 Summary: Compiling mesa-11.0.6 crashes clang with "fatal error: error in backend: symbol 'x86_64_entry_start' is already defined" Product: new-bugs Version: 3.7 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: other.mox...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17064 --> https://llvm.org/bugs/attachment.cgi?id=17064&action=edit 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 http://llvm.org/bugs/ 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. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs