CLion使用WSL工具链的故障(测试CMake运行完成并出现错误):test CMake run finished with errors

2 篇文章 0 订阅

以下是错误详细信息:

CLion - Build #CL-191.6183.77

Windows - Win10 Home | Version 1803 | OS build 17134.472

Ubuntu - 18.04.2 LTS

WSL CMake - 3.10.2

(note - the CMake[Error|Output].log files don't exist, there's not even the /cmake_check_environment/ folder)

CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The C compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:192 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The CXX compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake:190 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:72 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:65 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!
See also "/mnt/c/Users/<user>/AppData/Local/Temp/cmake_check_environment/_build543712673987259618/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Users/<user>/AppData/Local/Temp/cmake_check_environment/_build543712673987259618/CMakeFiles/CMakeError.log".

Error code: 1

解决办法:

1.在/etc /中创建包含内容的文件wsl.conf并编辑: 

#vim /etc/wsl.conf

[automount]
options = "metadata"
enabled = true


2.重新启动wsl

管理员权限打开powershell ,然后执行下面命令

关闭:net stop LxssManager

开启:net start LxssManager    

3.启动ssh

sudo /etc/init.d/ssh start

 

问题解决,整理自:https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003413779-Troubles-with-WSL-toolchain-Test-CMake-run-finished-with-errors-?sort_by=votes

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值