Bug 10477 - 'gmcs' (2.0 profile) tries to find System.Core (4.0) and it crashes
Summary: 'gmcs' (2.0 profile) tries to find System.Core (4.0) and it crashes
Status: RESOLVED INVALID
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2013-02-20 15:26 UTC by Andres G. Aragoneses
Modified: 2013-02-20 16:28 UTC (History)
1 user (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 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:
Status:
RESOLVED INVALID

Description Andres G. Aragoneses 2013-02-20 15:26:53 UTC
1) clone https://github.com/mono/gudev-sharp.git
2) ./autogen.sh --prefix=/usr && make

Current results:

/usr/bin/gmcs -out:gudev-sharp.dll -unsafe -target:library -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll    AssemblyInfo.cs generated/*.cs


Missing method .ctor in assembly /usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll, type System.Runtime.CompilerServices.ExtensionAttribute
Can't find custom attr constructor image: /usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll mtoken: 0x0a0001d8

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Mono.CSharp.Tokenizer ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'System.Core'.
  at Mono.CSharp.Tokenizer..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.CSharpParser..ctor (Mono.CSharp.SeekableStreamReader reader, Mono.CSharp.CompilationSourceFile file, Mono.CSharp.Report report, Mono.CSharp.ParserSession session) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.SeekableStreamReader reader, Mono.CSharp.SourceFile sourceFile, Mono.CSharp.ModuleContainer module, Mono.CSharp.ParserSession session, Mono.CSharp.Report report) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.SourceFile file, Mono.CSharp.ModuleContainer module, Mono.CSharp.ParserSession session, Mono.CSharp.Report report) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Mono.CSharp.Tokenizer ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'System.Core'.
  at Mono.CSharp.Tokenizer..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.CSharpParser..ctor (Mono.CSharp.SeekableStreamReader reader, Mono.CSharp.CompilationSourceFile file, Mono.CSharp.Report report, Mono.CSharp.ParserSession session) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.SeekableStreamReader reader, Mono.CSharp.SourceFile sourceFile, Mono.CSharp.ModuleContainer module, Mono.CSharp.ParserSession session, Mono.CSharp.Report report) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.SourceFile file, Mono.CSharp.ModuleContainer module, Mono.CSharp.ParserSession session, Mono.CSharp.Report report) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Parse (Mono.CSharp.ModuleContainer module) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Andres G. Aragoneses 2013-02-20 15:27:24 UTC
Version of compiler: 3.0.4
Comment 2 Marek Safar 2013-02-20 15:55:15 UTC
This looks like broken setup. You have newer (g)mcs than is your mono.

I'll check if we can fail better though.
Comment 3 Andres G. Aragoneses 2013-02-20 16:01:06 UTC
Oh you're right. I thought I had uninstalled everything, but somehow mono-runtime package was still there... I don't understand.

Anyway, yeah, not crashing would be better :)
Comment 4 Marek Safar 2013-02-20 16:28:23 UTC
Closing as invalid as I could not reproduce it at all