Bug 25753 - Building from Visual Studio fails with no error if targeting the new iOS 64bit and linking a C++ DLL
Summary: Building from Visual Studio fails with no error if targeting the new iOS 64bi...
Status: RESOLVED DUPLICATE of bug 25758
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.9
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-06 15:28 UTC by joshcomley@googlemail.com
Modified: 2015-01-09 12:07 UTC (History)
5 users (show)

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


Attachments
Example solution (289.34 KB, application/x-zip-compressed)
2015-01-06 15:28 UTC, joshcomley@googlemail.com
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 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:
RESOLVED DUPLICATE of bug 25758

Description joshcomley@googlemail.com 2015-01-06 15:28:26 UTC
Created attachment 9258 [details]
Example solution

Attached is an example solution.

The example C++ DLL contains just one method called "sevenplusone" which simply returns the result of "7 + 1".

Arm64 has been targeted when building the C++ DLL.

If I open the solution on a Mac with Xamarin Studio, I can successfully deploy and run on an iPhone 4 and the result of "sevenplusone" is displayed.

Two things happen if I open the solution on a PC:
- (this first thing only happens *after* opening the solution on a Mac first) The settings for linking are wiped clear
- If I put the linking line back in (see below) then the deploy fails entirely when building with no errors

This is the linking ("Additional mtouch arguments") line:
-cxx -gcc_flags "-L${ProjectDir} -lSimpleCpp -force_load ${ProjectDir}/libSimpleCpp.a"

This is preventing us from working for iOS on our developer machines.
Comment 1 Sebastien Pouliot 2015-01-06 15:42:34 UTC
-> XVS as it only happens on Windows (not on the Mac/XS)

Note that the iPhone 4 does not have a 64bits (ARM64) processor. However your static library was built for several architectures (not only ARM64) which explains why it works (at least from a Mac).

$ find . -name *.a
./UnifiedIosTest/UnifiedIosTest.iOS/libSimpleCpp.a
$ lipo -info ./UnifiedIosTest/UnifiedIosTest.iOS/libSimpleCpp.a
Architectures in the fat file: ./UnifiedIosTest/UnifiedIosTest.iOS/libSimpleCpp.a are: i386 x86_64 armv7 arm64
Comment 2 joshcomley@googlemail.com 2015-01-06 15:49:04 UTC
Hi, thanks yes I'd built the example C++ library for multiple architectures :)

But when trying to deploy from VS2015 it just fails - however I am able to deploy the app if I do not link the library, so deployment itself via Xamarin Build Host is functioning.

Is there anywhere I can look for a log that might give me the detail of the actual error? On the Mac build host, perhaps?
Comment 3 Sebastien Pouliot 2015-01-06 15:54:00 UTC
@Josh, I transferred the bug to the XVS team. I do not have a working XI setup on Windows right now. OTOH I can confirm it works fine with XI 8.6 on a Mac with XS 5.7

> But when trying to deploy from VS2015 it just fails

VS2015 is fairly new :) can you provide us with all the versions (Help About IIRC on VS) of the software you're using. Thanks!
Comment 4 joshcomley@googlemail.com 2015-01-06 15:57:49 UTC
Hi Sebastien - sure here are all my VS2015 version infos, Xamarin included. I can try with VS2013, too, but I think I already did that and it failed just the same. I'll confirm now.

-------------------------------

Microsoft Visual Studio Ultimate 2015 Preview
Version 14.0.22310.1 DP
Microsoft .NET Framework
Version 4.5.53344

Installed Version: Ultimate

Architecture and Modeling Tools   00269-30000-00001-AA472
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2015 Preview   00269-30000-00001-AA472
Microsoft LightSwitch for Visual Studio 2015 Preview

Visual Basic 2015 Preview   00269-30000-00001-AA472
Microsoft Visual Basic 2015 Preview

Visual C# 2015 Preview   00269-30000-00001-AA472
Microsoft Visual C# 2015 Preview

Visual C++ 2015 Preview   00269-30000-00001-AA472
Microsoft Visual C++ 2015 Preview

Visual F# 14 CTP   00269-30000-00001-AA472
Microsoft Visual F# 14 CTP

Visual Studio 2015 Preview Code Analysis Spell Checker   00269-30000-00001-AA472
Microsoft® Visual Studio® 2015 Preview Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   00269-30000-00001-AA472
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools Preview   14.0.11104.0
ASP.NET and Web Tools Preview

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

ErrorList   1.0
Information about my package

JetBrains ReSharper Platform 6   Build 6.0.20141204.190160 on 2014-12-04 19:29:31Z
JetBrains ReSharper Platform package for Microsoft Visual Studio. For more information about ReSharper Platform, visit http://www.jetbrains.com/resharper. Copyright © 2015 JetBrains, Inc.

Microsoft Azure HDInsight HQL Service   1.0.0000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   1.0.0000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

Microsoft Code Digger   0.9
Microsoft Code Digger

Microsoft GDB-based Debugger   1.0
Provides support for connecting Visual Studio to GDB

Microsoft.Pex.VisualStudio   1.0
Pex

NuGet Package Manager   3.0.51103.210
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 Preview ENU   14.0.22231
Microsoft Office Developer Tools for Visual Studio 2015 Preview ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

SQL Server Data Tools   14.0.41025.0
Microsoft SQL Server Data Tools

Visual C++ for Cross Platform Mobile Development   1.0
Visual C++ for Cross Platform Mobile Development

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.221.0 (a6d269d)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.0.0 (43e3b715220b50914b45bec675e19008ff50682a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 5 joshcomley@googlemail.com 2015-01-06 16:13:47 UTC
Yep exactly the same thing happens in Visual Studio 2013
Comment 6 joshcomley@googlemail.com 2015-01-08 06:33:52 UTC
I have updated to the latest beta version of Xamarin on my Mac and on my PC.

- If I use the "Diagnose" tool when connecting, I am informed that the iOS SDK is out of date, but once I connect I am not prompted to correct this, nor am I able to locate any kind of "Sync SDK" button any more (http://i.imgur.com/fsi9476.png)
- I am *still* unable to develop from a PC when linking a C++ library

Please could someone confirm this is an issue? The attached solution is all set up and ready for someone to just test.

Could anyone tell me where I might find a log that might include a little more explanation?

And how can I ensure my SDK is synchronised?
Comment 7 joshcomley@googlemail.com 2015-01-08 06:42:13 UTC
If I inspect the "Xamarin Log" in Visual Studio I see one exception:

cquire command execution lock, timeout set to 00:10:00
Framework.MessageImportance,string,object[])
  at Xamarin.MacDev.Tasks.LoggingExtensions.LogTaskProperty (Microsoft.Build.Utilities.TaskLoggingHelper log, System.String propertyName, System.String value) [0x00000] in <filename unknown>:0 
  at Xamarin.iOS.Tasks.MTouchTaskBase.Execute () [0x00000] in <filename unknown>:0 
  at Mtb.Server.InProcTaskRunner.Execute (ILoggingHelper logger, System.String taskName, System.String inputs) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Commands.ExecuteTask.HandleRequest (ILoggingHelper logger, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext context, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Listener.OnRequest (System.Object state) [0x00000] in <filename unknown>:0
Comment 8 joshcomley@googlemail.com 2015-01-08 06:52:57 UTC
In case it helps, here is my complete Xamarin log after cleaning the solution, clearing the log and attempting to run:

[08-Jan-2015 11:51:50] Request handled in 4,282ms
[08-Jan-2015 11:51:52] Request handled in 4,438ms
[08-Jan-2015 11:51:53] Request handled in 3,996ms
[08-Jan-2015 11:51:53] Handling with command: [Info: CommmandUrl=Info] (75)
[08-Jan-2015 11:51:53] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:53] mtouch 8.6.0.50 (561dfed)
[08-Jan-2015 11:51:53] Command [Info: CommmandUrl=Info] finished (75)
[08-Jan-2015 11:51:53] Request handled in 5,156ms
[08-Jan-2015 11:51:53] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:53] Attempting to acquire command execution lock, timeout set to 00:10:00
sk] finished (75)
[08-Jan-2015 11:51:54] Request handled in 10,847ms
[08-Jan-2015 11:51:54] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:54] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:54] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:54] Request handled in 13,898ms
[08-Jan-2015 11:51:54] Handling with command: [CompareFiles: CommmandUrl=CompareFiles] (75)
[08-Jan-2015 11:51:54] Attempting to acquire command execution lock, timeout set to 00:10:00
k] finished (75)
[08-Jan-2015 11:51:54] Request handled in 101,193ms
[08-Jan-2015 11:51:54] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:54] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:54] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:54] Request handled in 254,171ms
[08-Jan-2015 11:51:54] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:54] Attempting to acquire command execution lock, timeout set to 00:10:00
n-2015 11:51:55] Request handled in 28,838ms
and execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:55] Command [CompareFiles: CommmandUrl=CompareFiles] finished (75)
[08-Jan-2015 11:51:55] Request handled in 36,606ms
[08-Jan-2015 11:51:55] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:51:55] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:55] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:51:55] Request handled in 5,737ms
[08-Jan-2015 11:51:55] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:55] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:56] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:56] Request handled in 112,351ms
[08-Jan-2015 11:51:56] Request handled in 3,714ms
[08-Jan-2015 11:51:58] Request handled in 4,343ms
[08-Jan-2015 11:51:59] Request handled in 4,164ms
mandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:59] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:59] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:59] Request handled in 83,128ms
[08-Jan-2015 11:51:59] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:59] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:59] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:59] Request handled in 12,157ms
[08-Jan-2015 11:51:59] Handling with command: [ExecuteTask: CommmandUrl=ExecuteTask] (75)
[08-Jan-2015 11:51:59] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:51:59] Command [ExecuteTask: CommmandUrl=ExecuteTask] finished (75)
[08-Jan-2015 11:51:59] Request handled in 19,213ms
[08-Jan-2015 11:52:00] Handling with command: [CompareFiles: CommmandUrl=CompareFiles] (75)
[08-Jan-2015 11:52:00] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:00] Command [CompareFiles: CommmandUrl=CompareFiles] finished (75)
[08-Jan-2015 11:52:00] Request handled in 13,793ms
[08-Jan-2015 11:52:00] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:00] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:00] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:00] Request handled in 10,034ms
[08-Jan-2015 11:52:00] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:00] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:01] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:01] Request handled in 612,281ms
[08-Jan-2015 11:52:01] Request handled in 3,593ms
[08-Jan-2015 11:52:01] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:01] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:01] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:01] Request handled in 182,005ms
[08-Jan-2015 11:52:01] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:01] Attempting to acquire command execution lock, timeout set to 00:10:00
=CopyFile] finished (75)
[08-Jan-2015 11:52:02] Request handled in 10,777ms
[08-Jan-2015 11:52:02] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:02] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:02] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:02] Request handled in 15,65ms
[08-Jan-2015 11:52:02] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:02] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:04] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:04] Request handled in 1710,814ms
[08-Jan-2015 11:52:04] Request handled in 4,067ms
[08-Jan-2015 11:52:04] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:04] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:04] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:04] Request handled in 395,181ms
[08-Jan-2015 11:52:04] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:04] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:05] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:05] Request handled in 801,345ms
[08-Jan-2015 11:52:05] Request handled in 4,181ms
[08-Jan-2015 11:52:05] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:05] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:06] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:06] Request handled in 784,613ms
[08-Jan-2015 11:52:06] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:06] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:06] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:06] Request handled in 10,421ms
[08-Jan-2015 11:52:06] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:06] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:06] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:06] Request handled in 360,917ms
[08-Jan-2015 11:52:06] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:06] Attempting to acquire command execution lock, timeout set to 00:10:00
yFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:07] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:07] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:07] Request handled in 8,686ms
ttempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:07] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:07] Request handled in 6,216ms
[08-Jan-2015 11:52:07] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:07] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:07] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:07] Request handled in 8,958ms
[08-Jan-2015 11:52:08] Request handled in 4,509ms
[08-Jan-2015 11:52:10] Request handled in 3,932ms
] finished (75)
[08-Jan-2015 11:52:11] Request handled in 12,608ms
[08-Jan-2015 11:52:11] Request handled in 4,098ms
[08-Jan-2015 11:52:11] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:11] Attempting to acquire command execution lock, timeout set to 00:10:00
[08-Jan-2015 11:52:11] Command [CopyFile: CommmandUrl=CopyFile] finished (75)
[08-Jan-2015 11:52:11] Request handled in 12,493ms
[08-Jan-2015 11:52:11] Handling with command: [CopyFile: CommmandUrl=CopyFile] (75)
[08-Jan-2015 11:52:11] Attempting to acquire command execution lock, timeout set to 00:10:00
)
[08-Jan-2015 11:52:11] Attempting to acquire command execution lock, timeout set to 00:10:00
 value) [0x00000] in <filename unknown>:0 
  at Xamarin.iOS.Tasks.MTouchTaskBase.Execute () [0x00000] in <filename unknown>:0 
  at Mtb.Server.InProcTaskRunner.Execute (ILoggingHelper logger, System.String taskName, System.String inputs) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Commands.ExecuteTask.HandleRequest (ILoggingHelper logger, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext context, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Listener.OnRequest (System.Object state) [0x00000] in <filename unknown>:0 
[08-Jan-2015 11:52:12] Request handled in 36,312ms
[08-Jan-2015 11:52:13] Request handled in 3,587ms
[08-Jan-2015 11:52:14] Request handled in 3,857ms
[08-Jan-2015 11:52:16] Request handled in 3,621ms
Comment 9 joshcomley@googlemail.com 2015-01-08 23:47:28 UTC
I am able to load the sample C++ library and run the app if I use the following, hacky version of the mtouch command args:

-cxx -gcc_flags "-stdlib=libstdc++ /users/joshcomley/Development/libSimpleCpp.a"

The "-lSimpleCpp -force_load" are missing and of course, I have to hard code the path to the library on my build server.

Any response would be greatly appreciated, as essentially development for iOS is broken if you link a library, which I am sure is not uncommon.
Comment 10 Jose Gallardo 2015-01-09 12:07:38 UTC
Hi Josh,

This is a duplicate of a bug we're currently fixing. And I can confirm the fix for that bug also makes your sample solution to work, with the original provided additional mtouch arguments.

Thanks for reporting it, you can follow the progress on the other bug report:

https://bugzilla.xamarin.com/show_bug.cgi?id=25758

*** This bug has been marked as a duplicate of bug 25758 ***