Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building libc++ instructions fail on linux #121163

Open
rconde01 opened this issue Dec 26, 2024 · 5 comments
Open

Building libc++ instructions fail on linux #121163

rconde01 opened this issue Dec 26, 2024 · 5 comments
Labels
build-problem clang Clang issues not falling into any other category libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. platform:linux

Comments

@rconde01
Copy link

Following these directions using gcc 13.1 on Redhat EL9:
https://releases.llvm.org/19.1.0/projects/libcxx/docs/BuildingLibcxx.html#id4

ninja -C build runtimes gives:

CMake Error at /home/rconde/Documents/cn2/p/b/clang4e9cde48f94f6/b/libunwind/src/CMakeLists.txt:102 (message):
  Compiler doesn't support generation of unwind tables if exception support
  is disabled.  Building libunwind DSO with runtime dependency on C++ ABI
  library is not supported.
@github-actions github-actions bot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 26, 2024
@philnik777
Copy link
Contributor

What exactly were the commands you ran?

@rconde01
Copy link
Author

cmake --version
gcc --version
ninja --version

wget https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/llvm-project-19.1.0.src.tar.xz

rm -rf llvm-project-19.1.0.src

tar -xJf llvm-project-19.1.0.src.tar.xz

cd llvm-project-19.1.0.src

mkdir build

cmake -G Ninja -S llvm -B build \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \
   -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
   -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu"
ninja -C build runtimes

And the log is attached.

build.txt

@philnik777
Copy link
Contributor

It looks like your Clang build is broken somehow. Could you check what happens when you try to build a simple test program with the just built Clang? The executable should be at build/bin/clang++. Something like int main() {} is probably enough of a test program.

@rconde01
Copy link
Author

hmm:

/opt/rh/gcc-toolset-13/root/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
/opt/rh/gcc-toolset-13/root/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

I used gcc-toolset-13 to compile

@philnik777
Copy link
Contributor

Ok, that's out of my field of expertise. Moving to Clang.

@philnik777 philnik777 added the clang Clang issues not falling into any other category label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem clang Clang issues not falling into any other category libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. platform:linux
Projects
None yet
Development

No branches or pull requests

3 participants