Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Docker build with CLANG_DEFAULT_CXX_STDLIB=libc++ fails #37281

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR38308
Status NEW
Importance P normal
Reported by Benjamin Buch (benni.buch@gmail.com)
Reported on 2018-07-25 06:38:39 -0700
Last modified on 2018-08-06 06:35:21 -0700
Version 6.0
Hardware PC Linux
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments log.txt (460251 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 20601
Log from the build process

Reproduce with:

$ git clone https://github.com/llvm-mirror/llvm.git
$ cd llvm
$ utils/docker/build_docker_image.sh -s debian8 -d
"$CI_REGISTRY_USER/$CI_PROJECT_NAME" -t "latest" --branch branches/release_60 -
p clang -p libcxx -p libcxxabi -p lld -p compiler-rt -i stage2-install-clang -i
stage2-install-clang-headers -- -DCMAKE_BUILD_TYPE=Release -
DBOOTSTRAP_CMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=ON -
DCLANG_DEFAULT_CXX_STDLIB=libc++ -DCLANG_BOOTSTRAP_TARGETS="install-
clang;install-clang-headers"
[...]
-- Check for working CXX compiler: /tmp/clang-build/build/./bin/clang++ --
broken
CMake Error at /usr/local/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44
(message):
  The C++ compiler "/tmp/clang-build/build/./bin/clang++" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /tmp/clang-build/build/tools/clang/stage2-bins/CMakeFiles/CMakeTmp

  Run Build Command:"/usr/local/bin/ninja" "cmTC_8e6a7"

  [1/2] Building CXX object CMakeFiles/cmTC_8e6a7.dir/testCXXCompiler.cxx.o

  [2/2] Linking CXX executable cmTC_8e6a7

  FAILED: cmTC_8e6a7

  : && /tmp/clang-build/build/./bin/clang++
  CMakeFiles/cmTC_8e6a7.dir/testCXXCompiler.cxx.o -o cmTC_8e6a7 && :

  /usr/bin/ld: cannot find -lc++

  clang-6.0: error: linker command failed with exit code 1 (use -v to see
  invocation)

  ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)

-- Configuring incomplete, errors occurred!

Full log in attachment.
Quuxplusone commented 6 years ago

Attached log.txt (460251 bytes, text/plain): Log from the build process

Quuxplusone commented 6 years ago
Simplified test case:

$ git clone https://github.com/llvm-mirror/llvm.git
$ cd llvm
$ git checkout release_60
$ utils/docker/build_docker_image.sh -s debian8 -d "test/clang_60" -t "latest" -
-branch branches/release_60 -p clang -p libcxx -i stage2-install-clang -i
stage2-install-clang-headers -- -DCMAKE_BUILD_TYPE=Release -
DBOOTSTRAP_CMAKE_BUILD_TYPE=Release -DCLANG_ENABLE_BOOTSTRAP=ON -
DCLANG_DEFAULT_CXX_STDLIB=libc++ -DCLANG_BOOTSTRAP_TARGETS="install-
clang;install-clang-headers"
[... first stage process ...]
FAILED: cd /tmp/clang-build/build/tools/clang/stage2-bins &&
/usr/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/tmp/clang-install -
DCMAKE_BUILD_TYPE=Release -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=/tmp/clang-
build/src/llvm/../clang -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/tmp/clang-
build/src/llvm/../clang-tools-extra -
DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/tmp/clang-build/src/llvm/../clang-
tools-extra -DLLVM_EXTERNAL_LIBCXX_SOURCE_DIR=/tmp/clang-
build/src/llvm/../libcxx -DLLVM_EXTERNAL_LIBCXX_SOURCE_DIR=/tmp/clang-
build/src/llvm/../libcxx -DPACKAGE_VERSION=6.0.1 -DLLVM_VERSION_MAJOR=6 -
DLLVM_VERSION_MINOR=0 -DLLVM_VERSION_PATCH=1 -DCLANG_VERSION_MAJOR=6 -
DCLANG_VERSION_MINOR=0 -DCLANG_VERSION_PATCHLEVEL=1 -DLLVM_VERSION_SUFFIX= -
DLLVM_BINUTILS_INCDIR= -DCLANG_REPOSITORY_STRING= -
DCMAKE_MAKE_PROGRAM=/usr/bin/ninja "-DLLVM_ENABLE_PROJECTS=clang;libcxx" -
DCLANG_STAGE=stage2 -DCMAKE_CXX_COMPILER=/tmp/clang-build/build/./bin/clang++ -
DCMAKE_C_COMPILER=/tmp/clang-build/build/./bin/clang -
DCMAKE_ASM_COMPILER=/tmp/clang-build/build/./bin/clang -GNinja /tmp/clang-
build/src/llvm && /usr/local/bin/cmake -E touch /tmp/clang-
build/build/tools/clang/stage2-stamps//stage2-configure
-- The C compiler identification is Clang 6.0.1
-- The CXX compiler identification is Clang 6.0.1
-- The ASM compiler identification is unknown
-- Found assembler: /tmp/clang-build/build/./bin/clang
-- Check for working C compiler: /tmp/clang-build/build/./bin/clang
-- Check for working C compiler: /tmp/clang-build/build/./bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /tmp/clang-build/build/./bin/clang++
-- Check for working CXX compiler: /tmp/clang-build/build/./bin/clang++ --
broken
CMake Error at /usr/local/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44
(message):
  The C++ compiler "/tmp/clang-build/build/./bin/clang++" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: /tmp/clang-build/build/tools/clang/stage2-bins/CMakeFiles/CMakeTmp

  Run Build Command:"/usr/bin/ninja" "cmTC_602a7"

  [1/2] Building CXX object CMakeFiles/cmTC_602a7.dir/testCXXCompiler.cxx.o

  [2/2] Linking CXX executable cmTC_602a7

  FAILED: : && /tmp/clang-build/build/./bin/clang++
  CMakeFiles/cmTC_602a7.dir/testCXXCompiler.cxx.o -o cmTC_602a7 && :

  /usr/bin/ld: cannot find -lc++

  clang-6.0: error: linker command failed with exit code 1 (use -v to see
  invocation)

  ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)

-- Configuring incomplete, errors occurred!
Quuxplusone commented 6 years ago

Same on release_70 branch.