[cfe-users] libcxx.llvm.org linux build instructions unclear
Larry Evans
cppljevans at suddenlink.net
Thu Jul 10 09:57:42 PDT 2014
On 07/10/2014 11:28 AM, Larry Evans wrote:
> On 07/09/2014 12:23 AM, Ben Pope wrote:
>> On Wednesday, July 09, 2014 02:48 AM, Larry Evans wrote:
>>> The instructions on:
>>> http://libcxx.llvm.org/
>>> say:
>>> We can now run CMake:
>>>
>>> CC=clang CXX=clang++ cmake -G "Unix Makefiles"
>>> -DLIBCXX_CXX_ABI=libstdc++
>>> -DLIBCXX_LIBSUPCXX_INCLUDE_PATHS="/usr/include/c++/4.7/;/usr/include/c++/4.7/x86_64-linux-gnu/"
>>>
>>>
>>> -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
>>> <libc++-source-dir>
>>>
>>> however, it does not say what to put for <libc++-source-dir>
>>> or in which directory this command is to be run. One might
>>> guess this command is to be run inb the directory where the buildit
>>> script is located, because that's what the earlier instructions
>>> (for Mac OS) were run from; however, that's not at all clear.
>>
>> CMake encourages out of source build.
>>
>> You run CMake in your build directory and you point it to your source
>> diectory (the one with CMakeLists.txt).
>>
>> E.g.:
>>
>> /libcxx_build
>> /libcxx
>> /include
>> CMakeLists.txt
>>
>> cd /libcxx/build
>> CMake ../libcxx
>>
>> Or:
>> /libcxx
>> /build
>> /include
>> CMakeLists.txt
>>
>> cd /libcxx/build
>> CMake ..
>>
>> Ben
> Thanks Ben.
>
> I tried the 2nd directory hierarchy:
>
> /home/evansl/dwnlds/llvm/svn/libcxx:
> total used in directory 144 available 242951424
> drwxrwxr-x 10 evansl evansl 4096 Jul 10 11:07 .
> drwxrwxr-x 4 evansl evansl 4096 Jul 8 13:14 ..
> -rw-rw-r-- 1 evansl evansl 76 Jul 8 13:14 .arcconfig
> drwxrwxr-x 8 evansl evansl 4096 Jul 10 11:13 build
> drwxrwxr-x 3 evansl evansl 4096 Jul 8 13:14 cmake
> -rw-rw-r-- 1 evansl evansl 10316 Jul 8 13:14 CMakeLists.txt
> -rw-rw-r-- 1 evansl evansl 363 Jul 8 13:34 cmake.sh
[snip]
> std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’:
> function body not available
> basic_string<_CharT, _Traits, _Allocator>::basic_string()
> ^
> /home/evansl/dwnlds/llvm/svn/libcxx/src/locale.cpp:4173:27: error:
> called from here
> __thousands_sep_(',')
> ^
> [ 73%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/hash.cpp.o
> make[2]: *** [lib/CMakeFiles/cxx.dir/__/src/locale.cpp.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [lib/CMakeFiles/cxx.dir/all] Error 2
> make: *** [all] Error 2
> ~/dwnlds/llvm/svn/libcxx/build $
>
>
> Any ideas how to resolve this issue?
>
[snip]
Then, based on Marshall's suggestion, specified CXX, and it worked:
Welcome to the Emacs shell
~/dwnlds/llvm/svn/libcxx/build $ ls
logs
~/dwnlds/llvm/svn/libcxx/build $ CXX=clang++ cmake
-DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is Clang 3.5.0
-- The C compiler identification is GNU 4.9.0
-- Check for working CXX compiler: /usr/local/bin/clang++
-- Check for working CXX compiler: /usr/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Host triple: x86_64-pc-linux
-- Target triple: x86_64-pc-linux
-- Performing Test LIBCXX_HAS_STDCXX0X_FLAG
-- Performing Test LIBCXX_HAS_STDCXX0X_FLAG - Success
-- Performing Test LIBCXX_HAS_FPIC_FLAG
-- Performing Test LIBCXX_HAS_FPIC_FLAG - Success
-- Performing Test LIBCXX_HAS_NODEFAULTLIBS_FLAG
-- Performing Test LIBCXX_HAS_NODEFAULTLIBS_FLAG - Success
-- Performing Test LIBCXX_HAS_NOSTDINCXX_FLAG
-- Performing Test LIBCXX_HAS_NOSTDINCXX_FLAG - Success
-- Performing Test LIBCXX_HAS_WALL_FLAG
-- Performing Test LIBCXX_HAS_WALL_FLAG - Success
-- Performing Test LIBCXX_HAS_W_FLAG
-- Performing Test LIBCXX_HAS_W_FLAG - Success
-- Performing Test LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG
-- Performing Test LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG - Success
-- Performing Test LIBCXX_HAS_WWRITE_STRINGS_FLAG
-- Performing Test LIBCXX_HAS_WWRITE_STRINGS_FLAG - Success
-- Performing Test LIBCXX_HAS_WNO_LONG_LONG_FLAG
-- Performing Test LIBCXX_HAS_WNO_LONG_LONG_FLAG - Success
-- Performing Test LIBCXX_HAS_PEDANTIC_FLAG
-- Performing Test LIBCXX_HAS_PEDANTIC_FLAG - Success
-- Performing Test LIBCXX_HAS_WERROR_FLAG
-- Performing Test LIBCXX_HAS_WERROR_FLAG - Success
-- Performing Test LIBCXX_HAS_WNO_ERROR_FLAG
-- Performing Test LIBCXX_HAS_WNO_ERROR_FLAG - Success
-- Performing Test LIBCXX_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test LIBCXX_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Performing Test LIBCXX_HAS_FNO_RTTI_FLAG
-- Performing Test LIBCXX_HAS_FNO_RTTI_FLAG - Success
-- Performing Test LIBCXX_HAS_WX_FLAG
-- Performing Test LIBCXX_HAS_WX_FLAG - Failed
-- Performing Test LIBCXX_HAS_NO_WX_FLAG
-- Performing Test LIBCXX_HAS_NO_WX_FLAG - Failed
-- Performing Test LIBCXX_HAS_EHSC_FLAG
-- Performing Test LIBCXX_HAS_EHSC_FLAG - Failed
-- Performing Test LIBCXX_HAS_NO_EHS_FLAG
-- Performing Test LIBCXX_HAS_NO_EHS_FLAG - Failed
-- Performing Test LIBCXX_HAS_NO_EHA_FLAG
-- Performing Test LIBCXX_HAS_NO_EHA_FLAG - Failed
-- Performing Test LIBCXX_HAS_NO_GR_FLAG
-- Performing Test LIBCXX_HAS_NO_GR_FLAG - Failed
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for printf in c
-- Looking for printf in c - found
-- Looking for ccos in m
-- Looking for ccos in m - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - found
-- Found PythonInterp: /usr/bin/python (found version "2.7.6")
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/evansl/dwnlds/llvm/svn/libcxx/build
~/dwnlds/llvm/svn/libcxx/build $ ls
CMakeCache.txt CMakeFiles Makefile cmake_install.cmake include lib
logs test
~/dwnlds/llvm/svn/libcxx/build $ make -j 4
Scanning dependencies of target cxx
[ 7%] [ 7%] [ 11%] [ 15%] Building CXX object
lib/CMakeFiles/cxx.dir/__/src/stdexcept.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/mutex.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/thread.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/strstream.cpp.o
[ 19%] [ 23%] [ 26%] Building CXX object
lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/regex.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/utility.cpp.o
[ 30%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o
[ 34%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/locale.cpp.o
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:118:9: warning:
#warning is a language extension [-Wpedantic]
# warning uncaught_exception not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:118:9: warning:
uncaught_exception not yet implemented [-W#warnings]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:191:9: warning:
#warning is a language extension [-Wpedantic]
# warning exception_ptr not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:191:9: warning:
exception_ptr not yet implemented [-W#warnings]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:210:9: warning:
#warning is a language extension [-Wpedantic]
# warning exception_ptr not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:210:9: warning:
exception_ptr not yet implemented [-W#warnings]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:235:9: warning:
#warning is a language extension [-Wpedantic]
# warning exception_ptr not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:235:9: warning:
exception_ptr not yet implemented [-W#warnings]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:279:9: warning:
#warning is a language extension [-Wpedantic]
# warning exception_ptr not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:279:9: warning:
exception_ptr not yet implemented [-W#warnings]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:301:9: warning:
#warning is a language extension [-Wpedantic]
# warning exception_ptr not yet implemented
^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:301:9: warning:
exception_ptr not yet implemented [-W#warnings]
12 warnings generated.
[ 38%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/memory.cpp.o
[ 42%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/typeinfo.cpp.o
[ 46%] Building CXX object
lib/CMakeFiles/cxx.dir/__/src/condition_variable.cpp.o
[ 50%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/new.cpp.o
[ 53%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/random.cpp.o
[ 57%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/future.cpp.o
[ 61%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/iostream.cpp.o
[ 65%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/shared_mutex.cpp.o
[ 69%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/valarray.cpp.o
[ 73%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/hash.cpp.o
[ 76%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/optional.cpp.o
[ 80%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/chrono.cpp.o
[ 84%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/string.cpp.o
[ 88%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/ios.cpp.o
[ 92%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/bind.cpp.o
[ 96%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/algorithm.cpp.o
[100%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/system_error.cpp.o
Linking CXX shared library libc++.so
clang: warning: argument unused during compilation: '-nostdinc++'
[100%] Built target cxx
~/dwnlds/llvm/svn/libcxx/build $
Thanks Marshall :(
-regards,
Larry
More information about the cfe-users
mailing list