cake-tech / cake_wallet

The open source repository for Cake Wallet, a noncustodial multi-currency wallet, and Monero.com, a noncustodial Monero-only wallet. Need help? Check out https://guides.cakewallet.com
https://cakewallet.com
MIT License
637 stars 173 forks source link

GNU/Linux build error #1293

Closed Spixmaster closed 6 months ago

Spixmaster commented 7 months ago

I build with the following instructions in a PKGBUILD as I want to package this programme for the AUR like I did with the binary but this time compiled from source. I am on HEAD of branch linux/password-direct-input. The required dependencies are installed.

    cd "${srcdir}"/"${pkgname}"/scripts/linux/ || exit 1
    ./cakewallet.sh

    cd "${srcdir}"/"${pkgname}"/ || exit 1
    flutter pub get
    flutter packages pub run ./tool/generate_new_secrets.dart
    ./model_generator.sh
    flutter packages pub run ./tool/generate_localization.dart
    flutter build linux --release

The output indicates that one command fails.

Resolving dependencies...
Got dependencies!
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Deprecated. Use `dart run` instead.
Building package executable...
Built cake_wallet:generate_pubspec.
Resolving dependencies... (4.5s)
+ _fe_analyzer_shared 47.0.0 (67.0.0 available)
+ analyzer 4.7.0 (6.4.1 available)
+ animate_do 2.1.0 (3.3.3 available)
+ another_flushbar 1.12.30
+ archive 3.4.10
+ args 2.4.2
+ asn1lib 1.5.2
+ async 2.11.0
+ auto_size_text 3.0.0
+ barcode_scan2 4.3.0
+ base32 2.1.3
+ basic_utils 5.7.0
+ bech32 0.2.2 from git https://github.com/cake-tech/bech32.git at 057550
+ bip32 2.0.0
+ bip39 1.0.6
+ bitcoin_flutter 2.0.2 from git https://github.com/cake-tech/bitcoin_flutter.git at df9204
+ boolean_selector 2.1.1
+ bs58check 1.0.2
+ build 2.4.1
+ build_config 1.1.1
+ build_daemon 4.0.1
+ build_resolvers 2.0.10 (2.4.2 available)
+ build_runner 2.4.8
+ build_runner_core 7.2.10 (7.3.0 available)
+ built_collection 5.1.1
+ built_value 8.9.0
+ cake_backup 1.0.0+1 from git https://github.com/cake-tech/cake_backup.git at 3aba86
+ characters 1.3.0
+ checked_yaml 2.0.3
+ cli_util 0.3.5 (0.4.1 available)
+ clock 1.1.1
+ code_builder 4.10.0
+ collection 1.18.0
+ connectivity 3.0.6 (discontinued)
+ connectivity_for_web 0.4.0+1
+ connectivity_macos 0.2.1+2
+ connectivity_platform_interface 2.0.1
+ convert 3.1.1
+ cross_file 0.3.3+8
+ crypto 3.0.3
+ cryptography 2.7.0
+ cupertino_icons 1.0.6
+ dart_style 2.2.4 (2.3.4 available)
+ dbus 0.7.10
+ device_display_brightness 0.0.6
+ device_info 2.0.3
+ device_info_platform_interface 2.0.1
+ device_info_plus 8.1.0 (9.1.2 available)
+ device_info_plus_platform_interface 7.0.0
+ devicelocale 0.6.0 from git https://github.com/cake-tech/flutter-devicelocale at 454226
+ dio 4.0.6 (5.4.0 available)
+ dotted_border 2.1.0
+ encrypt 5.0.3
+ fake_async 1.3.1
+ ffi 2.1.0 (2.1.2 available)
+ file 6.1.4 (7.0.0 available)
+ file_picker 5.3.1 (6.1.1 available)
+ fixnum 1.1.0
+ flutter 0.0.0 from sdk flutter
+ flutter_inappwebview 5.8.0 (6.0.0 available)
+ flutter_launcher_icons 0.11.0 (0.13.1 available)
+ flutter_localizations 0.0.0 from sdk flutter
+ flutter_mailer 2.1.2
+ flutter_mobx 2.2.0+2
+ flutter_plugin_android_lifecycle 2.0.9 (2.0.17 available)
+ flutter_slidable 2.0.0 (3.0.1 available)
+ flutter_spinkit 5.2.0
+ flutter_test 0.0.0 from sdk flutter
+ flutter_web_plugins 0.0.0 from sdk flutter
+ frontend_server_client 3.2.0
+ get_it 7.6.7
+ glob 2.1.2
+ graphs 2.3.1
+ hex 0.2.0
+ hive 2.2.3
+ hive_flutter 1.1.0
+ hive_generator 1.1.3 (2.0.1 available)
+ http 1.2.0
+ http_multi_server 3.2.1
+ http_parser 4.0.2
+ image 3.3.0 (4.1.6 available)
+ in_app_review 2.0.8
+ in_app_review_platform_interface 2.0.5
+ intl 0.18.1 (0.19.0 available)
+ io 1.0.4
+ js 0.6.7 (0.7.0 available)
+ json_annotation 4.8.1
+ keyboard_actions 4.2.0
+ local_auth 2.1.8
+ local_auth_android 1.0.21 (1.0.36 available)
+ local_auth_ios 1.1.6
+ local_auth_platform_interface 1.0.10
+ local_auth_windows 1.0.10
+ logging 1.2.0
+ lottie 1.4.3 (3.0.0 available)
+ matcher 0.12.16 (0.12.16+1 available)
+ material_color_utilities 0.5.0 (0.8.0 available)
+ meta 1.10.0 (1.12.0 available)
+ mime 1.0.5
+ mobx 2.3.0+1
+ mobx_codegen 2.3.0 (2.6.0+1 available)
+ nested 1.0.0
+ package_config 2.1.0
+ package_info_plus 4.2.0 (5.0.1 available)
+ package_info_plus_platform_interface 2.0.1
+ path 1.8.3 (1.9.0 available)
+ path_drawing 1.0.1
+ path_parsing 1.0.1
+ path_provider 2.0.15 (2.1.2 available)
+ path_provider_android 2.0.24 (2.2.2 available)
+ path_provider_foundation 2.3.2
+ path_provider_linux 2.2.1
+ path_provider_platform_interface 2.1.2
+ path_provider_windows 2.2.1
+ pedantic 1.11.1 (discontinued replaced by lints)
+ permission_handler 10.4.5 (11.2.0 available)
+ permission_handler_android 10.3.6 (12.0.3 available)
+ permission_handler_apple 9.1.4 (9.3.0 available)
+ permission_handler_platform_interface 3.12.0 (4.1.0 available)
+ permission_handler_windows 0.1.3 (0.2.1 available)
+ petitparser 6.0.2
+ platform 3.1.4
+ platform_device_id 1.0.1
+ platform_device_id_linux 1.0.0
+ platform_device_id_macos 1.0.0
+ platform_device_id_platform_interface 1.0.0
+ platform_device_id_web 1.0.0
+ platform_device_id_windows 1.0.0
+ plugin_platform_interface 2.1.8
+ pointycastle 3.7.4
+ pool 1.5.1
+ protobuf 3.1.0
+ provider 6.1.1
+ pub_semver 2.1.4
+ pubspec_parse 1.2.3
+ qr 3.0.1
+ qr_flutter 4.0.1 from git https://github.com/cake-tech/qr.flutter.git at dced28
+ rxdart 0.27.7
+ sensitive_clipboard 1.0.0
+ share_plus 4.5.3 (7.2.2 available)
+ share_plus_linux 3.0.1
+ share_plus_macos 3.0.1
+ share_plus_platform_interface 3.3.1
+ share_plus_web 3.1.0
+ share_plus_windows 3.0.1 (4.0.0 available)
+ shared_preferences 2.0.20 (2.2.2 available)
+ shared_preferences_android 2.0.17 (2.2.1 available)
+ shared_preferences_foundation 2.3.5
+ shared_preferences_linux 2.3.2
+ shared_preferences_platform_interface 2.3.2
+ shared_preferences_web 2.2.2
+ shared_preferences_windows 2.3.2
+ shelf 1.4.1
+ shelf_web_socket 1.0.4
+ sky_engine 0.0.99 from sdk flutter
+ smooth_page_indicator 1.1.0
+ source_gen 1.2.6 (1.5.0 available)
+ source_helper 1.3.3 (1.3.4 available)
+ source_span 1.10.0
+ sprintf 7.0.0
+ stack_trace 1.11.1
+ stream_channel 2.1.2
+ stream_transform 2.1.0
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ test_api 0.6.1 (0.7.0 available)
+ timing 1.0.1
+ translator 1.0.0 from git https://github.com/cake-tech/google-translator.git at b36571
+ tuple 2.0.2
+ typed_data 1.3.2
+ uni_links 0.5.1
+ uni_links_platform_interface 1.0.0
+ uni_links_web 0.1.0
+ unorm_dart 0.2.0 (0.3.0 available)
+ url_launcher 6.1.14 (6.2.4 available)
+ url_launcher_android 6.0.24 (6.2.2 available)
+ url_launcher_ios 6.2.4
+ url_launcher_linux 3.1.1
+ url_launcher_macos 3.1.0
+ url_launcher_platform_interface 2.3.1
+ url_launcher_web 2.2.3
+ url_launcher_windows 3.1.1
+ uuid 4.3.3
+ vector_math 2.1.4
+ wakelock_plus 1.1.4
+ wakelock_plus_platform_interface 1.1.0
+ watcher 1.1.0
+ web 0.3.0 (0.4.2 available)
+ web_socket_channel 2.4.0 (2.4.3 available)
+ win32 4.1.4 (5.2.0 available)
+ workmanager 0.5.2
+ xdg_directories 1.0.4
+ xml 6.5.0
+ yaml 3.1.2
Changed 194 dependencies!
2 packages are discontinued.
48 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
The plugin `device_display_brightness` requires your app to be migrated to the Android embedding v2. Follow the steps
on the migration doc above and re-run this command.
Deprecated. Use `dart run` instead.
Building package executable...
Built cake_wallet:configure.
Resolving dependencies... (1.9s)
  _fe_analyzer_shared 47.0.0 (67.0.0 available)
  analyzer 4.7.0 (6.4.1 available)
  animate_do 2.1.0 (3.3.3 available)
  build_resolvers 2.0.10 (2.4.2 available)
  build_runner_core 7.2.10 (7.3.0 available)
  cli_util 0.3.5 (0.4.1 available)
  connectivity 3.0.6 (discontinued)
+ cw_bitcoin 0.0.1 from path cw_bitcoin
+ cw_core 0.0.1 from path cw_core
+ cw_ethereum 0.0.1 from path cw_ethereum
+ cw_monero 0.0.1 from path cw_monero
+ cw_shared_external 0.0.1 from path cw_shared_external
  dart_style 2.2.4 (2.3.4 available)
  device_info_plus 8.1.0 (9.1.2 available)
  dio 4.0.6 (5.4.0 available)
+ ed25519_hd_key 2.2.1
+ eip1559 0.6.2
+ eip55 1.0.2
+ erc20 1.0.1
  ffi 2.1.0 (2.1.2 available)
  file 6.1.4 (7.0.0 available)
  file_picker 5.3.1 (6.1.1 available)
  flutter_inappwebview 5.8.0 (6.0.0 available)
  flutter_launcher_icons 0.11.0 (0.13.1 available)
  flutter_plugin_android_lifecycle 2.0.9 (2.0.17 available)
  flutter_slidable 2.0.0 (3.0.1 available)
  hive_generator 1.1.3 (2.0.1 available)
  image 3.3.0 (4.1.6 available)
  intl 0.18.1 (0.19.0 available)
  js 0.6.7 (0.7.0 available)
+ json_rpc_2 3.0.2
  local_auth_android 1.0.21 (1.0.36 available)
  lottie 1.4.3 (3.0.0 available)
  matcher 0.12.16 (0.12.16+1 available)
  material_color_utilities 0.5.0 (0.8.0 available)
  meta 1.10.0 (1.12.0 available)
  mobx_codegen 2.3.0 (2.6.0+1 available)
  package_info_plus 4.2.0 (5.0.1 available)
  path 1.8.3 (1.9.0 available)
  path_provider 2.0.15 (2.1.2 available)
  path_provider_android 2.0.24 (2.2.2 available)
  pedantic 1.11.1 (discontinued replaced by lints)
  permission_handler 10.4.5 (11.2.0 available)
  permission_handler_android 10.3.6 (12.0.3 available)
  permission_handler_apple 9.1.4 (9.3.0 available)
  permission_handler_platform_interface 3.12.0 (4.1.0 available)
  permission_handler_windows 0.1.3 (0.2.1 available)
+ pinenacl 0.5.1
+ sec 1.1.0
  share_plus 4.5.3 (7.2.2 available)
  share_plus_windows 3.0.1 (4.0.0 available)
  shared_preferences 2.0.20 (2.2.2 available)
  shared_preferences_android 2.0.17 (2.2.1 available)
  source_gen 1.2.6 (1.5.0 available)
  source_helper 1.3.3 (1.3.4 available)
  test_api 0.6.1 (0.7.0 available)
  unorm_dart 0.2.0 (0.3.0 available)
  url_launcher 6.1.14 (6.2.4 available)
  url_launcher_android 6.0.24 (6.2.2 available)
+ wallet 0.0.13
  web 0.3.0 (0.4.2 available)
+ web3dart 2.7.2
  web_socket_channel 2.4.0 (2.4.3 available)
  win32 4.1.4 (5.2.0 available)
Changed 14 dependencies!
2 packages are discontinued.
48 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app:
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
The plugin `cw_shared_external` requires your app to be migrated to the Android embedding v2. Follow the steps on the
migration doc above and re-run this command.

I thinks the migration needs to be done in the source code.

tuxpizza commented 7 months ago

Just confirming, you are using Flutter 3.10.x or lower?

Spixmaster commented 7 months ago

No, the package from Arch Linux which is version 3.16.9.

Spixmaster commented 7 months ago

@tuxpizza Another question since I want to package it for Arch Linux.

The branch linux/password-direct-input which contains the source code for the desktop programme was not updated for months but there were released new desktop versions. How can that be?

tuxpizza commented 7 months ago

Per the build instructions, you must be using Flutter 3.10.X or lower. You can download the older version and follow the instructions to install it here: https://docs.flutter.dev/get-started/install/linux Also, this is the branch you want to use https://github.com/cake-tech/cake_wallet/tree/cw_linux_direct_input_password

Spixmaster commented 7 months ago

Yes, indeed I got it to work. However, I stopped considering for packaging from source because the build process is bad.

The scripts setting environment variables are confusing but that is managable. The thing which causes most trouble is the requirement to build several other projects like "boost", "monero", "openssl" and so on. Those libraries should be used provided by the system.

I really like this software which is why I would really like to see improvement in this regard.

tuxpizza commented 6 months ago

Will consider making the build process better, at the moment this is how it has to be due to the requirements of the services we use and packages we integrate.