cmake thinks configure_file fails when using ntfs-3g filesystem on linux with different user of stickyuser
exec and related permissions have been set properly.
ls -l
total 1
-rwxrwx--- 1 root plugdev 12 May 9 21:53 bla
drwxrwx--- 1 root plugdev 360 May 9 22:00 build
-rwxrwx--- 1 root plugdev 60 May 9 21:54 CMakeLists.txt
cat CMakeLists.txt
project(hello)
message("hello AXD")
configure_file(bla yay)
cat bla
hello world
cmake ../
CMake Error at /usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake:196 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The C compiler identification is GNU 5.4.0
CMake Error at /usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake:181 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 5.4.0
CMake Error at /usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake:179 (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.5/Modules/CMakeTestCCompiler.cmake:81 (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.5/Modules/CMakeTestCXXCompiler.cmake:74 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
hello AXD
CMake Error at CMakeLists.txt:3 (configure_file):
configure_file Problem configuring file
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/mnt/Data/Code/test/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/Data/Code/test/build/CMakeFiles/CMakeError.log".
I don't understand why it's not building. It might not be a bug. But at this point I think it might be a cmake bug. As I searched online a common mistake is no execute permissions. But I definitely have execute permission and tested with dummy scripts. It's a ntfs-3g partition with umask/gmask is setup so that other
has no permissions.
cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
I have compiled cmake 3.8.1 and this is the output of cmake ../
with that version
cat ../CMakeLists.txt
project(hello)
message("hello AXD")
configure_file(bla yay)
find_package(Threads)
/opt/cmake/bin/cmake --version
cmake version 3.8.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
/opt/cmake/bin/cmake ../
CMake Error at /opt/cmake/share/cmake-3.8/Modules/CMakeDetermineSystem.cmake:180 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The C compiler identification is GNU 5.4.0
CMake Error at /opt/cmake/share/cmake-3.8/Modules/CMakeDetermineCCompiler.cmake:175 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 5.4.0
CMake Error at /opt/cmake/share/cmake-3.8/Modules/CMakeDetermineCXXCompiler.cmake:170 (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 /opt/cmake/share/cmake-3.8/Modules/CMakeTestCCompiler.cmake:71 (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 /opt/cmake/share/cmake-3.8/Modules/CMakeTestCXXCompiler.cmake:64 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
hello AXD
CMake Error at CMakeLists.txt:3 (configure_file):
configure_file Problem configuring file
CMake Error at /opt/cmake/share/cmake-3.8/Modules/CheckIncludeFile.cmake:46 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
/opt/cmake/share/cmake-3.8/Modules/FindThreads.cmake:128 (CHECK_INCLUDE_FILE)
CMakeLists.txt:4 (find_package)
-- Looking for pthread.h
-- Looking for pthread.h - found
CMake Error at /opt/cmake/share/cmake-3.8/Modules/CheckSymbolExists.cmake:70 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
/opt/cmake/share/cmake-3.8/Modules/CheckSymbolExists.cmake:39 (_CHECK_SYMBOL_EXISTS)
/opt/cmake/share/cmake-3.8/Modules/FindThreads.cmake:141 (CHECK_SYMBOL_EXISTS)
CMakeLists.txt:4 (find_package)
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.8)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/mnt/Data/Code/test/bulid2/CMakeFiles/CMakeOutput.log".
See also "/mnt/Data/Code/test/bulid2/CMakeFiles/CMakeError.log".
The error is on line 70. Which is
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${SOURCEFILE}" @ONLY)
On other filesystems e.g. in /tmp everything works fine. Btw when run as root user everything works as expected. When running though it seams as if configure_file succeeds but I suspect the code assumes a certain user/group of the new file to be and so it fails. But I haven't looked at a cmake source code this is just a hunch.
Thank you very much.