Strange CMake Error

#1
I have run into a strange error. CMake somehow lost permission to read the cache file and I don't know why. How do I restore the permissions?

Compile Output:

1>------ Build started: Project: Game, Configuration: Debug x64 ------
1>Building Custom Rule C:/Users/Name/Documents/CRYENGINE Projects/RPG/Code/CMakeLists.txt
1>CMake is re-running because C:/Users/Name/Documents/CRYENGINE Projects/RPG/solutions/win64/CMakeFiles/generate.stamp is out-of-date.
1> the file 'C:/Users/Name/Documents/CRYENGINE Projects/RPG/Code/CMakeLists.txt'
1> is newer than 'C:/Users/Name/Documents/CRYENGINE Projects/RPG/solutions/win64/CMakeFiles/generate.stamp.depend'
1> result='-1'
1>CUSTOMBUILD : CMake error : There is a CMakeCache.txt file for the current binary tree but cmake does not have permission to read it. Please check the permissions of the directory you are trying to run CMake on.
1>CUSTOMBUILD : CMake error : Error executing cmake::LoadCache(). Aborting.
1>
1>Done building project "Game.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Re: Strange CMake Error

#3
I deleted the solutions folder and tried regenerating the solution like you said and got this error:

Encountered an error running command '[C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Tools/CryVersionSelector/bin/cryrun/cryrun.exe', 'projgen',
'C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject']'!

Re: Strange CMake Error

#4
We would like to see the exact error message, to do this please complete the following steps:
1. Open a console window (Command Prompt). You can click start and type 'cmd'.
2. Paste the following text in the command prompt window:
"C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Tools/CryVersionSelector/bin/cryrun/cryrun.exe" projgen "C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject"
3. Press Enter

Please copy and paste any output form the command prompt here.

In case you receive a message similar to "Permission denied", please make sure the project folder and all files inside are not read-only.
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: Strange CMake Error

#5
Here are the Command Prompt results:

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

Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\>"C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Tools/CryVersionSelector/bin/cryrun/cryrun.exe" projgen "C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject
'C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject' not found.

C:\>"C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Tools/CryVersionSelector/bin/cryrun/cryrun.exe" projgen C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject
usage: cryrun.exe [-h] [--platform {w,i,n,_,x,6,4}]
[--config {Debug,Release,RelWithDebInfo,MinSizeRel}]
{upgrade,require,engine_gen,projgen,cmake-gui,build,open,server,edit,package,metagen}
...
cryrun.exe: error: unrecognized arguments: Projects\RPG\Game.cryproject

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

After reading this I tried launching the game by running the "Game.cryproject" executable. I get an error and all I'm shown is just a windowed black screen. I will attach the plugin error.
Attachments
pulgin fail.PNG
pulgin fail.PNG (6.13 KiB) Viewed 6539 times

Re: Strange CMake Error

#6
Apologies I should have mentioned to make sure the path to the project is accurate (Replace "Name" with the proper name of your windows user folder).
Also, did you make sure that all the files in your project folder are not readonly?

The first command failed because it couldn't find the project file (incorrect path).
The second command failed because the quotes were removed around the project path (these are required).
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: Strange CMake Error

#7
I did use my actual user name when I tried it. The outputs resulted as such because I typed in "cd ../" twice to go backwards within the directory before I copy pasted.
This time I left things as is so before copy pasting it will be "C:\Users\Name>" instead of "C:>".
I did however forget to make sure all the files weren't read only so I made sure to do that before trying again.

Here is the output this time:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Name>"C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.6\Tools/CryVersionSelector/bin/cryrun/cryrun.exe" projgen "C:\Users\Name\Documents\CRYENGINE Projects\RPG\Game.cryproject"
Generating solution...
Solution path: C:\Users\Name\Documents\CRYENGINE Projects\RPG\solutions/win64
Solution generation command '['C:\\Program Files (x86)\\Crytek\\CRYENGINE Launcher\\Crytek\\CRYENGINE_5.6\\Tools\\CMake\\Win32/bin/cmake.exe', '-Wno-dev', '-GVisual Studio 16 2019', '-DCMAKE_TOOLCHAIN_FILE=C:\\Program Files (x86)\\Crytek\\CRYENGINE Launcher\\Crytek\\CRYENGINE_5.6\\Tools\\CMake\\toolchain/windows/WindowsPC-MSVC.cmake', 'C:\\Users\\Name\\Documents\\CRYENGINE Projects\\RPG\\Code']'
CMake Error: There is a CMakeCache.txt file for the current binary tree but cmake does not have permission to read it. Please check the permissions of the directory you are trying to run CMake on.
CMake Error: Error executing cmake::LoadCache(). Aborting.

Encountered and error while running command '['C:\\Program Files (x86)\\Crytek\\CRYENGINE Launcher\\Crytek\\CRYENGINE_5.6\\Tools\\CMake\\Win32/bin/cmake.exe', '-Wno-dev', '-GVisual Studio 16 2019', '-DCMAKE_TOOLCHAIN_FILE=C:\\Program Files (x86)\\Crytek\\CRYENGINE Launcher\\Crytek\\CRYENGINE_5.6\\Tools\\CMake\\toolchain/windows/WindowsPC-MSVC.cmake', 'C:\\Users\\Name\\Documents\\CRYENGINE Projects\\RPG\\Code']'!
Look for errors in the output above.
Generating solution has failed!

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

After running this within the command prompt, CryEngine attempts to generate solutions again, but it fails.

Re: Strange CMake Error

#8
This appears to be an issue with CMake itself.

Can you open the command window with administrative privileges and run the command again?
Also, you can try to delete the solutions folder and generate again.
One last thing is if you have any anti virus software, to disable it temporarily and see if it is interfering with CMake in some way.
Uniflare
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 3 guests