Skip to content

"libstdc++ version must be at least" assertion when building with libc++ #65880

@DenisYaroshevskiy

Description

@DenisYaroshevskiy

Hi!

I

  1. cloned/built/installed llvm
  2. rebuilding llvm with the latest llvm trunk.

First time it worked, but when I am building with trunk, the configuration fails.

Please help?

history of commands

 2017  CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS="--stdlib=libc++ -march=native" -DLLVM_ENABLE_RUNTIMES=all -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;cross-project-tests;libc;libclc;lld;lldb;openmp;polly;pstl" -DCMAKE_BUILD_TYPE=Release  ../llvm
 2018  clear
 2019  time ninja
 2020  sudo ninja install
 2021  rm -rf *
 2022  CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS="--stdlib=libc++ -march=native" -DLLVM_ENABLE_RUNTIMES=all -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;cross-project-tests;libc;libclc;lld;lldb;openmp;polly;pstl" -DCMAKE_BUILD_TYPE=Release  ../llvm

Now fails with

CMake Error at cmake/modules/CheckCompilerVersion.cmake:88 (message):
  libstdc++ version must be at least 7.4.
Call Stack (most recent call first):
  cmake/config-ix.cmake:16 (include)
  CMakeLists.txt:872 (include)

Versions:

clang --version
clang version 18.0.0 (git@github.com:llvm/llvm-project.git 444abb396c340e52a8a4db5778b7d6b3b6195070)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

clang++ --version
clang version 18.0.0 (git@github.com:llvm/llvm-project.git 444abb396c340e52a8a4db5778b7d6b3b6195070)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidResolved as invalid, i.e. not a buglibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions