[cfe-users] libcxx.llvm.org linux build instructions unclear

Larry Evans cppljevans at suddenlink.net
Thu Jul 10 09:28:31 PDT 2014


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
   -rw-rw-r--  1 evansl evansl   245 Jul  8 13:22 cmake.sh~
   -rw-rw-r--  1 evansl evansl  2643 Jul  8 13:14 CREDITS.TXT
   drwxrwxr-x  5 evansl evansl 16384 Jul  8 13:14 include
   drwxrwxr-x  2 evansl evansl  4096 Jul  8 13:14 lib
   -rw-rw-r--  1 evansl evansl  3493 Jul  8 13:14 LICENSE.TXT
   -rw-rw-r--  1 evansl evansl  1425 Jul  8 13:14 Makefile
   drwxrwxr-x  3 evansl evansl  4096 Jul  8 13:14 src
   drwxrwxr-x  4 evansl evansl  4096 Jul  8 13:14 .svn
   drwxrwxr-x 19 evansl evansl  4096 Jul  8 13:14 test
   drwxrwxr-x  2 evansl evansl  4096 Jul  8 13:14 www

Then tried the Cmake command; however, it failed because some
function body was unavailable for inlining, as shown by:

Welcome to the Emacs shell

~/dwnlds/llvm/svn/libcxx/build $ which CMake
which: no CMake in 
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games)
~/dwnlds/llvm/svn/libcxx/build $ which cmake
/usr/bin/cmake
~/dwnlds/llvm/svn/libcxx/build $ cmake ..
-- The CXX compiler identification is GNU 4.9.0
-- The C compiler identification is GNU 4.9.0
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- 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 $ make -j 4
Scanning dependencies of target cxx
[  3%] [  7%] [ 11%] [ 15%] Building CXX object 
lib/CMakeFiles/cxx.dir/__/src/stdexcept.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/strstream.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/mutex.cpp.o
Building CXX object lib/CMakeFiles/cxx.dir/__/src/thread.cpp.o
[ 19%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/debug.cpp.o
[ 23%] Building CXX object lib/CMakeFiles/cxx.dir/__/src/regex.cpp.o
[ 26%] 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 GCC extension
  #       warning uncaught_exception not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:118:9: warning: 
#warning uncaught_exception not yet implemented [-Wcpp]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:191:9: warning: 
#warning is a GCC extension
  #       warning exception_ptr not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:191:9: warning: 
#warning exception_ptr not yet implemented [-Wcpp]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:210:9: warning: 
#warning is a GCC extension
  #       warning exception_ptr not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:210:9: warning: 
#warning exception_ptr not yet implemented [-Wcpp]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:235:9: warning: 
#warning is a GCC extension
  #       warning exception_ptr not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:235:9: warning: 
#warning exception_ptr not yet implemented [-Wcpp]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:279:9: warning: 
#warning is a GCC extension
  #       warning exception_ptr not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:279:9: warning: 
#warning exception_ptr not yet implemented [-Wcpp]
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:301:9: warning: 
#warning is a GCC extension
  #       warning exception_ptr not yet implemented
          ^
/home/evansl/dwnlds/llvm/svn/libcxx/src/exception.cpp:301:9: warning: 
#warning exception_ptr not yet implemented [-Wcpp]
[ 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%] [ 50%] Building CXX object 
lib/CMakeFiles/cxx.dir/__/src/condition_variable.cpp.o
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
In file included from 
/home/evansl/dwnlds/llvm/svn/libcxx/src/locale.cpp:18:0:
/home/evansl/dwnlds/llvm/svn/libcxx/include/string: In constructor 
‘std::__1::numpunct<char>::numpunct(size_t)’:
/home/evansl/dwnlds/llvm/svn/libcxx/include/string:1978:1: error: 
inlining failed in call to always_inline ‘std::__1::basic_string<_CharT, 
_Traits, _Allocator>::basic_string() [with _CharT = char; _Traits = 
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?

TIA.

-regards,
Larry






More information about the cfe-users mailing list