Description
-
Your Windows build number: Microsoft Windows [Version 10.0.18362.175]
-
WSL kernel info (uname -a): Linux SAFREED-DESKTOP 4.4.0-18362-Microsoft Will this be Open Source? #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux
-
What you're doing and what's happening: I have a simple CMake project on the mounted fileystem (under /mnt) which fails to configure when run the first time with this error message:
Cannot copy output executable
'/mnt/c/users/safreed/source/repos/wslbug/build/CMakeFiles/CMakeTmp/cmTC_06b98'
to destination specified by COPY_FILE:
'/mnt/c/users/safreed/source/repos/wslbug/build/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_CXX.bin'
- What's wrong / what should be happening instead: The file copy should carry out successfully without errors.
The strange part is the files that 'fail' to copy are actually being copied, so the next time CMake is run it completes without errors. Also, if I copy the project to the root filesystem instead (under $HOME) there are no issues. I verified this only repros when using Debian under WSL (Ubuntu is fine and Debian running under HyperV is fine).
Repro steps:
- Create directory somewhere under /mnt on Debian WSL.
- Create project files and run cmake
cat > CMakeLists.txt << EOM
cmake_minimum_required(VERSION 3.7)
add_executable(main "main.cpp")
EOM
cat > main.cpp << EOM
#include <iostream>
int main() {
std::cout << "hello world" << std::endl;
return 0;
}
EOM
cmake .
Expected output:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- 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 - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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 - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sam/wslbug
Actual output:
CMake Error at /usr/share/cmake-3.7/Modules/CMakeDetermineSystem.cmake:180 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt
-- The C compiler identification is GNU 6.3.0
CMake Error at /usr/share/cmake-3.7/Modules/CMakeDetermineCCompiler.cmake:175 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt
-- The CXX compiler identification is GNU 6.3.0
CMake Error at /usr/share/cmake-3.7/Modules/CMakeDetermineCXXCompiler.cmake:170 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt
-- 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.7/Modules/CMakeTestCCompiler.cmake:71 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt
-- 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.7/Modules/CMakeTestCXXCompiler.cmake:64 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/mnt/c/users/safreed/source/repos/wslbug/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/users/safreed/source/repos/wslbug/build/CMakeFiles/CMakeError.log".