[cfe-dev] failed to compile clange on FreeBSD7.1

Jiandong Lu lujiandong1001 at yahoo.com.cn
Tue Jan 13 04:06:34 PST 2009


hi,everyone,as the 'getting started ' page 
http://clang.llvm.org/get_started.html
says ,I check out llvm ,and compile it succssfully.
then I checked out clang source files.
I run commands:
touch empty.c; gcc -v empty.c -fsyntax-only
its output is :
"
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]
 /usr/libexec/cc1 -quiet -v -D_LONGLONG empty.c -quiet -dumpbase empty.c -auxbase empty -version -fsyntax-only -o /dev/null
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
End of search list.
GNU C version 4.2.1 20070719  [FreeBSD] (i386-undermydesk-freebsd)
        compiled by GNU C version 4.2.1 20070719  [FreeBSD].
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31156
Compiler executable checksum: 5208351120a90a18f603e3b485bf8c2b
"
I append this statement:
    //FreeBSD
    AddPath("/usr/include", System, true, false, false);
to function 
void InitHeaderSearch::AddDefaultSystemIncludePaths(const LangOptions &Lang) 
in file clang/lib/Driver/InitHeaderSearch.cpp
then gmake clang,it failed.Its output is 
"llvm[2]: Compiling CGExprConstant.cpp for Debug build 
CGExprConstant.cpp: In member function 'llvm::Constant*<unnamed>::ConstExprEmitter::EmitUnionInitialization(clang::InitListExpr*)':
CGExprConstant.cpp:241: error: 'const class llvm::TargetData' has no member named 'getTypePaddedSize'
gmake[2]: *** [/usr/home/lujd/projects/llvm/tools/clang/lib/CodeGen/Debug/CGExprConstant.o] Error 1
gmake[2]: Leaving directory `/usr/home/lujd/projects/llvm/tools/clang/lib/CodeGen'
gmake[1]: *** [CodeGen/.makeall] Error 2
gmake[1]: Leaving directory `/usr/home/lujd/projects/llvm/tools/clang/lib'
gmake: *** [all] Error 1"

Please help me.Thanks.






      ___________________________________________________________ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090113/f580dd65/attachment.html>


More information about the cfe-dev mailing list