Repository: flutter
Issue: Building for release/profile fails on arm64 raspberry pi 4
Labels: tool,platform-linux,a: desktop,a: build,P2,platform-host-arm,team-linux,triaged-linux

I am currently trying to build a flutter application on an ARM64 device (raspberry pi 4) using command `flutter build linux` but I am getting an error when building the release version. 

What is strange is that I can build --debug version on raspberry without any errors. 

On a macos device with an M1 I can easily build an application using docker using command flutter build linux. However using exactly the same docker image on a raspberry no longer works i get error during build.

On raspberry I also try native approach without docker, I added all libraries and tried to build the application natively but I get the same error.


## Steps to Reproduce

1. Install flutter sdk on raspberry pi 
2. Try command `flutter build linux -v` on any default project

## Logs

```
Build process failed
[ +38 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _runBuild (package:flutter_tools/src/linux/build_linux.dart:185:5)
<asynchronous suspension>
#2 buildLinux (package:flutter_tools/src/linux/build_linux.dart:77:5)
<asynchronous suspension>
#3 BuildLinuxCommand.runCommand
(package:flutter_tools/src/commands/build_linux.dart:88:5)
<asynchronous suspension>
#4 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1140:27)
<asynchronous suspension>
#5 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#10 run.<anonymous closure>.<anonymous closure>
(package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#11 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#12 main (package:flutter_tools/executable.dart:94:3)
<asynchronous suspension>

[ +186 ms] ensureAnalyticsSent: 162ms
[ +4 ms] Running shutdown hooks
[ +3 ms] Shutdown hooks complete
[ +3 ms] exiting with code 1
```

also flutter doctor info:

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on Debian GNU/Linux 10 (buster) 5.10.63-v8+,
    locale C.UTF-8)
[✗] Chrome - develop for the web (Cannot find Chrome executable at
    google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✗] Flutter IDE Support (No supported IDEs installed)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.
```

Flutter doctor and flutter build linux command give exactly the same response on the native machine (raspberry pi 4) and the docker container on raspberry pi 4

</details>