Issue with clang-18 to configure the project: cannot find -lstdc++ #4972
Answered
by
hugtalbot
hugtalbot
asked this question in
Build / Config / Environment
-
I just updated my Ubuntu to v24.04 and faced the follow issue: The C++ compiler
"/usr/bin/clang++-18"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/data/Softwares/sofa/build/build-master/CMakeFiles/CMakeScratch/TryCompile-oTjfUU'
Run Build Command(s): /usr/bin/ninja -v cmTC_54bbb
[1/2] /usr/bin/clang++-18 -MD -MT CMakeFiles/cmTC_54bbb.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_54bbb.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_54bbb.dir/testCXXCompiler.cxx.o -c /data/Softwares/sofa/build/build-master/CMakeFiles/CMakeScratch/TryCompile-oTjfUU/testCXXCompiler.cxx
[2/2] : && /usr/bin/clang++-18 CMakeFiles/cmTC_54bbb.dir/testCXXCompiler.cxx.o -o cmTC_54bbb && :
FAILED: cmTC_54bbb
: && /usr/bin/clang++-18 CMakeFiles/cmTC_54bbb.dir/testCXXCompiler.cxx.o -o cmTC_54bbb && :
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang++-18: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed. Versions:
|
Beta Was this translation helpful? Give feedback.
Answered by
hugtalbot
Sep 4, 2024
Replies: 1 comment
-
To fix this, you need to make sure that libstdc++ is installed with the proper version. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hugtalbot
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To fix this, you need to make sure that libstdc++ is installed with the proper version.
With clang-18, you need to run :
sudo apt install libstdc++-14-dev