[cfe-dev] How to build libc++ under Linux

François Dumont frs.dumont at gmail.com
Fri Dec 21 13:47:29 PST 2012


Hi

     I can't find a help mailing list so here is my message on the dev one.

     I built llvm/clang SVN trunk without any problem under my Linux 
box. But building libc++ is not so easy. I try

1. Run lib/buildit

It ends up with a:

+ case $TRIPLE in
+ clang algorithm.o bind.o chrono.o condition_variable.o debug.o 
exception.o future.o hash.o ios.o iostream.o locale.o memory.o mutex.o 
new.o random.o regex.o stdexcept.o string.o strstream.o system_error.o 
thread.o typeinfo.o utility.o valarray.o -fPIC -o libc++.so.1.0 -shared 
-nodefaultlibs -Wl,-soname,libc++.so.1 -lpthread -lrt -lc -lstdc++ 
-std=c++0x -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion 
-Wnewline-eof -Wpadded -Wmissing-prototypes -Wstrict-aliasing=2 
-Wstrict-overflow=4
/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
clang-3: error: linker command failed with exit code 1 (use -v to see 
invocation)

2. Put libcxx within llvm/tools

     Like must be done for clang. It has no effect when building llvm.

3. Use cmake

     I have created a build-libcxx folder next to ibcxx and call

cmake ../libcxx

   from it. The result is:

-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - found
CMake Error at lib/CMakeLists.txt:34 (add_dependencies):
   add_dependencies called with incorrect number of arguments


-- Found PythonInterp: /usr/bin/python2.7
-- Configuring incomplete, errors occurred!


So I am stuck, can someone help ?

Thank you

François




More information about the cfe-dev mailing list