Bug 22321 - NtlmClient error in build caused by passing Type2Message instance instead of GetBytes()
Summary: NtlmClient error in build caused by passing Type2Message instance instead of ...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-23 11:40 UTC by rwdim
Modified: 2014-11-29 08:53 UTC (History)
5 users (show)

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

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 for Bug 22321 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description rwdim 2014-08-23 11:40:57 UTC
When building git trunk on CentOS 6.5 x64, I get an error in mcs/class/Mono.Http/Mono.Http/NtlmClient.cs:99.

The line:
    Type3Message type3 = new Type3Message (type2);

should be:
    Type3Message type3 = new Type3Message (type2.GetBytes());

If it's not, the error is thrown:
if test -w /home/randy/projects/mono/mcs; then :; else chmod -R +w /home/randy/projects/mono/mcs; fi
cd /home/randy/projects/mono/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12   ' CC='gcc' all-profiles
Bootstrap compiler: Mono C# compiler version 2.10.8.0
MCS     [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/2.0.0.0__0738eb9f132ed756/Mono.Security.dll (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 1 Martin Baulig 2014-08-26 12:55:45 UTC
No, the "byte[]" constructor may only be used for debugging purposes.

You need to fix your build to use the newly built Mono.Security.dll, not the installed version from the GAC.
Comment 2 rwdim 2014-08-26 18:39:18 UTC
Ok... please explain how I can "fix my build" to use an assembly that has yet to be built instead of the one in there already?

The machine that this was tested on had no mono on it until just before I built, then I installed the previous stable build so that I could build this current version.

Also, I didn't see anywhere that said "byte[] constructors may only be used for debugging...", so perhaps an assert that stops a production build when this constructor is used is in order.

Thx!
Randy
Comment 3 Martin Baulig 2014-08-26 18:47:56 UTC
Is this the normal Linux build after a clean git checkout?  You shouldn't be getting this error and I'm actually wondering how this can happen ...

I'll see whether I can find someone in the office who has a Linux box to have a look at this.
Comment 4 Martin Baulig 2014-08-26 18:55:49 UTC
Could you please attach the full build output?

What's happening here is that somehow, this is attempting to build System.dll using the installed Mono.Security.dll from the GAC instead of the newly built one.
Comment 5 foka 2014-09-26 10:33:49 UTC
I had the same error when tried to compile current 3.8 (mono-3.8.0-branch e451fb2) on my Ubuntu 12.04 with mono 2.10.8.1 installed in /usr/bin.
Solution:
I installed 3.4 (mono-3.4.0-branch) in /usr/bin and then compiled 3.8 on installed 3.4.
Comment 6 alex_y_xu 2014-11-29 08:53:40 UTC
duplicate of bug 20462