Error complie CLion C++ project on ArchLinux

Answered

I can't compile any project in CLion on ArchLinux. I have cmake instaled on system and everything, but when I do a compile I receive the fallowing error.

 

====================[ Build | all | Debug ]===================================== /opt/clion/bin/cmake/linux/bin/cmake --build /home/spydersc/CLionProjects/Spyder/cmake-build-debug --target all -- -j 1 make ℹ info Invoking all target make ℹ info Invoking cmake_check_build_system target sh: CMAKE_COMMAND: command not found sh: CMAKE_SOURCE_DIR: command not found sh: CMAKE_BINARY_DIR: command not found sh: -S: command not found make ✖ ERR $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 make ✖ ERR Recipe exited with code %d (node:5552) UnhandledPromiseRejectionWarning: Error: Recipe exited with code %d at ChildProcess. (/usr/lib/node_modules/make/src/cli.js:143:28) at ChildProcess.emit (events.js:210:5) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) (node:5552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:5552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Build finished

 

The CLion recognize the paths for Make (/usr/bin/make), for C Compiler (/usr/bin/cc) and for C++ Compiler (/usr/bin/c++). But not compile any project in C or C++. I use ArchLinux 5.3.1-arch1-1-ARCH x86_64 GNU/Linux. The CLion version is 2019.2.3 Build #CL-192.6817.18

 

Can anyone help me to solve this problem???

0
9 comments

Hi! Do you use the bundled CMake? Please provide the screenshot of File | Settings | Build, Execution, Deployment | Toolchains.

0
Avatar
Permanently deleted user
0

Please close your project (File | Close Project), on the Welcome screen choose New Project, choose C++ Executable, click Create. Can you build this project?

0
Avatar
Permanently deleted user

No give me the same error!!!

0
Avatar
Permanently deleted user

As you can see the result is the same!!!

 

====================[ Build | untitled | Debug ]================================
/opt/clion/bin/cmake/linux/bin/cmake --build /home/spydersc/CLionProjects/untitled/cmake-build-debug --target untitled -- -j 1
make ℹ info Invoking untitled target
make ℹ info Invoking cmake_check_build_system target
sh: CMAKE_COMMAND: command not found
sh: CMAKE_SOURCE_DIR: command not found
sh: CMAKE_BINARY_DIR: command not found
sh: -S: command not found
make ✖ ERR $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
make ✖ ERR Recipe exited with code %d
(node:18558) UnhandledPromiseRejectionWarning: Error: Recipe exited with code %d
at ChildProcess.<anonymous> (/usr/lib/node_modules/make/src/cli.js:143:28)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:18558) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:18558) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Build finished

0

Actually the error even doesn't look like a CLion's one. It mentions Node.js which is really strange. I don't understand what's happening.

  1. How have you installed CLion?
  2. Please do gcc --version in the Terminal and let me know the result.
1
Avatar
Permanently deleted user

Thanks for the answers.

I have instaled from AUR:

https://aur.archlinux.org/packages/clion/ 

The output of my gcc version:

gcc (GCC) 9.1.0
Copyright (C) 2019 Free Software Foundation, Inc.

0
Avatar
Permanently deleted user

Ok, the problem is solved I just remove nodejs from my machine and reinstalled the make and now everything works.

I had a node package installed "node-make" that was replacing the original make on my machine.

Thanks for the help.

0

I'm glad you solved the issue! Thanks for letting us know.

0

Please sign in to leave a comment.