Bugzilla – Bug 715
Enhancements for build.py on Windows
Last modified: 2010-02-18 10:37:28 CET
Created attachment 147 [details]
Enhancements to how build.py starts programs
I've made a few changes to build.py to make it work better on Windows. Curiously, I had no problem running the validator after I had successfully built it.
The changes are:
- Using subprocess.call(cmd) in runCmd, so that quoted arguments remain quoted, since it's so common to have spaces in paths on Windows. This doesn't work for .\ant, since it tries to run the shell script first, not the batch file, so I only do it if the executable name is quoted.
- Not using sys.execvp(...) or sys.execve(...) on Windows. Since Windows doesn't support exec(), this seems to spawn a child process, then exit to the shell in the parent, which isn't a great experience.
- Adding -g to the calls to javac, and using -classpath instead of -cp in the calls to java, so that I could change java to jdb and discover that I'd missed the undocumented "localent" step.
Created attachment 148 [details]
log showing build failure
I applied that patch and ran a build but got a fatal error.
It seems to build jing fine (using ant) but fails when it tries to build the datatype jar file. See the attached log. The error message it emits is: "WindowsError: [Error 2] The system cannot find the file specified". I assume the file it can't find is the "temp-javac-list" file, but it doesn't actually explicitly say that, so perhaps it could be some other file.
I checked my build dir and the temp-javac-list is there and its contents are as expected.
It seems this error actually has nothing to do with it not being able to find the temp-javac-list file. But if not that, I'm at a loss to try to figure out what it is that it can't find.
d'oh.. problem was that it couldn't find the javac command because I didn't have the JDK bin directory in my path. Adding it to my path fixed that error and I managed to get a v.nu instance and get it running successfully.
I'll commit the patch shortly. Carey, you deserve come big thanks