Issue while compiling: "/usr/bin/cc - broken"
SimoneTomasella2002 opened this issue · comments
I followed the INSTALL.md instructions for Linux (export CC=clang and export CXX=clang++, and the cmake instructions).
But it keeps giving me this error and I wasn't able to fix it :c
I need some help
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/usr/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/home/simone/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-qoRqxd'
Run Build Command(s): /usr/bin/ninja -v cmTC_cf845
[1/2] /usr/bin/cc -o CMakeFiles/cmTC_cf845.dir/testCCompiler.c.o -c /home/simone/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-qoRqxd/testCCompiler.c
[2/2] : && /usr/bin/cc -stdlib=libc++ CMakeFiles/cmTC_cf845.dir/testCCompiler.c.o -o cmTC_cf845 && :
FAILED: cmTC_cf845
: && /usr/bin/cc -stdlib=libc++ CMakeFiles/cmTC_cf845.dir/testCCompiler.c.o -o cmTC_cf845 && :
cc: error: unrecognized command-line option ‘-stdlib=libc++’
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!
I'm using Manjaro Linux
Are you sure you did the export correctly? Your output says
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
Which is wrong. libc++ is standard library for clang
.
Maybe it's possible you don't have clang installed? Make sure you have clang
installed with sudo pacman -Sy clang
and try again.