zezer3 / cmaked2

Automatically exported from code.google.com/p/cmaked2
0 stars 0 forks source link

configure_file fails permission denied since CMake 2.8.10.2 #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have CMake 2.8.10.2
2. Try to cmake a D project with -DCMAKE_D_COMPILER=dmd

It fails with the following error:

    CMake Error: Could not open file for write in copy operation /CMakeDCompiler.cmake.tmp
    CMake Error: : System Error: Permission denied
    CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineDCompiler.cmake:140 (CONFIGURE_FILE):
    configure_file Problem configuring file

This is due to ${CMAKE_PLATFORM_ROOT_BIN} being undefined. I guess it was a 
change in CMake, but I am not sure. Changing it to ${CMAKE_PLATFORM_INFO_DIR} 
(see patch) works fine again.

Original issue reported on code.google.com by opatut...@googlemail.com on 10 Jan 2013 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
I found the commit responsible for this to be the following:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7195aca54f40778f41894c9e62649
afe09e71d6c

Please read the commit message.

Original comment by opatut...@googlemail.com on 10 Jan 2013 at 10:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Many thanks. Do you know what happens with an older CMake? Need to check this 
before applying your patch.

Original comment by jens.k.mueller@gmail.com on 2 Mar 2013 at 6:09

GoogleCodeExporter commented 9 years ago
Just hit this issue on Debian using Cmake 2.8.11.1-1. provided patch will fix 
the issue.

On an older version of Cmake 2.8.9-1, with this patch applied we get a similar 
error:
-- The C compiler identification is GNU 4.8.1
-- The D compiler identification is unknown
CMake Error: Could not open file for write in copy operation 
/CMakeDCompiler.cmake.tmp
CMake Error: : System Error: Permission denied
CMake Error at /usr/share/cmake-2.8/Modules/CMakeDetermineDCompiler.cmake:139 
(CONFIGURE_FILE):
  configure_file Problem configuring file

Original comment by rmcjust...@gmail.com on 19 Jun 2013 at 1:33

GoogleCodeExporter commented 9 years ago
Hi All, I actually found the same behaviour in CMake 3.1.1, it seems that if 
CMakeDetermineSystem is included before a PROJECT declaration the 
CMAKE_PLATFORM_INFO_DIR is not ready. 

Original comment by adriano....@gmail.com on 19 Feb 2015 at 4:11