Bug 6113 - Upgrading to MonoDevelop causes project to no longer build
Summary: Upgrading to MonoDevelop causes project to no longer build
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-07-13 10:04 UTC by ric3kg
Modified: 2012-07-27 10:16 UTC (History)
4 users (show)

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

Build Output (100.25 KB, text/plain)
2012-07-13 10:04 UTC, ric3kg
MD 2 target settings (105.75 KB, image/jpeg)
2012-07-26 10:26 UTC, ric3kg
MD 3 target settings (112.29 KB, image/jpeg)
2012-07-26 10:26 UTC, ric3kg

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 ric3kg 2012-07-13 10:04:38 UTC
Created attachment 2193 [details]
Build Output

Project will not build - see attachment for build output. Nothing else in the project changed.

Monotouch 5.2.12
Mono 2.10.9

Please help ASAP.

Comment 1 ric3kg 2012-07-13 10:06:16 UTC
build arguments: -gcc_flags "-L${ProjectDir} -lflite -all_load"
Comment 2 Mikayla Hutchinson [MSFT] 2012-07-13 17:27:04 UTC
I can't see MD doing anything wrong in there, bouncing over to mtouch.
Comment 3 Sebastien Pouliot 2012-07-15 13:29:54 UTC
This does not look related to an update. Is it possible that you switched to ARMv7 recently ?

If so then your flite library may not contain the armv7 binaries (e.g. it could only have i386 and armv7), which would fail at this (strip) time.

An easy way to test this would be to try to build for ARMv6 and see if it works. If it works then try doing a

   file /path/to/your/libflite.a

from a terminal window and see which architecture are reported (copy/paste results here).
Comment 4 ric3kg 2012-07-16 09:59:14 UTC
libflite.a: current ar archive random library
Comment 5 Sebastien Pouliot 2012-07-16 10:05:22 UTC
This means there's only a single architecture in your file, i.e. it's not a FAT library.

If it works with ARMv6 then it will fail with ARMv7 (and also won't work on the simulator). So if you switched from ARMv6 (working) to ARMv7 then the error is normal (the symbol can't be found as reported).
Comment 6 ric3kg 2012-07-16 10:19:46 UTC
I did not purposefully change architecture, I only updated to the current MD. Does that default to something that I can change in settings?

Comment 7 ric3kg 2012-07-16 10:25:29 UTC
I did not purposefully change architecture, I only updated to the current MD. Does that default to something that I can change in settings?

Comment 8 Sebastien Pouliot 2012-07-16 10:26:53 UTC
No, this setting is part of the .csproj file of your main application and updating MD won't change this.

However native stripping is done only when doing release builds. Is it possible you only used Debug builds before the update ?
Comment 9 ric3kg 2012-07-16 10:27:32 UTC
Comment 10 ric3kg 2012-07-25 14:56:06 UTC
Any news???
Comment 11 Sebastien Pouliot 2012-07-25 15:20:39 UTC
No one else reported any similar issue with the MD update. Maybe you can find what file(s) changed if you're using a source code management system ? look for changes in the .csproj files.

Otherwise try changing your build architecture to ARMv6 in your project options, iPhone Build, Advanced, and select ARMv6 for selected architecture. 

If this does not work then please attach your flite.a binary so we can confirm which architecture is contained within.
Comment 12 ric3kg 2012-07-26 10:26:13 UTC
Created attachment 2260 [details]
MD 2 target settings
Comment 13 ric3kg 2012-07-26 10:26:37 UTC
Created attachment 2261 [details]
MD 3 target settings
Comment 14 ric3kg 2012-07-26 10:29:47 UTC
In MD 2 I set the target to arm6, built project without error. Closed and quit. Upgraded to MD 3, the target is reset to arm7 and the option is disabled. (See screenshots of both versions.)

In MD 2, the original target was arm7 - that worked without any errors. 

How do I change the target in MD 3?

The flite.a binary is 19.5 MB, do you still want me to upload it?

Comment 15 Sebastien Pouliot 2012-07-26 11:06:46 UTC
That options should not be disabled for device builds. AFAIK it's not even disabled in the simulator builds where the option has no effect. 

However that means MD is providing mtouch with --armv7 (and that won't work when linking with armv6 libraries).

-> back to MonoDevelop

note: for the static library just do the following command on a terminal window

lipo -info libflite.a

That won't say if it's a valid library but it will confirm the architecture (which I'm pretty sure is armv6).
Comment 16 ric3kg 2012-07-26 11:08:28 UTC

input file libflite.a is not a fat file
Non-fat file: libflite.a is architecture: armv6
Comment 17 Sebastien Pouliot 2012-07-26 11:16:21 UTC
ok, that part makes sense with the original build log.

Now MD needs some convincing to allow you to select the same architecture.
Comment 18 Jeffrey Stedfast 2012-07-26 11:42:35 UTC
What is your MinimumOSVersion set to? Is this an iPad-only app?

From my understanding, if either one of those is true, Apple *requires* that the app be built armv7-only which is why MonoDevelop enforces this rule.
Comment 19 ric3kg 2012-07-26 12:16:26 UTC
It is an iPad-only  app. So, I need to rebuild the flite library as arm7, no?
Comment 20 ric3kg 2012-07-26 12:27:06 UTC
But why were the settings in MD 2 not creating this problem? As I said earlier the MD 2 target was arm7...
Comment 21 Jeffrey Stedfast 2012-07-26 13:13:02 UTC
correct, flite needs to be armv7

MonoDevelop 2.8 didn't enforce those rules because we weren't aware of them at the time.
Comment 22 ric3kg 2012-07-27 10:16:58 UTC
Recompiling the flite library seems to have fixed the problem!

Thanks for all your help!