Kaiteki-Fedi / Kaiteki

The comfy SNS client for everything, everywhere
https://kaiteki.app
GNU Affero General Public License v3.0
489 stars 31 forks source link

Feature request: Provide builds for Linux on ARM 64-bit (aarch64) #288

Open 1peter10 opened 1 year ago

1peter10 commented 1 year ago

The feature

Please provide builds for Linux aarch64.

I have been trying to build the app in order to use it on my PinePhone Pro, but I keep running into the following error:

$ flutter build linux
Running "flutter pub get" in kaiteki...                            15,1s

💪 Building with sound null safety 💪

ERROR: ../../../../.pub-cache/git/kaiteki_material-f545d944a232baa780ac875fbb1b13e610594631/lib/src/material/badged_box.dart:11:9: Error: Type 'Badge' not found.
ERROR:   final Badge badge;
ERROR:         ^^^^^
ERROR: lib/theming/default/m3_color_schemes.dart:33:3: Error: No named parameter with the name 'outlineVariant'.
ERROR:   outlineVariant: Color(0xFFD7C1C3),
ERROR:   ^^^^^^^^^^^^^^
ERROR: /opt/flutter/packages/flutter/lib/src/material/color_scheme.dart:78:9: Context: Found this candidate, but the arguments don't match.
ERROR:   const ColorScheme({
ERROR:         ^^^^^^^^^^^
ERROR: lib/theming/default/m3_color_schemes.dart:67:3: Error: No named parameter with the name 'outlineVariant'.
ERROR:   outlineVariant: Color(0xFF524344),
ERROR:   ^^^^^^^^^^^^^^
ERROR: /opt/flutter/packages/flutter/lib/src/material/color_scheme.dart:78:9: Context: Found this candidate, but the arguments don't match.
ERROR:   const ColorScheme({
ERROR:         ^^^^^^^^^^^
ERROR: lib/theming/default/extensions.dart:26:9: Error: No named parameter with the name 'dividerColor'.
ERROR:         dividerColor: Colors.transparent,
ERROR:         ^^^^^^^^^^^^
ERROR: /opt/flutter/packages/flutter/lib/src/material/tab_bar_theme.dart:30:9: Context: Found this candidate, but the arguments don't match.
ERROR:   const TabBarTheme({
ERROR:         ^^^^^^^^^^^
ERROR: lib/ui/feedback_screen.dart:70:24: Error: The getter 'FilledButton' isn't defined for the class '_FeedbackScreenState'.
ERROR:  - '_FeedbackScreenState' is from 'package:kaiteki/ui/feedback_screen.dart' ('lib/ui/feedback_screen.dart').
ERROR: Try correcting the name to the name of an existing getter, or defining a getter or field named 'FilledButton'.
ERROR:                 child: FilledButton.icon(
ERROR:                        ^^^^^^^^^^^^
ERROR: lib/ui/main/pages/notifications.dart:213:49: Error: Member not found: 'strokeAlignOutside'.
ERROR:                         strokeAlign: BorderSide.strokeAlignOutside,
ERROR:                                                 ^^^^^^^^^^^^^^^^^^
ERROR: ../../../../.pub-cache/git/kaiteki_material-f545d944a232baa780ac875fbb1b13e610594631/lib/src/material/badged_box.dart:11:9: Error: 'Badge' isn't a type.
ERROR:   final Badge badge;
ERROR:         ^^^^^
ERROR: ../../../../.pub-cache/git/kaiteki_material-f545d944a232baa780ac875fbb1b13e610594631/lib/src/material/badged_box.dart:34:12: Error: The method 'Badge' isn't defined for the class 'Widget'.
ERROR:  - 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/framework.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'Badge'.
ERROR:     return Badge(child: this);
ERROR:            ^^^^^
ERROR: ../../../../.pub-cache/git/kaiteki_material-f545d944a232baa780ac875fbb1b13e610594631/lib/src/material/badged_box.dart:41:12: Error: The method 'Badge' isn't defined for the class 'Widget'.
ERROR:  - 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/framework.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'Badge'.
ERROR:     return Badge(
ERROR:            ^^^^^
ERROR: ../../../../.pub-cache/git/kaiteki_material-f545d944a232baa780ac875fbb1b13e610594631/lib/src/material/main_switch_list_tile.dart:172:9: Error: No named parameter with the name 'onFocusChange'.
ERROR:         onFocusChange: onFocusChange,
ERROR:         ^^^^^^^^^^^^^
ERROR: /opt/flutter/packages/flutter/lib/src/material/switch_list_tile.dart:125:9: Context: Found this candidate, but the arguments don't match.
ERROR:   const SwitchListTile({
ERROR:         ^^^^^^^^^^^^^^
ERROR: lib/ui/shared/posts/attachments/attachment_widget.dart:40:20: Error: The getter 'FilledButton' isn't defined for the class '_AttachmentWidgetState'.
ERROR:  - '_AttachmentWidgetState' is from 'package:kaiteki/ui/shared/posts/attachments/attachment_widget.dart' ('lib/ui/shared/posts/attachments/attachment_widget.dart').
ERROR: Try correcting the name to the name of an existing getter, or defining a getter or field named 'FilledButton'.
ERROR:             child: FilledButton.tonal(
ERROR:                    ^^^^^^^^^^^^
ERROR: lib/ui/shared/posts/attachments/attachment_widget.dart:41:22: Error: The getter 'FilledButton' isn't defined for the class '_AttachmentWidgetState'.
ERROR:  - '_AttachmentWidgetState' is from 'package:kaiteki/ui/shared/posts/attachments/attachment_widget.dart' ('lib/ui/shared/posts/attachments/attachment_widget.dart').
ERROR: Try correcting the name to the name of an existing getter, or defining a getter or field named 'FilledButton'.
ERROR:               style: FilledButton.styleFrom(
ERROR:                      ^^^^^^^^^^^^
ERROR: lib/ui/chats/chat_target_tile.dart:91:18: Error: Couldn't find constructor 'Badge'.
ERROR:     return const Badge();
ERROR:                  ^^^^^
ERROR: lib/ui/shared/posts/count_button.dart:95:55: Error: The getter 'outlineVariant' isn't defined for the class 'ColorScheme'.
ERROR:  - 'ColorScheme' is from 'package:flutter/src/material/color_scheme.dart' ('/opt/flutter/packages/flutter/lib/src/material/color_scheme.dart').
ERROR: Try correcting the name to the name of an existing getter, or defining a getter or field named 'outlineVariant'.
ERROR:     if (!enabled || onTap == null) return colorScheme.outlineVariant;
ERROR:                                                       ^^^^^^^^^^^^^^
Building Linux application...`

It would be great to avoid building it altogether, hence: Please provide ARM64 builds of Kaiteki!

Designs

No response

Resources

No response

ThatOneCalculator commented 1 year ago

Cc @Craftplacer, can we escalate this? It shouldn't be too hard to add to CI.

Craftplacer commented 1 year ago

we require an aarch64 build runner (i.e. a machine/host) for github actions in order to build for it. cross compiling isn't available yet for flutter

Craftplacer commented 1 year ago

Also as answer to @1peter10, Kaiteki needs to be built against Flutter's beta branch as explained in our BUILDING.md

ThatOneCalculator commented 1 year ago

https://github.com/marketplace/actions/arm-runner

Craftplacer commented 1 year ago

This unfortunately seems a bit convoluted and a potential overhead when running CI, I suppose I should get an RPi up running in a corner

ThatOneCalculator commented 1 year ago

Actually, there seems to be a much better alternative: https://buildjet.com/for-github-actions/blog/hosted-arm-runners-on-github-actions

Craftplacer commented 1 year ago

Paid service

Craftplacer commented 1 year ago

I'll setup an ARM runner this afternoon