[cfe-dev] failed to compile llvm-2.8 with clang

Douglas Gregor dgregor at apple.com
Fri Jan 14 07:41:06 PST 2011


On Jan 12, 2011, at 9:09 PM, Neal N. Wang wrote:

> I tried to use clang in llvm-2.8 release to compile llvm-2.8, but it fails with the following error message.  Can clang compile llvm-2.8 or It can only compile a specific version of llvm?
> 
> make[1]: Entering directory `/mnt/hgfs/user.host/test/llvm-build/lib/System'
> llvm[1]: Compiling Alarm.cpp for Release build
> clang: /home/user/workspace/trunk/compiler/llvm-2.8/lib/Support/MemoryBuffer.cpp:46: void llvm::MemoryBuffer::init(const char*, const char*): Assertion `BufEnd[0] == 0 && "Buffer is not null terminated!"' faile
> Stack dump:
> 0.      Program arguments: /home/user/local/llvm-install/bin/clang -cc1 -triple i386-pc-linux-gnu -S -disable-free -main-file-name Alarm.cpp -pic-level 2 -mconstructor-aliases -target-cpu pentium4 -resource-dir /he/user/local/llvm-install/lib/clang/2.8 -dependency-file /mnt/hgfs/user.host/test/llvm-build/lib/System/Release/Alarm.d.tmp -MP -MT /mnt/hgfs/user.host/test/llvm-build/lib/System/Release/Alarm.o -MT /mnt/hgfs/wan.host/test/llvm-build/lib/System/Release/Alarm.d -D NDEBUG -D _GNU_SOURCE -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I /mnt/hgfs/user.host/test/llvm-2.8/include -I /mnt/hgfs/user.host/test/llvm-2.8/lib/Syem -I /mnt/hgfs/user.host/test/llvm-build/include -I /mnt/hgfs/user.host/test/llvm-build/lib/System -O3 -Woverloaded-virtual -Wcast-qual -Wall -W -Wno-unused-parameter -Wwrite-strings -ferror-limit 19 -fmessage-lgth 216 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-U1E9TZ.s -x c++ /mnt/hgfs/user.host/test/llvm-2.8/lib/System/Alarm.cpp 
> 1.      /mnt/hgfs/user.host/test/llvm-2.8/lib/System/Alarm.cpp:15:2: current parser token 'include'
> 2.      /mnt/hgfs/user.host/test/llvm-2.8/include/llvm/System/Alarm.h:20:1: parsing namespace 'llvm'
> clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
> make[1]: *** [/mnt/hgfs/user.host/test/llvm-build/lib/System/Release/Alarm.o] Error 1
> make[1]: Leaving directory `/mnt/hgfs/user.host/test/llvm-build/lib/System'
> make: *** [all] Error 1


At this point, I'd strongly recommend using top-of-tree Clang and LLVM. We've fixed a huge number of bugs since we branched the 2.8 release.

	- Doug



More information about the cfe-dev mailing list