[cfe-users] Trouble building clang trunk from source

Larry Evans cppljevans at suddenlink.net
Tue Jul 2 07:52:23 PDT 2013


On 06/18/13 16:16, Nathan Ridge wrote:
> 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

?





More information about the cfe-users mailing list