How to configure a cLion project for yugabytedb

I have finished ./ release. Then I open clion, and config the toolchain’s C Compiler to be “/opt/yb-build/llvm/yb-llvm-v13.0.1-yb-1-1651813550-191e3a05-centos7-x86_64/bin/clang” and the C++ compiler to be “/opt/yb-build/llvm/yb-llvm-v13.0.1-yb-1-1651813550-191e3a05-centos7-x86_64/bin/clang++”, then I open the project by select the CMakeLists.txt.
It show me that the GCC version is too old. version_str=‘4.8.5’. It required at least 7.0.0.
Maybe that I need to install GCC7 or GCC10 in my centos 7?

Hi @gordon

Have you seen this Configure a CLion project | YugabyteDB Docs ?

Thanks for reply. I’ve read that page.
My os is centos 7, and I config the clion at gcc8 gcc9 and gcc10. All of then are report some error. The gcc8 and gcc9 can’t compile icu, it report that ‘[0;36m[icu4c (uninstrumented)] e[0mconfigure: error: C++ compiler /usr/lib64/ccache/g++ does not work or no compiler found’.
and the gcc10 reports that ‘Bad path: => /usr/local/lib/…/lib64/ (0x00007fa9573d5000)
Bad path: => /usr/local/lib/…/lib64/ (0x00007fa9571bd000)’.
Who can tell me that the right gcc version? And how to select llvm for clion at centos 7?

Hi @gordon, we currently (as of commit bc7af78063aef0cc39ed18e482d1244a43e6e226) use Clang 13 for debug/release x86_64 Linux builds in the master branch, and Clang 12 for ASAN/TSAN on x86_64, as well as for all builds on aarch64 Linux. We use the default version of Clang on macOS (currently I believe it is 13 on Monterey). Does ./ or ./ release work for you on the command line? Could you also try specifying -DCMAKE_C_COMPILER=/path/to/yugabyte-db/build-support/compiler-wrappers/cc -DCMAKE_CXX_COMPILER=/path/to/yugabyte-db/build-support/compiler-wrappers/c++ in the CMake options box in the CLion dialog box shown It is possible that our instructions may need to be updated.

Also, during development, I would recommend doing a debug build on the command line, not a release build.