Bug 202914 - make buildworld clang failure
Summary: make buildworld clang failure
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-05 23:45 UTC by duckbreath
Modified: 2015-09-07 20:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description duckbreath 2015-09-05 23:45:12 UTC
With target source as 10.1 and completely cleaned again as 10.2 both yield the same result, in the same place:

include -I/usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips -I. -I/usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.1\" -DLLVM_HOST_TRIPLE=\"i386-unknown-freebsd10.1\" -DDEFAULT_SYSROOT=\"\" -Qunused-arguments -fstack-protector  -fno-exceptions -fno-rtti -Wno-c++11-extensions  -c /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp -o MipsISelDAGToDAG.o
In file included from /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp:15:
In file included from /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h:17:
In file included from /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips/Mips.h:19:
In file included from /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/Target/TargetMachine.h:18:
/usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/Pass.h:32:10: fatal error:
      file
      '/usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/Support/Compiler.h'
      modified since it was first processed
#include "llvm/Support/Compiler.h"
         ^
Stack dump:
0.      Program arguments: /usr/obj/usr/src/tmp/usr/bin/c++ -cc1 -triple i386-unknown-freebsd10.1 -emit-obj -disable-free -disable-llvm-verifier -main-file-name MipsISelDAGToDAG.cpp -mrelocation-model static -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -target-cpu i486 -coverage-file /usr/obj/usr/src/lib/clang/libllvmmipscodegen/MipsISelDAGToDAG.o -resource-dir /usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.4.1 -D LLVM_ON_UNIX -D LLVM_ON_FREEBSD -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -D NDEBUG -D CLANG_ENABLE_ARCMT -D CLANG_ENABLE_REWRITER -D CLANG_ENABLE_STATIC_ANALYZER -D LLVM_DEFAULT_TARGET_TRIPLE="i386-unknown-freebsd10.1" -D LLVM_HOST_TRIPLE="i386-unknown-freebsd10.1" -D DEFAULT_SYSROOT="" -I /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include -I /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/tools/clang/include -I /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips -I . -I /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/../../lib/clang/include -isysroot /usr/obj/usr/src/tmp -internal-isystem /usr/obj/usr/src/tmp/usr/include/c++/v1 -O2 -Wno-c++11-extensions -fdeprecated-macro -fdebug-compilation-dir /usr/obj/usr/src/lib/clang/libllvmmipscodegen -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fno-rtti -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o MipsISelDAGToDAG.o -x c++ /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
1.      /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/Pass.h:32:2: current parser token 'include'
2.      /usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/ADT/StringRef.h:21:1: parsing namespace 'llvm'
c++: error: unable to execute command: Segmentation fault (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: i386-unknown-freebsd10.1
Thread model: posix
c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
c++: note: diagnostic msg: Error generating preprocessed source(s).
*** Error code 254

Stop.
make[6]: stopped in /usr/src/lib/clang/libllvmmipscodegen
*** Error code 1


I'm not partial to submitting this only except for the error message begging me to in caps.  Cheers.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2015-09-06 10:36:41 UTC
This message:

"fatal error: file '/usr/src/lib/clang/libllvmmipscodegen/../../../contrib/llvm/include/llvm/Support/Compiler.h' modified since it was first processed"

seems to indicate that you were modifying the tree while it was compiling.

What happens if you *don't* do that, clean /usr/obj out, and try to buildworld again?
Comment 2 duckbreath 2015-09-07 04:42:21 UTC
(In reply to Dimitry Andric from comment #1)

I resolved this issue by running make delete-old
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2015-09-07 20:44:28 UTC
(In reply to duckbreath from comment #2)
> (In reply to Dimitry Andric from comment #1)
> 
> I resolved this issue by running make delete-old

Strange, that target is normally only used after installworld, to get rid of files in the base system that are obsolete.  Let's assume that you just deleted /usr/obj and started again. :)