[llvm-dev] building llvm_Rel400 on Scientific Linux (RHEL) 7.3 x86_64

Adam Jensen via llvm-dev llvm-dev at lists.llvm.org
Sat Jun 3 14:29:50 PDT 2017


Hi,

I am trying to build the LLVM suite on a RedHat Enterprise Linux clone (Scientific Linux <https://www.scientificlinux.org/>). In the latest attempt, the build seems to complete without any explicit failures but the `check-all` process fails. Any ideas about what is wrong or suggestions for how to proceed would be much appreciated.

This is the current procedure:

sudo yum install ninja-build
sudo yum install cmake3
sudo yum install subversion

sudo rpm -Uvh http://ftp.scientificlinux.org/linux/scientific/7x/external_products/softwarecollections/yum-conf-softwarecollections-2.0-1.el7.noarch.rpm

sudo yum install devtoolset-6
# See <http://linux.web.cern.ch/linux/centos7/docs/softwarecollections.shtml>

scl enable devtoolset-6 bash

mkdir $HOME/build
export BASE=$HOME/build
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_400/final/ $BASE/llvm_Rel400
cd $BASE/llvm_Rel400/tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_400/final/ clang
svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_400/final/ lld
svn co http://llvm.org/svn/llvm-project/polly/tags/RELEASE_400/final/ polly
cd $BASE/llvm_Rel400/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_400/final/ extra
cd $BASE/llvm_Rel400/projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_400/final/ compiler-rt
svn co http://llvm.org/svn/llvm-project/openmp/tags/RELEASE_400/final/ openmp
svn co http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_400/final/ libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_400/final/ libcxxabi
svn co http://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_400/final/ test-suite
mkdir $BASE/build_llvm
cd $BASE/build_llvm
cmake3 -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/.local/llvm \
  -DCMAKE_BUILD_TYPE=Release $BASE/llvm_Rel400
ninja-build
ninja-build check-all 2>&1 | tee check.log

-----

The last few lines of the log file look like this:

[112/475] cd /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit && /home/hanzer/build/build_llvm/./bin/clang buffer_queue_test.cc.x86_64.o xray_unit_test_main.cc.x86_64.o gtest-all.cc.x86_64.o -o /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit/XRayBufferQueueTest -Wl,-allow-shlib-undefined -m64 -lstdc++ -lm -lpthread -lpthread -L/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux -lclang_rt.xray-fdr-x86_64
FAILED: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/XRayBufferQueueTest 
cd /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit && /home/hanzer/build/build_llvm/./bin/clang buffer_queue_test.cc.x86_64.o xray_unit_test_main.cc.x86_64.o gtest-all.cc.x86_64.o -o /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit/XRayBufferQueueTest -Wl,-allow-shlib-undefined -m64 -lstdc++ -lm -lpthread -lpthread -L/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux -lclang_rt.xray-fdr-x86_64
/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)':
/opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()'
/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()':
/opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()'
/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)':
/opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()'
/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()':
/opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()'
/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)':                                   /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()'                                                                           /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()'                                                                           /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()':                                     /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()'
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
[113/475] Performing build step for 'libcxx_tsan_x86_64'
-- libcxx_tsan_x86_64 build command succeeded.  See also /home/hanzer/build/build_llvm/projects/compiler-rt/lib/tsan/libcxx_tsan_x86_64/src/libcxx_tsan_x86_64-stamp/libcxx_tsan_x86_64-build-*.log                                                                                                                                                                                                 [114/475] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestJS.cpp.o                                                                                          [115/475] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestObjC.cpp.o
[116/475] Performing build step for 'libcxx_msan_x86_64'
-- libcxx_msan_x86_64 build command succeeded.  See also /home/hanzer/build/build_llvm/projects/compiler-rt/lib/msan/tests/../libcxx_msan_x86_64/src/libcxx_msan_x86_64-stamp/libcxx_msan_x86_64-build-*.log
[117/475] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTest.cpp.o
ninja: build stopped: subcommand failed.


More information about the llvm-dev mailing list