You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter cannot build against ARM simulators (on ARM macOS host) #64502
[plugin_lint_mac] [STDOUT] stdout: ld: building for iOS Simulator, but linking in dylib built for iOS, file '/var/folders/3y/l0z1x3693dl_8n0qybp4dqwh0000gn/T/CocoaPods-Lint-20200812-67637-y2vglb-test_plugin_objc/Pods/Flutter/Flutter.framework/Flutter' for architecture arm64
[plugin_lint_mac] [STDOUT] stdout: clang: error: linker command failed with exit code 1 (use -v to see invocation
Flutter.framework has 2 arm iOS slices and 1 x86 simulator slice. There is no ARM simulator slice.
Also seen on an x86 host with iOS 14 simulators (so Xcode 12) when ONLY_ACTIVE_ARCH=NO (configuration=Release)
Not sure if there's any dart work to do, since it already supports ARM simulators? This may just require building the Flutter.framework with a new architecture slice.
@jmagman In the context of some of the plumbing / tooling tasks that need to be done here, I would be happy to help, but I'm currently stuck on this issue: dart-lang/sdk#43488
If you've got a line to the Dart team (or an idea for circumventing this blocker some other way) I would appreciate the help.
There's a workaround for this issue:
Add config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' to the Podfile's post_install.
E.g:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
# Workaround for https://github.com/flutter/flutter/issues/64502
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
That will let you build, but when you archive it won't build a fat binary with all the architectures your app supports. And it's only relevant if you're using plugins.
However to work around it until that's done, you can explicitly exclude arm64 from your simulator archs. I tried to do this programmatically for all projects in #73458 but unfortunately versions of Xcode older than 12 do not handle the dance between EXCLUDED_ARCHS and VALID_ARCHS correctly.
This has been fixed with #73828. On that PR you don't need to set EXCLUDED_ARCHS in your Podfile.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jmagman commentedon Aug 24, 2020
Not sure if there's any dart work to do, since it already supports ARM simulators? This may just require building the Flutter.framework with a new architecture slice.
jmagman commentedon Aug 24, 2020
See #2089, hopefully this is much less work than that was.
jmagman commentedon Aug 24, 2020
Lots of spots where
simulatoris synonymous with x86 https://github.com/flutter/engine/blob/ff62dec5c96d3560b36ca0a3924d28a3c97b7788/sky/tools/create_ios_framework.py#L32jmagman commentedon Aug 25, 2020
Had to turn off linters when I upgrade Cirrus to Xcode 12 #63252
Plugins CI is going to hit the same failure when they try to upgrade.
alexmarkley commentedon Sep 19, 2020
I'm encountering this problem as well. (Actually opened a duplicate issue, oops.)
Any update on this? I'm happy to help if I can.
alexmarkley commentedon Sep 21, 2020
@jmagman In the context of some of the plumbing / tooling tasks that need to be done here, I would be happy to help, but I'm currently stuck on this issue: dart-lang/sdk#43488
If you've got a line to the Dart team (or an idea for circumventing this blocker some other way) I would appreciate the help.
Poweranimal commentedon Sep 26, 2020
There's a workaround for this issue:
Add
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'to the Podfile's post_install.E.g:
I found the solution in another related issue here: flurry/flurry-ios-sdk#207 (comment)
jmagman commentedon Sep 28, 2020
That will let you build, but when you archive it won't build a fat binary with all the architectures your app supports. And it's only relevant if you're using plugins.
jmagman commentedon Sep 29, 2020
Fixing this will also let us turn back on plugin linters, and will let the plugins repo update Cirrus to Xcode 12.
#63252 (comment)
flutter/dev/devicelab/bin/tasks/plugin_lint_mac.dart
Lines 52 to 53 in d693d2b
jmagman commentedon Sep 29, 2020
Also, dependent on the builders using iOS 14 #65901.
hyvenzhu commentedon Oct 13, 2020
18 remaining items
bhanuka96 commentedon Jan 15, 2021
gourav6m17 commentedon Jan 20, 2021
jmagman commentedon Jan 20, 2021
jmagman commentedon Mar 5, 2021
This has been fixed with #73828. On that PR you don't need to set
EXCLUDED_ARCHSin your Podfile.jigarfumakiya commentedon Apr 4, 2021
jmagman commentedon Apr 5, 2021
firatcetiner commentedon Jun 28, 2021
jans-y commentedon Jun 28, 2021
firatcetiner commentedon Jun 28, 2021
jans-y commentedon Jun 28, 2021
jmagman commentedon Jun 28, 2021
github-actions commentedon Jul 30, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.