Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 2911 [details]
Example project isolating the issue
Example project attached.
We use a Barcode scanning binary library which does not have an i386 slice. This has been a component of our project going back a year. Whenever we build for Simulator, the library is silently left unlinked and the barcode scanning features do not work. This is the desired and expected behaviour and is confirmed in 6.0.2 (though suspected ok up to 6.0.5).
However now in MonoTouch 6.0.6 the linker incorrectly expects to find the Barcode scanning library in the build folder and fails the build because of it.
Lines extracted from the build log:
warning MT1301: Native library `libVSBarcodeReader_v5_5_nothumb_iOS4.a` (armv6, armv7) was ignored since it does not match the current build architecture (i386)
(Correct. Then later...)
ld: file not found: /var/folders/p9/ttsk458j2lbdngcngb046zcc0000gn/T/tmp5928ea13.tmp/libVSBarcodeReader_v5_5_nothumb_iOS4.a
collect2: ld returned 1 exit status
error MT5202: Native linking failed. Please review the build log.
ld Should not have been requested to link this file?
Isolating this in an example project could not have been simpler. On a secondary machine with MT 6.0.2 I created a new project, included the Barcode library, and made a single reference to it in DidFinishLaunching. This build for i386 as expected and I was given the warning that the library would not be linked.
Opened the same project in 6.0.6 and the error above occurred.
It worked on 6.0.2 - but it looks like it did only because it did not try to rebuild the simlauncher (i.e. the `ld`command itself would be invalid, but it's not issued).
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -v --cache "/Users/sebastienpouliot/Downloads/CompileTest/CompileTest/obj/Debug/mtouch-cache" --nomanifest --nosign -sim "/Users/sebastienpouliot/Downloads/CompileTest/CompileTest/bin/iPhoneSimulator/Debug/CompileTest.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/sebastienpouliot/Downloads/CompileTest/CompileTest/BarcodeReader-Release.dll" -debug -nolink -sdk "6.0" -targetver "3.1" --armv7 "-v" "-v" "-v" "/Users/sebastienpouliot/Downloads/CompileTest/CompileTest/bin/iPhoneSimulator/Debug/CompileTest.exe"
MonoTouch version 220.127.116.118750907 using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
warning MT1301: Native library `libVSBarcodeReader_v5_5_nothumb_iOS4.a` (ARMv6, ARMv7) was ignored since it does not match the current build architecture (i386)
This "rebuild simlauncher" started with the refactoring for armv7s support (after 6.0.4, before 6.0.5)
The linker flags were still added even if the library itself was removed (skipping the fastpah/simlauncher).