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

Issue while compiling: "/usr/bin/cc - broken" #4440

Open
SimoneTomasella2002 opened this issue Apr 27, 2024 · 1 comment
Open

Issue while compiling: "/usr/bin/cc - broken" #4440

SimoneTomasella2002 opened this issue Apr 27, 2024 · 1 comment

Comments

@SimoneTomasella2002
Copy link

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

@godofgrunts
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants