Jason Rumney wrote: > I'm confused, what permissions are you talking about? Windows does not > use POSIX permissions, all readable .exe files are considered executable. I'm not really familiar with the details of Windows file permissions so the easiest way for me to respond is to say that in my Windows environment (see below) a 'mingw32-make clean' followed by a 'mingw32-make' fails with a 'permission denied' for temacs.exe. ###Annotated) $mingw32-make clean $mingw32-make "../nt/oo-spd/i386/addsection" "oo-spd/i386/temacs.bin" "oo-spd/i386/temacs.exe" EMHEAP 16 Dumping from oo-spd/i386/temacs.bin to oo-spd/i386/temacs.exe echo oo-spd/i386/emacs.o > oo-spd/i386/buildobj.lst "./oo-spd/i386/temacs.exe" -batch -l loadup dump /usr/bin/sh: ./oo-spd/i386/temacs.exe: Permission denied mingw32-make[1]: *** [oo-spd/i386/emacs.exe] Error 126 mingw32-make[1]: Leaving directory `C:/emacs-22.1.1/src' mingw32-make: *** [all-other-dirs-gmake] Error 2 ### The following shows the 'permissions' of temacs.exe at ### this point $cacls c:\emacs-22.1.1\src\oo-spd\i386\temacs.exe c:\emacs-22.1.1\src\oo-spd\i386\temacs.exe xxx\wmeier:(special access:) STANDARD_RIGHTS_ALL DELETE READ_CONTROL WRITE_DAC WRITE_OWNER SYNCHRONIZE STANDARD_RIGHTS_REQUIRED FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES BUILTIN\Users:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES Everyone:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES ------------------------------------------------------------- My environment (which I think is nothing out of the ordinary) Windows XP (patched) using NTFS file structure MinGW (for gcc, mingw32-make & etc) Cygwin (for bash & etc) ------------------------------------------------------------- As described previously, some poking around shows that the problem is due to the fact that a dummy temacs.exe file without 'execute' permission exists when addsection is run in src/makefile. The dummy file is created in lib-src/makefile. The simple solution to the problem is to delete the dummy file just before runing addsection to create the real temacs.exe. I've attached a patch to do this against the EMACS_22_BASE src/makefile.w32-in ============================================================= ### Some gory details ### Demonstration of the problem ### ### Create dummy temacs.exe and then run addsection; ### Then: Cannot execute temacs.exe $ cd c:\emacs-22.1\src $bash bash-3.2$ echo temacs > oo-spd/i386/temacs.exe bash-3.2$ cacls oo-spd/i386/temacs.exe C:\emacs-22.1.1\src\oo-spd\i386\temacs.exe xxx\wmeier:(special access:) STANDARD_RIGHTS_ALL DELETE READ_CONTROL WRITE_DAC WRITE_OWNER SYNCHRONIZE STANDARD_RIGHTS_REQUIRED FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES BUILTIN\Users:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES Everyone:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES bash-3.2$ "../nt/oo-spd/i386/addsection" "oo-spd/i386/temacs.bin" "oo-spd/i386/temacs.exe" EMHEAP 16 Dumping from oo-spd/i386/temacs.bin to oo-spd/i386/temacs.exe bash-3.2$ ./oo-spd/i386/temacs.exe -l -batch loadup dump bash: ./oo-spd/i386/temacs.exe: Permission denied bash-3.2$ cacls oo-spd/i386/temacs.exe C:\emacs-22.1.1\src\oo-spd\i386\temacs.exe xxx\wmeier:(special access:) STANDARD_RIGHTS_ALL DELETE READ_CONTROL WRITE_DAC WRITE_OWNER SYNCHRONIZE STANDARD_RIGHTS_REQUIRED FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES BUILTIN\Users:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES Everyone:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES ### Creating temacs.exe in the absence of the dummy file ### works AOK bash-3.2$ rm oo-spd/i386/temacs.exe bash-3.2$ "../nt/oo-spd/i386/addsection" "oo-spd/i386/temacs.bin" "oo-spd/i386/temacs.exe" EMHEAP 16 Dumping from oo-spd/i386/temacs.bin to oo-spd/i386/temacs.exe bash-3.2$ ./oo-spd/i386/temacs.exe -l -batch loadup dump bash-3.2$ cacls oo-spd/i386/temacs.exe C:\emacs-22.1.1\src\oo-spd\i386\temacs.exe xxx\wmeier:F BUILTIN\Users:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_GENERIC_EXECUTE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_EXECUTE FILE_DELETE_CHILD FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES Everyone:(special access:) READ_CONTROL SYNCHRONIZE FILE_GENERIC_READ FILE_GENERIC_WRITE FILE_GENERIC_EXECUTE FILE_READ_DATA FILE_WRITE_DATA FILE_APPEND_DATA FILE_READ_EA FILE_WRITE_EA FILE_EXECUTE FILE_DELETE_CHILD FILE_READ_ATTRIBUTES FILE_WRITE_ATTRIBUTES