Closed lemoran closed 5 years ago
This looks like a machine configuration problem, not one of our tooling, g++ or scons.
Cannot create temporary file in C:\Windows: Permission denied
Did you set a TMP or TEMP environment variable to point to the Windows directory, or not having it set at all? Try setting the environment variable TMP (and TEMP) to point to a directory where your windows user has write permission (or if brave log in as admin :-)
As a second experiment you could try to create a non-scons project and try if this compiles, e.g., hello world C++ project.
Dear Luis (see also github) This looks like a machine configuration problem, not one of our tooling, g++ or scons.
Cannot create temporary file in C:\Windows: Permission denied
Did you set a TMP or TEMP environment variable to point to the Windows directory, or not having it set at all? Try setting the environment variable TMP (and TEMP) to point to a directory where your windows user has write permission (or if brave log in as admin :-)
As a second experiment you could try to create a non-scons project and try if this compiles, e.g., new C++ project-> hello world
Regards Peter.
Luis Moran wrote:
Note: cpp file only contains main() function with: "return 0;"
Installation of both Cevelop and MIN-GW was done with default installer's settings (both Cevelop and MIN-GW defaults).
It's trying to write to Windows folder (It works when ran as administrator, but I don't want to run it that way).
Log is the following:
Running SCons at 5/5/15 11:45 AM Command line: C:\Python27\Scripts\scons.bat -u --jobs=4 scons: Reading SConscript files ...
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "C:\Users\DW\Cevelop\workspace\HelloScons\SConstruct", line 11, in scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: Debug g++ -o Debug\main.o -c -O0 -g3 -Wall -c -fmessage-length=0 main.cpp
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Cannot create temporary file in C:\Windows: Permission denied scons: *\ [Debug\main.o] Error 3 scons: building terminated because of errors. Duration 8744 ms.
— Reply to this email directly or view it on GitHub https://github.com/IFS-HSR/SConsolidator/issues/29.
Prof. Peter Sommerlad
Institut für Software: Bessere Software - Einfach, Schneller! HSR Hochschule für Technik Rapperswil Oberseestr 10, Postfach 1475, CH-8640 Rapperswil
http://ifs.hsr.ch http://cevelop.com http://linticator.com tel:+41 55 222 49 84 == mobile:+41 79 432 23 32 fax:+41 55 222 46 29 == mailto:peter.sommerlad@hsr.ch
Hi Peter, I checked my environment variables and they seem to be correctly set. Both TEMP and TMP are pointing to %USERPROFILE%\AppData\Local\Temp for user variables and to %SystemRoot%\TEMP for system variables.
I created the non-scons hello world project and it was successfully built. After that I used the same code (the main CPP file) to create a new Scons project, and it continued failing with the same message.
My computer runs Windows 7 Professional, and all installations were done using default installer settings (Cevelop, Min-GW, Python and Scons).
First time I sent the bug report I verified that a file was created under %SystemRoot% (C:\Windows) when ran as Administrator. That's the file that can't be created when ran as standard user. (EDIT: I verified the file was created using Sysinternals Process Monitor https://technet.microsoft.com/en-us/sysinternals/bb896645)
I submitted the issue here because after sending it through Cevelop website contact form, a member of the team told me to do it. I'm not sure if it's a SConsolidator or Cevelop issue.
I had a similar problem with a completely unrelated tool, building a scons tutorial under msys/mingw32, and got around it by addding:
Import('env')
env['ENV']['TMP'] = '/tmp'
env['ENV']['TEMP'] = '/tmp'
in my top SConscript, and creating a dir c:\tmp
. Change that to something non-admin like c:\users\you\tmp
to run non-admin.
Im my case it seems like scons for some reason doesn't pickup the system vars, which are correctly set.
Not sure why. I'll post update if I find a nicer solution.
Note: cpp file only contains main() function with: "return 0;"
Installation of both Cevelop and MIN-GW was done with default installer's settings (both Cevelop and MIN-GW defaults).
It's trying to write to Windows folder (It works when ran as administrator, but I don't want to run it that way).
Log is the following:
Running SCons at 5/5/15 11:45 AM Command line: C:\Python27\Scripts\scons.bat -u --jobs=4 scons: Reading SConscript files ...
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "C:\Users\DW\Cevelop\workspace\HelloScons\SConstruct", line 11, in
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: Debug
g++ -o Debug\main.o -c -O0 -g3 -Wall -c -fmessage-length=0 main.cpp
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Cannot create temporary file in C:\Windows: Permission denied scons: *\ [Debug\main.o] Error 3 scons: building terminated because of errors. Duration 8744 ms.