Bug 6612 - mtouch miscompiles application if mscorlib is referenced on its command line
Summary: mtouch miscompiles application if mscorlib is referenced on its command line
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.99.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2012-08-20 10:51 UTC by Marek Habersack
Modified: 2012-08-21 13:28 UTC (History)
2 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 on Developer Community or GitHub 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 FIXED

Description Marek Habersack 2012-08-20 10:51:09 UTC
If one passes mscorlib as reference when calling mtouch, the compilation fails because of runtime symbols being referenced that do not exist in the MonoTouch runtime:

Undefined symbols for architecture armv7:
  "_mono_reflection_create_unmanaged_type", referenced from:
      wrapper_managed_to_native_System_Reflection_Emit_DerivedType_create_unmanaged_type_System_Type in mscorlib.dll.7.o

it looks as if mtouch loaded mscorlib from the standard Mono profile instead of from the location referenced on its command line.
Comment 1 Sebastien Pouliot 2012-08-20 11:02:22 UTC
MonoDevelop projects do not reference mscorlib.dll so the mtouch find out it's a required dependency and adjust it to mscorlib-runtime.dll (the SRE-less version for devices). That logic is (likely) not executed when mscorlib.dll is provided as a reference on the command-line. Good catch :-)
Comment 2 Sebastien Pouliot 2012-08-21 13:20:26 UTC
Fixed in master 03f20784a5ab6806404db1de91edb586304f3b7a