Bug 20496 - xF.Android is failing to build on master
Summary: xF.Android is failing to build on master
Status: VERIFIED FIXED
Alias: None
Product: Tools
Classification: Mono
Component: xbuild ()
Version: unspecified
Hardware: Macintosh Mac OS
: High blocker
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2014-06-09 19:45 UTC by Peter Collins
Modified: 2014-06-26 20:58 UTC (History)
4 users (show)

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


Attachments
diagnostic build output (1.25 MB, application/zip)
2014-06-09 19:46 UTC, Peter Collins
Details
xF.Logic.Android build output (1.12 MB, application/zip)
2014-06-10 15:24 UTC, Peter Collins
Details


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 GitHub or Developer Community 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:
VERIFIED FIXED

Description Peter Collins 2014-06-09 19:45:47 UTC
The solution found within bug #19282 is not currently packaging successfully on master, I'll attach the entire diagnostic output as it is very large, but here are the Errors:

/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/AndroidApp/AndroidApp.csproj (SignAndroidPackage) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/xF.Android.Memory/xF.Memory.Android.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/xF.Logic.Android/xF.Logic.Android.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/xF.Audiology.Android/xF.Audiology.Android.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/Audiology/MonoDroidHIA2/Engineering.FirmwareCommunications.Tatra3/Engineering.FirmwareCommunications.Tatra3.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->

	../../SDK/Source/Projects/Engineering.FirmwareCommunications.Tatra3/Tatra3FirmwareProtocol.cs(311,13): error CS0269: Use of unassigned out parameter `results'
	../../SDK/Source/Projects/Engineering.FirmwareCommunications.Tatra3/Tatra3FirmwareProtocol.cs(298,118): error CS0177: The out parameter `results' must be assigned to before control leaves the current method

/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/AndroidApp/AndroidApp.csproj (SignAndroidPackage) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/xF.Android.Memory/xF.Memory.Android.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.Common.targets (ResolveProjectReferences target) ->
/Users/xamarinqa/Library/Caches/XATempDir/xF.Android/xF.Location.Android/xF.Location.Android.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/3.6.0/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->

	GeoLocationCoordinator.cs(16,7): error CS0234: The type or namespace name `Logic' does not exist in the namespace `xF'. Are you missing an assembly reference?
	LocationStrategies/MemoryFencingStrategy.cs(11,7): error CS0234: The type or namespace name `Logic' does not exist in the namespace `xF'. Are you missing an assembly reference?
	GeoLocationCoordinator.cs(77,11): error CS0246: The type or namespace name `IBringTheGeoAidsToTheParty' could not be found. Are you missing an assembly reference?
	GeoLocationCoordinator.cs(87,51): error CS0246: The type or namespace name `IBringTheGeoAidsToTheParty' could not be found. Are you missing an assembly reference?
	LocationStrategies/MemoryFencingStrategy.cs(17,3): error CS0246: The type or namespace name `IBringTheGeoAidsToTheParty' could not be found. Are you missing an assembly reference?
	LocationStrategies/MemoryFencingStrategy.cs(19,32): error CS0246: The type or namespace name `IBringTheGeoAidsToTheParty' could not be found. Are you missing an assembly reference?


Environment:
OSX Mavericks
XA master / 4a425405ba
Comment 1 Peter Collins 2014-06-09 19:46:58 UTC
Created attachment 7023 [details]
diagnostic build output
Comment 2 Jonathan Pryor 2014-06-10 02:14:29 UTC
Those are errors I've never seen before. :-(

> GeoLocationCoordinator.cs(77,11): error CS0246: The type or namespace name `IBringTheGeoAidsToTheParty' could not be found. Are you missing an assembly reference?

@Peter: Can you please re-try that using Mono 3.4.0 as the system mono? I wonder/fear an xbuild bug.

What's particularly odd/troubling is that IBringTheGeoAidsToTheParty.cs/etc. is clearly present:

>                                 Compile
>                                         Resources/Resource.designer.cs
>                                         ../xF.Logic/HearingAid.cs
>                                         ../xF.Logic/Aid Dispensers/FittingBackedHearingAidDispenser.cs
>                                         ../xF.Logic/Aid Dispensers/HearingAidDispenser.cs
>                                         ../xF.Logic/Aid Dispensers/IBringTheGeoAidsToTheParty.cs
>                                         ../xF.Logic/Aid Dispensers/IFittingDispenser.cs


But there is no smcs command line that actually includes IBringTheGeoAidsToTheParty.cs. I only see IBringTheGeoAidsToTheParty.cs in Compile "blocks", but not the actual smcs compile command lines (suggesting an xbuild bug).
Comment 3 Peter Collins 2014-06-10 12:31:43 UTC
This solution is indeed not failing to package with desktop Mono v3.4.0 no/c3fc3ba installed.
Comment 4 Peter Collins 2014-06-10 15:24:43 UTC
Created attachment 7033 [details]
xF.Logic.Android build output
Comment 5 Peter Collins 2014-06-10 15:33:26 UTC
I've separated the two build errors occurring in xF.Logic.Android.csproj into bug #20515
Comment 6 Jonathan Pryor 2014-06-10 16:21:52 UTC
@Atsushi: This bug is an xbuild regression:

OS X: Xamarin.Android 4.12.4 (stable) + Mono 3.4: builds.

OS X: Xamarin.Android 4.12.4 (stable) + Mono 3.6 (alpha): fails.

See also Comment #2.

Any chance you could investigate this?
Comment 7 Atsushi Eno 2014-06-10 22:39:11 UTC
Isn't it xbuild issue i.e. not XA msbuild task issue?

I haven't touched xbuild itself, know almost nothing about its build engine.
Comment 8 Marek Safar 2014-06-11 04:21:01 UTC
I cannot see any xbuild issue locally but after fixing #20515 it's failing for me with

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 3. Output: 
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
	at java.util.ArrayList.<init>(ArrayList.java:112)
	at java.util.ArrayList.<init>(ArrayList.java:119)
	at com.android.dx.ssa.SsaBasicBlock.<init>(SsaBasicBlock.java:131)
	at com.android.dx.ssa.SsaBasicBlock.newFromRop(SsaBasicBlock.java:147)
	at com.android.dx.ssa.SsaMethod.convertRopToSsaBlocks(SsaMethod.java:173)
	at com.android.dx.ssa.SsaMethod.newFromRopMethod(SsaMethod.java:103)
	at com.android.dx.ssa.SsaConverter.convertToSsaMethod(SsaConverter.java:44)
	at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:98)
	at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:72)
	at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:303)
	at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:139)
	at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:94)
	at com.android.dx.command.dexer.Main.processClass(Main.java:682)
	at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
	at com.android.dx.command.dexer.Main.access$600(Main.java:78)
	at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
	at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
	at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
	at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
	at com.android.dx.command.dexer.Main.processOne(Main.java:596)
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
	at com.android.dx.command.dexer.Main.run(Main.java:230)
	at com.android.dx.command.dexer.Main.main(Main.java:199)
	at com.android.dx.command.Main.main(Main.java:103)
 (AndroidApp)
Comment 9 Peter Collins 2014-06-11 12:07:34 UTC
Marek I assume you're on mavericks, you'll need to increase the available heap to build this one, which can be done with the following xbuild property:
> /p:JavaMaximumHeapSize=1G
Comment 10 Marek Safar 2014-06-11 15:27:40 UTC
Yes, I am on Maverics. How do I pass that property from XS?
Comment 11 Jonathan Pryor 2014-06-11 16:34:33 UTC
@Mareks: Within Xamarin Studio, view the Project Options > Build / Android Build > Advanced tab > Java heap size: 1G
Comment 12 Marek Safar 2014-06-16 05:56:33 UTC
With 1G setting, Android project builds for me now
Comment 13 Atsushi Eno 2014-06-24 13:50:03 UTC
According to the last comment it builds.
Comment 14 Peter Collins 2014-06-26 20:58:21 UTC
This solution is again building successfully on OSX on 4.14 / b5c14449d5e8. There is a build failure on windows that is not a regression, I've filed this as bug #20933