Bug 41291 - An executable named "Xamarin_iOS.exe" causes native build failure
Summary: An executable named "Xamarin_iOS.exe" causes native build failure
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools (show other bugs)
Version: master
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-24 15:46 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2016-05-24 17:32 UTC (History)
2 users (show)

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


Attachments

Description Rolf Bjarne Kvinge [MSFT] 2016-05-24 15:46:44 UTC
An executable named "Xamarin_iOS.exe" causes this:

	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_mono_aot_module_Xamarin_iOS_info'.
	MTOUCH: error MT5213: Duplicate symbol in: [...]/iOS/obj/iPhone/Release/mtouch-cache/Xamarin_iOS.exe.arm64.o (Location related to previous error)
	MTOUCH: error MT5213: Duplicate symbol in: [...]/iOS/obj/iPhone/Release/mtouch-cache/Xamarin.iOS.dll.arm64.o (Location related to previous error)

We already have a check for assemblies named as the executable, but it looks like the underscore is circumventing that check.

Maybe we should keep a list of the mono_aot_module_* symbol names generated, and detect duplicates there (and show the corresponding error).
Comment 1 Sebastien Pouliot 2016-05-24 17:21:31 UTC
> and detect duplicates there 

Not sure what you mean by "there". 

AOT time ? It's too late to fail a build for something we can detect a lot earlier. Even more since such app could have been working for quite a while in the JIT/simulator.

We should apply the same transforms (there's likely many other characters too) as the AOT compiler before doing the duplicate comparison.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-05-24 17:32:23 UTC
Yeah, you're right, it's best to detect this as soon as possible, and not at AOT time.

Note You need to log in before you can comment on or make changes to this bug.