관심있는 주제/Error

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.

Lynn123 2022. 2. 6. 15:37
반응형

Cmake 중 발생한 에러

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.

 

해결방법

1. g++ 설치

나는 이미 설치가 되어 있어서 설치는 안 했는데

https://gracefulprograming.tistory.com/93

 

[Linux] gcc, g++ 설치하기 (CentOS)

개요 안녕하세요 피터입니다. Linux에 개발환경을 구축하기 위해서는 컴파일러(Compiler) 설치가 필수입니다. C언어 컴파일러는 gcc, C++언어 컴파일러는 g++ 인데 OS 설치 시 최소설치(Minimum)으로 설치

gracefulprograming.tistory.com

이런 블로그 보면서 설치하면 쉽게 될 거 같다.

2. g++ 설치 확인

g++ -v

3. g++, gcc 경로 확인

which g++
which gcc

 

4. 설치가 잘 되어 있다면 CMAKE 할 때 CXX, C Compiler 경로 지정

이때 prefix 경로는 내가 Install 원하는 경로로 설정

cmake .. -DCMAKE_INSTALL_PREFIX=/your/install/path/ -DCMAKE_CXX_COMPILER=/your/g++/path -DCMAKE_C_COMPILER=/your/gcc/path

 

[Reference]

https://github.com/ClickHouse/ClickHouse/issues/4953

 

clickhouse build failed on MacOS 10.14 · Issue #4953 · ClickHouse/ClickHouse

Follow instructions at https://clickhouse.yandex/docs/en/development/build_osx/ but it stopped at the step of cmake .. -DCMAKE_CXX_COMPILER=which g++-8 -DCMAKE_C_COMPILER=which gcc-8 Operating syst...

github.com

 

반응형