Does ROOT require full admin right to run under Windows XP? When running from a limited accout I get the followin error after starting ROOT:
*
W E L C O M E to R O O T *
*
Version 3.05/07 26 July 2003 *
*
You are welcome to visit our Web site *
[root.cern.ch](http://root.cern.ch) *
*
FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for win32gdk.
CINT/ROOT C/C++ Interpreter version 5.15.94, June 30 2003
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }. Error: could not create file
Error: could not create file
root[0]
ROOT does not require administritator priviledge to be installed or run.
It is likely that you did not follow the instructions given in our download page. In particular:
When running from the MSDOS prompt, you must set the following environment variables, eg in your autoexec.bat: (Restart the system if you set these variables for the first time).
set TEMP=c:\temp
set HOME=c:\your top directory
set TMPDIR=c:\temp
set ROOTSYS=c:\root (the directory where you installed Root)
set PATH=%PATH%;%ROOTSYS%\bin
A little more information. In fact I get this issue with CINT alone as well. If I run as Administrator, I don’t get the problem. Otherwise, I get this:
FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for win32gdk.
CINT/ROOT C/C++ Interpreter version 5.15.94, June 30 2003
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }. Error: could not create file
Error: could not create file
root [0]
No main() function found in given source file. Interactive interface started.
’?’:help, ‘.q’:quit, ‘statement’,’{statements;}’ or ‘.p [expr]’ to evaluate
got it. tmpname() is called in cint/src/pause.c. tmpname() will generate a FILE with a name like “\a4d.”. Under win XP tmpname() doesn’t care about %TMP%, %TEMP%, or %HOME%; it will always create a FILE in . (Here’s the “%&$* MS” that goes well with this behavior.) So Masa can’t use this function. Can rootdev take care of this, please?
tmpname is not used anymore by CINT.
This is replaced tmpfile(). This is in
CINT 5.14.105 already in CVS.
It will appear in the binary tar balls next week.
Why is this the first report of such a problem on Xp?
Are you running under CYGWIN?
Maybe because this tmpfile() bug was introduced in XP and Win2k is still widely used? I really don’t know. I believe, though, that on Win2k regular users are allowed to write to C:, whereas under XP they’re not (XP power users are, though).
Good to hear it’s gone now; I must admit I tried it with an older version of root (maybe 4 week old). I’ll check with the current cvs version tonight, if (new source)/(modem speed) permits…
And no, under win32gcc this problem doesn’t exist. Of course not! :-] (cygwin uses its own stdio.h and libc)
I still see tmpfile() occurrences in current cvs’s cint (I only checked pause.c), both after updating my local repository and looking with lxr. So I don’t believe this problem is fixed…
Sorry, sending out garbage twice a day is a bit too much…
Here’s what I forgot mention, which makes my post more sensible: tmpfile() uses the same buggy tmpname() implementation; so replacing tmpname() by tmpfile() doesn’t solve the issue.
The new CINT uses tmpfile instead of tmpnam such that the OS can
automatically delete some temp files required by CINT, even
when the process is killed outside Root.
This si supposed to solve several reports of files with names xxxxcintNM
left in /tmp.
I ignore if tmpfile uses internally tmpnam. If you have any evidence
that tmpnam is wrong, please post it.
If you have a better alternative to tmpfile, please post it.
So is there a resolution to this issues besides running as admin? As a limited account user I can created files on the root directory (C:) under Windows XP. Is CINT trying to write tmp files some where else?
it seems to me that this problem has not been solved yet. I just tried to run root with regular users privileges, having set the variables as you suggested I still get the following output:
CINT/ROOT C/C++ Interpreter version 5.15.133, Apr 18 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
Error: could not create file
Error: could not create file
Error: could not create file
root [0] Error: could not create file
Error: could not create file
Error: could not create file
Error: could not create file
Error: could not create file[/code]
Are there any known work-arounds? Any estimate as to when the problem might be fixed - this now affects some of my users with restricted accounts on xp. Thanks!
Cint already provides several solutions for temporary file creation. Depending on compile options, Cint uses different implementation.
I think I’ll have to give a limiation so that wrong option is not used
for WinXP.