[Mono-dev] Compiling Mono on Windows - machine.config permission issue

voldemarz voldemarz at gmail.com
Fri Apr 26 22:11:49 UTC 2013

I am trying to compile Mono on Windows 8 using Cygwin. I can do that
successfully with versions 2.10.9 and 3.0.6, but with some issues. The
problem is that build process sometimes (in 50% of attempts) fails due lack
of file permissions on *machinge.config* files in
[mono]/runtime/etc/mono/X.0 subfolders:

Valdis at winspiron8 /cygdrive/d/Work/Mono/t2.10.9/runtime/etc/mono/1.0
$ ls -l
total 20
---------- 1 Valdis None 17718 Apr 26 22:09 machine.config

If manually set permissions and rerun the build it completes successfully. I
was trying to find the script with generates or copies the configs, but
failed. *Any idea why permissions are not set? Any suggestion where to fix
this by adding 'chmod' ?* Here's the error:

make all-local
make[8]: Entering directory `/cygdrive/d/Work/Mono/2.10.9/mcs/class/corlib'
Converting corlib.dll.sources to
../../build/deps/net_2_0_corlib.dll.response ...
/bin/sh ./../../mkinstalldirs ../../class/lib/net_2_0/tmp/
mkdir -p -- ../../class/lib/net_2_0/tmp/
touch ../../class/lib/net_2_0/tmp//.stamp
MCS     [net_2_0] mscorlib.dll
warning CS8001: SDK path could not be resolved
System.Security.Permissions\KeyContainerPermission.cs(38,61): warning
CS0649: Field
`System.Security.Permissions.KeyContainerPermission._accessEntries' is never
assigned to, and will always have its default value `null'
Compilation succeeded - 2 warning(s)
ERROR: Unknown error during processing: System.UnauthorizedAccessException:
Access to the path "D:\Work\Mono\2.10.9\runtime\etc\mono\2.0\machine.config"
is denied.
  at System.IO.FileStream..ctor (... )

I was having the same issue with compiled *mcs.exe*:
MCS     [net_2_0] mscorlib.dll
Cannot open assembly './../../class/lib/build/mcs.exe': Permission denied.
make[8]: *** [../../class/lib/net_2_0/tmp/mscorlib.dll] Error 2

I fixed that by adding 'chmod' command for compiled binaries in

View this message in context: http://mono.1490590.n4.nabble.com/Compiling-Mono-on-Windows-machine-config-permission-issue-tp4659520.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list