Cmake error cannot open file for write

**``` cd build cmake [options] .. - #-- Building for: Visual Studio 14 2015 CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineSys tem.cmake:174 (file): file failed to ope...

victor still facing this issue
— Building for: Visual Studio 15 2017
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineSys tem.cmake:174 (file):
file failed to open for writing (No such file or directory):

C:/Users/nEW u/Desktop/shogun_stable/shogun/build/CMakeFiles/CMakeOutput.log

Call Stack (most recent call first):
CMakeLists.txt:27 (project)

CMake Error: Could not open file for write in copy operation C:/Users/nEW u/Desk top/shogun_stable/shogun/build/CMakeFiles/3.13.4/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineSys tem.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:27 (project)

CMake Error at CMakeLists.txt:27 (project):
Failed to make directory:

C:/Users/nEW u/Desktop/shogun_stable/shogun/build/CMakeFiles/3.13.4

— Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: C:/Users/nEW u/Desktop/shogun_stable/sh ogun/build/CMakeCache.txt.tmp
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Users/nEW u/Desktop/shogun_s table/shogun/build/CMakeCache.txt
CMake Error: : System Error: No such file or directory

I am trying to build VTK version 9.2.2 with CMake for a few days now, but no luck so far. I am getting the below error in CMake GUI:

CMake Error: Cannot open file for write: C:/Program Files/vtk/bin/CMakeCache.txt.tmpc3fcf
CMake Error: Unable to (re)create the private pkgRedirects directory:
C:/Program Files/vtk/bin/CMakeFiles/pkgRedirects
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Program Files/vtk/bin/CMakeCache.txt
CMake Error: : System Error: No such file or directory

I am following the video here, but it still does not work for me. I have tried to search for answers for a while, but there doesn’t seem to be the exact same error that I am having on the internet anywhere.

I am on Windows 10, using VTK 9.2.2 and my CMake version is 3.25.1. I also tried with multiple versions of visual studio in the configuration, but it returned the same error.


The steps I have taken were:

  1. Download VTK from the site
  2. Put the downloaded files into the program files directory
  3. Made a /src and /bin folder under a /vtk folder, which is outside the downloaded package
  4. Copied and pasted the downloaded files into the /src folder
  5. Opened CMake GUI and chose the src folder as the source and chose the bin folder as the build folder
  6. Clicked generate and it threw the errors above

asked Dec 11, 2022 at 13:40

Compiler v2's user avatar

Compiler v2Compiler v2

3,3199 gold badges29 silver badges52 bronze badges

4

The error message like

CMake Error: Cannot open file for write: ...

usually occurred when CMake has no permissions to write a given file.

Your case involves directories under C:/Program Files/, which are usually configured as read-only for normal users.

The file CMakeCache.txt is created in the build directory, so the error message about such file usually means problem with a build directory.

A build directory should always be writable by the regular user. Here CMake creates files for the build tool, and here a build tool creates intermediate and resulted files.

answered Dec 14, 2022 at 18:07

Tsyvarev's user avatar

TsyvarevTsyvarev

56.8k16 gold badges100 silver badges135 bronze badges

3

I’ve recently decided to give SFML 2.0 a try. I’m following http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php in order to compile the source code manually (I want to use C++11 features in my source code, otherwise I wouldn’t bother with CMake).

I’ve got the source code in a folder on my desktop called SFML2 and a separate folder on my desktop called SFML2-Build that will store the results of the build.

After filling out these two directories at the top of the CMake GUI, I went into Configure, selected Unix Makefiles, and then Specify native compilers, as per the 2.0 c++11 build instructions. Then I went on to select clang for C and clang++ for the c++ compiler, subsequently pressing Done on that same window.

However, as soon as I click done, I get a bunch of errors, and the build is deemed unsuccessful. I’ve followed the tutorials to a T so I’m not seeing what could be going wrong here. The source code is the latest version from GitHub.

CMake Error: Cannot open file for write: /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt.tmp
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:160 (file):
  file Internal CMake error when trying to open file:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeOutput.log for writing.
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake:172 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
  file problem creating directory:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
  file problem creating directory:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
  file problem creating directory:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdC
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:124 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:17 (project)

The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:171 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error: Could not find cmake module file:/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
  file problem creating directory:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdCXX
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:120 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:99 (file):
  file problem creating directory:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CompilerIdCXX
Call Stack (most recent call first):
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:39 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:120 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:17 (project)

The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation /Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:167 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error: Could not find cmake module file:/Users/Mike/Desktop/SFML2-Build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
Check for working C compiler: /usr/bin/cc
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:35 (file):
  file Internal CMake error when trying to open file:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeTmp/testCCompiler.c for
  writing.
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:47 (try_compile):
  Failed to open

    /Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeTmp/CMakeLists.txt

  No such file or directory
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

Check for working C compiler: /usr/bin/cc — broken
CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:58 (file):
  file Internal CMake error when trying to open file:
  /Users/Mike/Desktop/SFML2-Build/CMakeFiles/CMakeError.log for writing.
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler «/usr/bin/cc» is not able to compile a simple test program.

  It fails with the following output:

       CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)

Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt
CMake Error: : System Error: Permission denied
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. /Users/Mike/Desktop/SFML2-Build/CMakeCache.txt
CMake Error: : System Error: No such file or directory

Hello dear support team,

I’m trying to build Sofa because I’ve read it’s the only way to use the Modeler but I’m getting these errors when clicking ‘configure’ in Cmake:

______________________________________________

CMake Error: Cannot open file for write: C:/Program Files/Sofa/v16.08/build/CMakeCache.txt.tmp
CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:177 (file):
  file failed to open for writing (No such file or directory):

    C:/Program Files/Sofa/v16.08/build/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

CMake Error: Could not open file for write in copy operation C:/Program Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:189 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:141 (file):
  file problem creating directory: C:/Program
  Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CompilerIdC
Call Stack (most recent call first):
  C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:40 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCCompiler.cmake:121 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:2 (project)

The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation C:/Program Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCCompiler.cmake:184 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

CMake Error: Could not find cmake module file: C:/Program Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CMakeCCompiler.cmake
CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:141 (file):
  file problem creating directory: C:/Program
  Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CompilerIdCXX
Call Stack (most recent call first):
  C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:40 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCXXCompiler.cmake:113 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:2 (project)

The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation C:/Program Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at C:/Program Files/cmake-3.6.2-win64-x64/share/cmake-3.6/Modules/CMakeDetermineCXXCompiler.cmake:179 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

CMake Error: Could not find cmake module file: C:/Program Files/Sofa/v16.08/build/CMakeFiles/3.6.2/CMakeCXXCompiler.cmake
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_CXX_COMPILER could be found.

__________________________________________________________
After clicking Configure the second time I get:

CMake Error: Cannot open file for write: C:/Program Files/Sofa/v16.08/build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. C:/Program Files/Sofa/v16.08/build/CMakeCache.txt
CMake Error: : System Error: Permission denied
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. C:/Program Files/Sofa/v16.08/build/CMakeCache.txt
CMake Error: : System Error: Permission denied

___________________________________________________________

I have boost 1.60.0 installed, QT 5.6 (with the 3D modules) and CMake 3.6.2

I followed the build guide for windows, did include the Paths in Advanced System Settings.
The downloaded Sofa sources ar in Program Files/Sofa/v.16.08/src and the folder Program Files/Sofa/v.16.08/build is empty.

Can you please provide some help?
Thanks,
Moonfaxx

I have installed cmake using apt-get and the «latest» version is 2.8.0.

But when I try to used, my project requires cmake version 2.8.9.

I try to update but without any success using apt-get.

How can I get cmake 2.8.9 on Ubuntu 10.04

BuZZ-dEE's user avatar

BuZZ-dEE

13.7k18 gold badges62 silver badges80 bronze badges

asked Mar 4, 2013 at 12:39

Victor's user avatar

1

open your terminal with ctrl+alt+t and then type as

wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2-Linux-i386.sh
chmod +x cmake-2.8.10.2-Linux-i386.sh
./cmake-2.8.10.2-Linux-i386.sh

Hope that helps.

answered Mar 4, 2013 at 12:53

Raja G's user avatar

Raja GRaja G

98.6k102 gold badges251 silver badges325 bronze badges

6

The Ubuntu/Debian way for building from source :

sudo aptitude install devscripts
dget -x -u http://archive.ubuntu.com/ubuntu/pool/main/c/cmake/cmake_2.8.12.2-0ubuntu3.dsc
sudo aptitude build-dep cmake
cd cmake* && fakeroot dpkg-buildpackage -d
sudo dpkg -i ../cmake*deb

This will create a local backport and install it. Substitute almost any other package that has a newer DSC available.

Community's user avatar

answered Oct 15, 2013 at 1:37

kert's user avatar

kertkert

1412 bronze badges

2

You can try this:

cd ~/Downloads/
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.tar.gz
tar xzvf cmake-2.8.10.tar.gz
cd cmake-2.8.10
./configure
make -j4
sudo make install

This works for me on Ubuntu 12.04.
I had to close and reopen my terminal to see the version change.

cmake --version

cmake version 2.8.10

answered Jul 2, 2015 at 8:54

twerdster's user avatar

2

You have to compile cmake yourself or can can update your Ubuntu 10.04 LTS (to Ubuntu 12.04 LTS and then) to Ubuntu 12.10, which is the recommended method because the support for 10.04 (desktop) ends in April 2013.

answered Mar 4, 2013 at 12:42

BuZZ-dEE's user avatar

BuZZ-dEEBuZZ-dEE

13.7k18 gold badges62 silver badges80 bronze badges

2

В моем университете я все улаживаю своим профессором в лаборатории, и там я использую Linux. Дома я использую окна 8 с визуальной студией 2013 года.

Тогда самое первое, что вам нужно сделать, это перейти на ваш сайт производителя GPU, скачать новые драйверы и установить их. То есть, поскольку драйверы, установленные по умолчанию в Windows 8, не имеют надлежащей функциональности OpenGL.

Итак, поскольку он содержит Glut.h

Вы имеете в виду Glut.h — имена файлов чувствительны к регистру в большинстве операционных систем (Windows не среди них). Поэтому по соображениям переносимости вы должны писать их с правильной орфографией.

Я пошел в http://www.opengl.org/resources/libraries/glut/glut_downloads.php#2, чтобы загрузить библиотеку

Старая библиотека GLUT не поддерживается более десяти лет. Используйте альтернативную реализацию, например FreeGLUT и используйте это.

поэтому я попытался использовать CMake для компиляции перенасыщения, но это не сработало.

Хорошо, здесь у вас нет технической проблемы, но нет понимания. По сути, ваш мозг получил то, что я называю «гниение IDE»: все эти сахаристые покрытия и клики-точечные действия IDE неясны в том, что происходит на самом деле при создании программы. Вам придется пропустить там пулю и понять, как работает взаимодействие между генераторами управления сборки, системой сборки и компоновщиком.

CMake — это генератор управления построением: в CMake вы описываете зависимости сборки ваших источников программы. Из этого CMake генерирует фактическую информацию о сборке для используемой системы сборки (GNU make и GCC на Linux, компилятор NMake и MSVС++ для Windows, например).

Конечно, для работы CMake должна присутствовать соответствующая конфигурация CMake. А в случае с GLUT это определенно не существует (последний официальный выпуск GLUT предшествует первой версии CMake.

Теперь вам действительно нужно задаться вопросом: почему вы назвали «cmake» в первую очередь? Бьюсь об заклад, потому что вы всегда это делали или читали где-то, даже не пытаясь понять, что происходит.

То, что вы сделали, было следующим: Cargo Cult — это как-то напоминает реальный процесс, похоже, что он снаружи, но он не «t дают результаты. Выступление Фейнмана позже придумало термин Cargo Cult Programming; достаточно интересным я использовал этот термин (в соответствии с его определением, просто из-за того, что был знаком с речью Фейнмана), не зная, что другие люди уже придумали его точно так же. Такое часто случается, что люди будут приходить независимо с тем же термином для него.

Обычно я программирую Java, у меня нет так много головных болей для настройки IDE

Хорошо, это ваша проблема прямо там. Вы знаете только, как щелкнуть по IDE. Даже при программировании Java с помощью IDE вы должны хорошо познакомиться с фактическим процессом сборки: компилятор Java, создание файлов JAR и т.д.

Что мне не хватает, чтобы запустить мой OpenGL-код?

Держу пари не очень. Это отсутствие понимания того, как процесс сборки программного обеспечения работает и контролируется. Вам придется укусить пулю и узнать это в первую очередь. И для этого я предлагаю вам установить Linux или FreeBSD или, по крайней мере, Cygwin на вашем компьютере.

Windows — не очень хорошая система, чтобы изучить эти вещи, потому что она была построена вокруг клики графических интерфейсов. Это не значит, что Windows была плохой операционной системой. Это то, что вы хотите иметь что-то, с чем вы можете поэкспериментировать, и быстро проходить различные итерации переключателей опций сборки. Графический интерфейс не может дать вам это.

ok so i might be overlooking something simple but…

i’m installing iontorrent from source via github using docker on a fresh ubuntu 18.04 bionic beaver install(w/xubuntu desktop as per request)

everything was smooth until i tried to build.

inshort something is up with cmake, then it says something about how the compiler is broken.
tried as root but still permission denied.
i’ve reinstalled everything and tested separately.

would someone please point out what i’m forgeting?

i followed these instructions to a T. and then deleted the RMS entry in build file since the directory does not exist anywhere.
https://github.com/iontorrent/TS
https://hub.docker.com/r/iontorrent/tsbuild/

heres my error output (i deleted some from the middle as it looked repetitive.

Building TSS packages: Analysis
[15:12:12] Calling: MODULES='Analysis' /src/buildTools/build.sh
MODULES: Analysis
CMAKE OPTS: -DION_AVX:BOOL=FALSE
INPUT ARGS: 
DEFAULT JOB NUM: 13
ANALYSIS DIR (Dx): 
==================================================
 Building module /src/build/Analysis
==================================================
mkdir: cannot create directory '/src/build': Permission denied
find: '/src/build/Analysis': No such file or directory
/src/buildTools/build.sh: line 89: cd: /src/build/Analysis: No such file or directory
cmake -DION_AVX:BOOL=FALSE -G 'Unix Makefiles' /src/Analysis
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:174 (file):
  file failed to open for writing (No such file or directory):

    /src/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


CMake Error: Could not open file for write in copy operation /src/CMakeFiles/3.10.2/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
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:5 (project)


CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:145 (file):
  file problem creating directory: /src/CMakeFiles/3.10.2/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:5 (project)

-------------------------------------------------------------


-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:48 (file):
  file failed to open for writing (No such file or directory):

    /src/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler

    "/usr/bin/cc"Building TSS packages: Analysis
[15:12:12] Calling: MODULES='Analysis' /src/buildTools/build.sh
MODULES: Analysis
CMAKE OPTS: -DION_AVX:BOOL=FALSE
INPUT ARGS: 
DEFAULT JOB NUM: 13
ANALYSIS DIR (Dx): 
==================================================
 Building module /src/build/Analysis
==================================================
mkdir: cannot create directory '/src/build': Permission denied
find: '/src/build/Analysis': No such file or directory
/src/buildTools/build.sh: line 89: cd: /src/build/Analysis: No such file or directory
cmake -DION_AVX:BOOL=FALSE -G 'Unix Makefiles' /src/Analysis
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:174 (file):
  file failed to open for writing (No such file or directory):

    /src/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


CMake Error: Could not open file for write in copy operation /src/CMakeFiles/3.10.2/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
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:5 (project)


CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:145 (file):
  file problem creating directory: /src/CMakeFiles/3.10.2/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:5 (project)




-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:48 (file):
  file failed to open for writ

  is not able to compile a simple test program.

  It fails with the following output:

    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)


-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /src/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /src/CMakeCache.txt
CMake Error: : System Error: Permission denied
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'test'.  Stop.
make: *** No rule to make target 'package'.  Stop.
==================================================

Build of module Analysis failed.

FAILURES: 1 modules failed to build.
root@iondrive:/home/ionadmin/codes/TS# exit
exit

Generating a dependency graph with the —graphviz option using the default settings fails for some projects with many targets when running on Windows. The output error messages such as the following for some of the targets (here «T_57»), and no per-target files are generated for those targets:

CMake Error: Cannot open file for write: E:/tmp/cmake-test/build_3.17/deps/dep.T_57.tmp
CMake Error: : System Error: Too many open files
CMake Error: Cannot open file for write: E:/tmp/cmake-test/build_3.17/deps/dep.T_57.dependers.tmp
CMake Error: : System Error: Too many open files

The following minimal example can be used to reproduce the issue:
graphviz-many-targets.zip

It contains a single executable target that depends on 300 independent library targets.

To reproduce, unpack the archive and run cmake without options to configure a build. Then try to generate the dependency graph. You should be able to observe the problem described above.

The issue exists at least in versions 3.17.3 and 3.18-rc3. It is not present in version 3.16.8.

I suspect that the problem was introduced with the improvements to the Graphviz generation in MR !3766 (merged) .

Edited Jul 08, 2020 by

Понравилась статья? Поделить с друзьями:
  • Cmake error cannot determine link language for target
  • Cmake error at cmakelists txt 2 project
  • Cmake error 127
  • Cmake build error could not load cache
  • Cma ps vita ошибка при установке