Created attachment 180138 [details] Failed build output Compilation of llvm40-4.0.0.r2 (CLANG, GOLD, OPENMP) failed in a jail on FreeBSD 10.3-RELEASE-p11 with an assertion, along with other warnings: --- /tmp/usr/ports/devel/llvm40/work/llvm-4.0.0rc2.src/lib/MC/MCParser/AsmParser.cpp:2043:25: warning: variable 'CppHashLocLineNo' is uninitialized when used here [-Wuninitialized] LastQueryLine = CppHashLocLineNo; ^~~~~~~~~~~~~~~~ /tmp/usr/ports/devel/llvm40/work/llvm-4.0.0rc2.src/lib/MC/MCParser/AsmParser.cpp:2036:32: note: initialize the variable 'CppHashLocLineNo' to silence this warning unsigned CppHashLocLineNo; ^ = 0 /tmp/usr/ports/devel/llvm40/work/llvm-4.0.0rc2.src/lib/MC/MCParser/AsmParser.cpp:2155:71: warning: variable 'LineNo' is uninitialized when used here [-Wuninitialized] SMDiagnostic NewDiag(*Diag.getSourceMgr(), Diag.getLoc(), Filename, LineNo, ^~~~~~ /tmp/usr/ports/devel/llvm40/work/llvm-4.0.0rc2.src/lib/MC/MCParser/AsmParser.cpp:2152:13: note: initialize the variable 'LineNo' to silence this warning int LineNo = ^ = 0 Assertion failed: (it != OpaqueRValues.end() && "no mapping for opaque value!"), function getOpaqueRValueMapping, file /tmp/usr/ports/devel/llvm40/work/llvm-4.0.0rc1.src/tools/clang/lib/CodeGen/CodeGenFunction.h, line 2008. --- The error messages seem similar to those mentioned in: https://bugs.llvm.org//show_bug.cgi?id=31723 https://bugs.llvm.org//show_bug.cgi?id=31692 That was apparently fixed in this revision, which occurred several weeks before rc2 (but perhaps it has not been cherry-picked for 4.0 yet?) http://llvm.org/viewvc/llvm-project?view=revision&revision=291318
Created attachment 180139 [details] Configure step (was compiling with llvm40 r1) Will also try to build with base system llvm.
Created attachment 180140 [details] AsmParser cpp intermediate file (7z compressed)
Created attachment 180141 [details] AsmParser sh intermediate file
The port compiles and installs with base llvm. Once it is installed, recompiling with llvm 4.0 r2 also works, albeit with a few of these warnings on install ---> Installing the new version via the port clang40: not found make: "/usr/ports/Mk/Uses/compiler.mk" line 69: warning: "clang40 --version" returned non-zero status make: "/usr/ports/Mk/Uses/compiler.mk" line 120: warning: "clang++40 -### /dev/null 2>&1" returned non-zero status Hopefully the above warnings - which I'm guessing indicate that COMPILER_VERSION has been misdefined and COMPILER_FEATURES has been set to libstdc++ rather than libc++ - are not causing any other issues. Presumably the main issue was merely in the previous rc1 and only occurs when compiling with it. I guess I had the misconception from GCC that llvm port bootstraps itself, but either it does not or a portion of the resulting code was non-viable in this case.