Bug 20462 - Mono actual version from github has compilation errors
Summary: Mono actual version from github has compilation errors
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 3.4.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-06-08 14:36 UTC by Krzysztof
Modified: 2015-03-09 20:09 UTC (History)
9 users (show)

Is this bug a regression?: ---
Last known good build:

Build log of mono-3.12.0 (943.12 KB, text/plain)
2015-03-09 17:39 UTC, Stuart Longland

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Krzysztof 2014-06-08 14:36:12 UTC
Mono.Http/NtlmClient.cs(99,54): error CS1502: The best overloaded method match for `Mono.Security.Protocol.Ntlm.Type3Message.Type3Message(byte[])' has some invalid arguments
/usr/lib/mono/gac/Mono.Security/ (Location of the symbol related to previous error)
Mono.Http/NtlmClient.cs(99,54): error CS1503: Argument `#1' cannot convert `Mono.Security.Protocol.Ntlm.Type2Message' expression to type `byte[]'
Compilation failed: 2 error(s), 1 warnings

P.S You should compile before pushing to repository.
Comment 1 Zoltan Varga 2014-06-08 17:17:54 UTC
There build seems to be ok:
Comment 2 Zoltan Varga 2014-06-12 12:53:24 UTC
Comment 3 Damian 2014-07-09 12:37:48 UTC
I also see this problem on a new build, somthing seems to be wrong.

MCS     [secxml/basic] System.dll
System.Security.AccessControl/SemaphoreSecurity.cs(136,35): warning CS0109: The member `System.Security.AccessControl.SemaphoreSecurity.PersistModifications(System.Runtime.InteropServices.SafeHandle)' does not hide an inherited member. The new keyword is not required
Mono.Http/NtlmClient.cs(99,54): error CS1502: The best overloaded method match for `Mono.Security.Protocol.Ntlm.Type3Message.Type3Message(byte[])' has some invalid arguments
/usr/lib/mono/gac/Mono.Security/ (Location of the symbol related to previous error)
Mono.Http/NtlmClient.cs(99,54): error CS1503: Argument `#1' cannot convert `Mono.Security.Protocol.Ntlm.Type2Message' expression to type `byte[]
Comment 4 João Vitor 2014-08-07 09:19:00 UTC
This error occurs if you use an older mono version as your installer bootstrap.
So, to work around this, you could build and install an intermediate mono version, and with it installed, build the latest mono.

The latest commit that I've been able to build and install is

Just before commit:
[build] Staged setup for building assemblies with cyclic dependencies

After building and installing

try to build the master commit again, and check the bootstrap mono being used during build (output)

in my case, the make output shows
Bootstrap compiler: Mono C# compiler version

and the master commit can be built successfully.
Comment 5 foka 2014-09-26 10:33:17 UTC
I had the error when tried to compile current 3.8 (mono-3.8.0-branch e451fb2) on my Ubuntu 12.04 with mono installed in /usr/bin.
I installed 3.4 (mono-3.4.0-branch) in /usr/bin and then compiled 3.8 on installed 3.4.
Comment 7 João Vitor 2014-10-28 15:07:17 UTC
I avoid this build error using

# ./autogen.sh must be run prior to this
make get-monolite-latest
make EXTERNAL_MCS="${PWD}/mcs/class/lib/monolite/gmcs.exe"

As described in
Comment 8 Brandon White 2014-10-28 15:09:41 UTC
Exact same issue with 3.10.0.  Build system is Debian Wheezy using mono provided by the distro.

I think mono should be capable of building without error using whatever
versions of mono are shipped in the mainstream distro versions.
Comment 9 alex_y_xu 2014-11-29 08:54:43 UTC
this is obviously ridiculous. a build should never, ever automagically depend on what is currently installed. dependencies must be explicit (e.g. cc toolchain) or not used at all.
Comment 10 Stuart Longland 2015-03-09 17:37:52 UTC
Just hit the above error message myself whilst trying to build mono-3.12.0 from the Gentoo 'dotnet' overlay.  Clearly the bug is not INVALID as there are 4 others with different distributions hitting the same problem.

My system has 2.10.9 installed already.  It's clear that mono-3.12's build system is not compatible with this existing version of Mono.

Is there some flag we can give the build system to tell it to *IGNORE* the existing build of mono?  What does the build system do when mono is not installed?
Comment 11 Stuart Longland 2015-03-09 17:39:56 UTC
Created attachment 10232 [details]
Build log of mono-3.12.0

This is the build log, as you can see the build fails in the `make install` step.
Comment 12 Zoltan Varga 2015-03-09 20:09:09 UTC
See comment #7 for a possible solution.