Bug 7327 - error MT5202: Native linking failed. Please review the build log.
Summary: error MT5202: Native linking failed. Please review the build log.
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-09-20 07:07 UTC by Lx Nickel
Modified: 2012-09-20 09:22 UTC (History)
3 users (show)

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

The Requestet BuildOutput (27.97 KB, text/plain)
2012-09-20 07:56 UTC, Lx Nickel

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:

Description Lx Nickel 2012-09-20 07:07:59 UTC
Hello i have tried to compile a Project, and i wont do that. i get the error in the summary.

first my MonoDevelop Version Info:

Installation UUID: f2a24175-af04-4065-8166-097435d55136
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.5 (1839)
	 Build 4D502
Monotouch: 6.0.0
Mono for Android: Not Installed

Build information:
	Release ID: 30004007
	Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
	Build date: 2012-09-17 14:09:17+0000
	Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Operating System:
	Mac OS X 10.7.4
	Darwin kw-w7-sc01.kw-software.de 11.4.0 Darwin Kernel Version 11.4.0
	    Mon Apr  9 19:32:15 PDT 2012
	    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

And now the last few lines of the build output.

Process exited with code 1, command:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc  -Wl,-no_pie  -miphoneos-version-min=5.0 -gdwarf-2  -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk  /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Ade.Components.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/SourceExtension.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Ade.ComponentsImpl.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Ade.Ios.Util.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/System.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/System.Xml.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Ade.OnlineImpl.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Ade.Online.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/System.Core.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/monotouch.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/mscorlib.dll.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/iOSAFTest.exe.7.o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/Mono.Security.dll.7.o /Users/lx.nickel/hsowl-svn/kw-mono/02-Sources/Projektstand_010512/Remoting_clearProjekts/iOSAFTest/obj/Debug/mtouch-cache/main.7.cache.DqursAAta90vN8x803k3e3w3MLA=.o /Users/lx.nickel/hsowl-svn/kw-mono/02-Sources/Projektstand_010512/Remoting_clearProjekts/iOSAFTest/obj/Debug/mtouch-cache/registrar.7.cache.rgslEpuMoByTr1BM49siodynWZM=.o -o /var/folders/my/2l35w1wn41j41sh5950zqjdc0000gp/T/tmp7c2a775d.tmp/iOSAFTest -framework CFNetwork -framework AssetsLibrary -framework Accounts -framework CoreBluetooth -framework CoreTelephony -framework EventKit -framework EventKitUI -framework Foundation -framework CoreMotion -framework GameKit -framework GLKit -framework iAd -framework MapKit -framework MediaPlayer -framework MessageUI -framework NewsstandKit -framework OpenGLES -framework StoreKit -framework Twitter -framework UIKit -framework AddressBookUI -framework SystemConfiguration -framework AddressBook -framework AudioToolbox -framework AVFoundation -framework QuartzCore -framework CoreGraphics -framework CoreImage -framework CoreLocation -framework CoreText -framework ImageIO -framework MobileCoreServices -framework Security -framework CoreData -framework CoreMedia -framework CoreMIDI -framework CoreVideo -framework ExternalAccessory -framework QuickLook -weak_framework MediaToolbox -weak_framework Social -weak_framework PassKit -weak_framework AdSupport -lz -u _mono_pmip -u _CreateZStream -u _CloseZStream -u _Flush -u _ReadZStream -u _WriteZStream -liconv -lmono-2.0 -lmonotouch -L/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/lib -dead_strip
Undefined symbols for architecture armv7:
  "_get_bundled_machine_config", referenced from:
      wrapper_managed_to_native_System_Configuration_DefaultConfig_get_bundled_machine_config in SourceExtension.dll.7.o
      wrapper_managed_to_native_System_Configuration_InternalConfigurationHost_get_bundled_machine_config in SourceExtension.dll.7.o
  "_get_bundled_app_config", referenced from:
      wrapper_managed_to_native_System_Configuration_InternalConfigurationHost_get_bundled_app_config in SourceExtension.dll.7.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status

error MT5202: Native linking failed. Please review the build log.

this only appears when i references some of my own Libarys, but not all of them. The libarys compile on their own whithou any problems, but Applications who uses them won't.

Any ideas what the problem could be?

I have this problem since yesterday before the MT6.0.0 came out but after the MT5.xxx update that came before
one week ago everything worked fine

now i have updated everything to iOS6 (SDK, xCode)

Thank You
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-09-20 07:51:59 UTC
Could you attach the complete build output?
Comment 2 Lx Nickel 2012-09-20 07:56:32 UTC
Created attachment 2579 [details]
The Requestet BuildOutput
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-09-20 08:10:37 UTC
It looks like you have code in your project from System.Configuration which MonoTouch doesn't include because it doesn't work with MonoTouch (in the SourceExtension.dll assembly) - where does this assembly come from? Is it a third-party library or did you create it yourself?

That said, it *might* help to switch linker behavior to linking all assemblies in the project's iPhone Build options.
Comment 4 Lx Nickel 2012-09-20 08:16:03 UTC
i have tried to change the linker behavior...noting happened

the SourceExtension assembly is my own lib that includes sone of the mono sourcecode i nedded...before the update to 5.99.xx it worked fine, has something changed in that version or in MT6?
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-09-20 08:19:20 UTC
It depends on your previous version of MT, but we did add support for faster p/invokes by resolving them statically at link time instead of dynamically at runtime some time ago.

However if you have control over that library, I recommend you search for get_bundled_app_config and remove/comment out all related code. Technically you're trying to p/invoke a method that isn't included in MonoTouch.
Comment 6 Lx Nickel 2012-09-20 09:14:31 UTC
Okay i comment the internal call and returned instead 

System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + ".exe.config"

which is pretty much the same i think...now i can compile, but when the app started it crashed (ohh wow how unexpected =P )

but thanks you were a great help :)

it crashed probally because i use reflection much i will see what there the problem is :)

but 2 days of "not to know why the hardware wont work" are now over :)
Comment 7 Rolf Bjarne Kvinge [MSFT] 2012-09-20 09:20:52 UTC
Great to hear it's compiling, I'll close this bug report then.
Comment 8 Lx Nickel 2012-09-20 09:22:02 UTC
yes thanks :)