Trouble building clang trunk from source

Hi,

I'm trying to build clang from source using the instructions
found here [1], but I'm getting the following error:

make[3]: Entering directory `/home/nr/llvm-build/tools/clang/runtime'
make[4]: Entering directory `/home/nr/llvm-build/tools/clang/runtime/compiler-rt'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'eprintf'
warning: clang_darwin.mk: dropping arch 'i386' from lib '10.4'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib '10.4'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'ios'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'ios'
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'ios'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'osx'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'osx'
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'cc_kext'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'cc_kext'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'cc_kext'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'cc_kext_ios5'
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'cc_kext_ios5'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_osx'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_osx'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_ios'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_ios'
warning: clang_darwin.mk: dropping arch 'armv7' from lib 'profile_ios'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'asan_osx_dynamic'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'asan_osx_dynamic'
warning: clang_darwin.mk: dropping arch 'i386' from lib 'ubsan_osx'
warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'ubsan_osx'
make[5]: Entering directory `/home/nr/llvm/projects/compiler-rt'
make[5]: Nothing to be done for `clang_linux'.
make[5]: Leaving directory `/home/nr/llvm/projects/compiler-rt'
llvm[4]: Copying runtime library linux/full-x86_64 to build dir
cp: cannot stat `/home/nr/llvm-build/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/libcompiler_rt.a': No such file or directory
make[4]: *** [/home/nr/llvm-build/Release+Asserts/lib/clang/3.4/lib/linux/libclang_rt.full-x86_64.a] Error 1
rm /home/nr/llvm-build/Release+Asserts/lib/clang/3.4/lib/linux/.dir
make[4]: Leaving directory `/home/nr/llvm-build/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/home/nr/llvm-build/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/nr/llvm-build/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/home/nr/llvm-build/tools'
make: *** [all] Error 1

Any ideas as to what is going wrong?

Thanks,
Nate

[1] http://clang.llvm.org/get_started.html

I'm trying to build clang from source using the instructions
found here [1], but I'm getting the following error:

I guess I should mention that I'm on 64-bit Ubuntu 10.04.

Thanks,
Nate

The 3.3 release works fine, by the way. Will use that for now.

Thanks,
Nate

The 3.3 release works fine, by the way. Will use that for now.

Thanks,
Nate

Hi Nate,

I was also able to build using those same instructions:

http://clang.llvm.org/get_started.html

However, when using the newly built clang to compile,
it worked OK; however, the link did not:

make -f simple.mk test
/home/evansl/dwnlds/llvm/releases/3.3/out/Release+Asserts/build/Release+Asserts/bin/clang
-c test.cpp
/home/evansl/dwnlds/llvm/releases/3.3/out/Release+Asserts/build/Release+Asserts/bin/clang
test.o -o test.exe
test.o: In function `main':
test.cpp:(.text+0xc): undefined reference to `std::cout'
test.cpp:(.text+0x20): undefined reference to `std::basic_ostream<char,
std::char_traits<char> >& std::operator<< <std::char_traits<char>

(std::basic_ostream<char, std::char_traits<char> >&, char const*)'

test.o: In function `__cxx_global_var_init':
test.cpp:(.text.startup+0x11): undefined reference to
`std::ios_base::Init::Init()'
test.cpp:(.text.startup+0x19): undefined reference to
`std::ios_base::Init::~Init()'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [test] Error 1

Compilation exited abnormally with code 2 at Tue Jul 2 07:46:49

Anyone have any ideas whats missing. Should I also run install as
indicated here:

http://www.domaigne.com/blog/computing/install-latest-llvmclang-on-fedora/

?

-regards,
Larry

?

Apparently running `make install` doesn't result in a usable clang
either:

Hi Larry,

You need use 'clang++' to link programs that include C++ translation units.

Dmitri