xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

`mlaunch` should ship a a fat binary wth both x86_64 and arm64 slices

Open spouliot opened this issue 2 years ago • 4 comments

Steps to Reproduce

  1. file /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.402/tools/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch

Expected Behavior

Two slices: x86_64 and arm64

Actual Behavior

mlaunch is only shipped as an x86_64 binary

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.402/tools/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch: Mach-O universal binary with 1 architecture: [x86_64:Mach-O 64-bit executable x86_64Mach-O 64-bit executable x86_64]
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.402/tools/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch (for architecture x86_64):	Mach-O 64-bit executable x86_64

Environment

Version information
Visual Studio Community 2022 for Mac Preview
Version 17.3 Preview (17.3 build 1038)
Installation UUID: d8020e89-e365-4dd4-b30e-e48381b77267

Runtime
.NET 6.0.5 (64-bit)
Architecture: Arm64

Roslyn (Language Service)
4.3.0-2.22307.14+b91fc5b06135deb5bd72c105a1b96ce278ad6beb

NuGet
Version: 6.0.0.262

.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/7.0.100-preview.5.22307.18/Sdks
SDK Versions:
	7.0.100-preview.5.22307.18
	6.0.301
	6.0.300
	6.0.203
	6.0.202
	6.0.201
	6.0.200
	6.0.101
	6.0.100
MSBuild SDKs: /Applications/Visual Studio (Preview).app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET SDK (x64)
SDK Versions:
	6.0.301
	6.0.300
	6.0.203
	6.0.101
	5.0.408
	5.0.404
	3.1.420
	3.1.419
	3.1.418
	3.1.416
	3.1.415

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	7.0.0-preview.5.22301.12
	6.0.6
	6.0.5
	6.0.4
	6.0.3
	6.0.2
	6.0.1
	6.0.0

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
	6.0.6
	6.0.5
	6.0.1
	5.0.17
	5.0.13
	3.1.26
	3.1.25
	3.1.24
	3.1.22
	3.1.21

Xamarin.Profiler
Version: 1.8.0.19
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Updater
Version: 11

Apple Developer Tools
Xcode 13.3 (20102)
Build 13E113

Xamarin.Mac
Version: 8.11.0.423 (Visual Studio Community)
Hash: 7fa68bc8e
Branch: main
Build date: 2022-06-27 15:08:06-0400

Xamarin.iOS
Version: 15.11.0.423 (Visual Studio Community)
Hash: 7fa68bc8e
Branch: main
Build date: 2022-06-27 15:08:06-0400

Xamarin Designer
Version: 17.3.0.110
Hash: 01d90a6c4
Branch: remotes/origin/d17-3
Build date: 2022-06-17 20:44:52 UTC

Xamarin.Android
Version: 12.3.0.3 (Visual Studio Community)
Commit: xamarin-android/d17-2/bbba5a2
Android SDK: /Users/poupou/Library/Android/sdk
	Supported Android versions:
		12.1 (API level 32)
		12.0 (API level 31)

SDK Command-line Tools Version: 5.0
SDK Platform Tools Version: 31.0.3
SDK Build Tools Version: 32.0.0

Build Information: 
Mono: adf1bc4
Java.Interop: xamarin/java.interop/d17-2@9760f0a9
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.38.2@7b1e016
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.12
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.2.0.47
Hash: d6dd135
Branch: remotes/origin/dev/tondat/main-menues~3
Build date: 2022-06-17 20:44:58 UTC

Android Device Manager
Version: 0.0.0.1127
Hash: 4bb4d48
Branch: remotes/origin/dev/tondat/main-1536295~1
Build date: 2022-06-17 20:44:58 UTC

Build Information
Release ID: 1703001038
Git revision: ab015cef741e20e3cc212648659ecbd4ed089d5a
Build date: 2022-06-17 20:41:33+00
Build branch: release-17.3
Build lane: release-17.3

Operating System
Mac OS X 12.4.0
Darwin 21.5.0 Darwin Kernel Version 21.5.0
    Tue Apr 26 21:08:29 PDT 2022
    root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64

Build Logs

Example Project (If Possible)

spouliot avatar Jul 13 '22 21:07 spouliot

This would mean making mlaunch a .NET app, since we don't support arm64 for macOS on legacy Xamarin.

rolfbjarne avatar Jul 14 '22 07:07 rolfbjarne

This would mean making mlaunch a .NET app

not a bad thing since you'll eventually need to make it happen :)

since we don't support arm64 for macOS on legacy Xamarin.

It was never well advertised but --abi=arm64 works on legacy Xamarin.Mac (@dalexsoto back ported the contributed mono fixes a while ago). FWIW I'm using it to compare performance between legacy and net6 on my M1 Mac computer :)

spouliot avatar Jul 14 '22 13:07 spouliot

It was never well advertised but --abi=arm64 works on legacy Xamarin.Mac (@dalexsoto back ported the contributed mono fixes a while ago). FWIW I'm using it to compare performance between legacy and net6 on my M1 Mac computer :)

Yes, but IIRC mmp doesn't support universal apps.

rolfbjarne avatar Jul 14 '22 14:07 rolfbjarne

Yes, but IIRC mmp doesn't support universal apps.

That I have not tried... but I don't recall it was possible for x86 / x86_64 :(

spouliot avatar Jul 14 '22 14:07 spouliot

I think that the combination of this and https://github.com/dotnet/runtime/issues/82495 would have us rosetta-free in the dotnet ios world.

rdavisau avatar May 17 '23 10:05 rdavisau