irondash / cargokit Goto Github PK
View Code? Open in Web Editor NEWIntegrate cargo build with flutter plugins and applications.
License: Other
Integrate cargo build with flutter plugins and applications.
License: Other
First off, congrats and thanks for this project π .
I know this (the title) is probably orthogonal to your project, but I was hoping to get in touch since rust+flutter is really rather new.
For a parser library I'm creating, I wanted to make dart/flutter bindings: vhdirk/dash7-rs#33:
The project was generated with flutter_rust_bridge and then modified a bit to try and make the 'magic' aspect of it a little less hidden. One of my goals is to not require the users of this library (me :) ) to have a working rust toolchain. Rather, I'd like to make builds available on pub, so that I can just use the package as if it where a regular dart/flutter package.
As far as I can tell, there seem to be 2 ways to do this:
For simplicity (from front-end developer POV), I wanted to try out native assets. It seems rather logical that the binaries would be shipped with the package itself. I came across your other project https://github.com/irondash/native_toolchain_rust. I think this is a (albeit very experimental) way to bundle rust libs with a dart/flutter package.
Seeing how iOS is currently still missing from native_toolchain_rust
, and me not knowing the tiniest bit about building for iOS in the first place, I was thinking:
Do you think it possible to trigger cargokit from hooks/build.dart, as such that it would then provide (and tell flutter/dart build about) the binaries? Since native_toolchain_cli
provides the utilities to specify binaries per platform, I would guess that it shouldn't be that hard.
Which is why I started from the example here: https://github.com/dart-lang/native/blob/main/pkgs/native_assets_cli/example/build/local_asset/hook/build.dart. I am assuming the file asset.txt
should end up in build/flutter_assets
and referenced in AssetManifest.json
, when running flutter build bundle
(without arguments).
Is this correct at all? Am I on the right track here?
If you could share some of your wisdom (or point me to a place where I should look instead), I would be very grateful!
Always grateful for your contribution for making Flutter-app ecosystem evolve :)
There was an issue at Rinf, where third-party crates are not loaded on Android if they depend on libc++
.
These two links above describe the whole issue. For some reason, rodio
crate that depends on libc++
works well on all platforms, except Android(Built with Cargokit). It looks like symbols that should be in libc++
are missing only in Android builds.
May I ask, if there is a workaround for this?
I've encountered a weird behavior while trying to use flutter_rust_bridge, specifically while building using flutter run
, after running cargo build --target aarch64-linux-android
I got the following error.
error: failed to run custom build command for `dart-sys-fork v4.1.1`
Caused by:
process didn't exit successfully: `/home/ghaif/Desktop/my_app/build/rust_builder/build/debug/build/dart-sys-fork-3927c6744642428a/build-script-build` (exit status: 1)
--- stdout
TARGET = Some("aarch64-linux-android")
OPT_LEVEL = Some("0")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CC_aarch64-linux-android
CC_aarch64-linux-android = None
cargo:rerun-if-env-changed=CC_aarch64_linux_android
CC_aarch64_linux_android = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
cargo:rerun-if-env-changed=CFLAGS_aarch64-linux-android
CFLAGS_aarch64-linux-android = None
cargo:rerun-if-env-changed=CFLAGS_aarch64_linux_android
CFLAGS_aarch64_linux_android = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "aarch64-linux-android-clang" "-O0" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-I" "/home/ghaif/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dart-sys-fork-4.1.1/dart-sdk/include" "-Wall" "-Wextra" "-o" "/home/ghaif/Desktop/my_app/build/rust_builder/build/aarch64-linux-android/debug/build/dart-sys-fork-713bd8a87951eb3d/out/034bb5def7e8433c-dart_api_dl.o" "-c" "/home/ghaif/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dart-sys-fork-4.1.1/dart-sdk/include/dart_api_dl.c"
--- stderr
error occurred: Failed to find tool. Is `aarch64-linux-android-clang` installed?
By following this comment, I was led to the fix of adding the -framework SystemConfiguration
flag to the iOS podspec, which weirdly enough fixed the issue with android builds.
It is worth mentioning that flutter run
succeeds after applying this fix, but cargo build
still gives the same error.
You can find more details here: fzyzcjy/flutter_rust_bridge#1722
Context:
I ran into shasum: command not found
error from file cargokit/run_build_tool.sh:55
on ArchLinux.
I was setting up an example app from the flutter_rust_bridge
project.
Issue:
The run_build_tool.sh
is looking for shasum
command, but on archlinux it is called sha1sum
.
To reproduce:
cargo install 'flutter_rust_bridge_codegen@^2.0.0-dev.21' && \
flutter_rust_bridge_codegen create my_app && cd my_app && flutter run -v
Relevant output flutter run -v
...
[ +1 ms] /home/micah/projects/my_app/rust_builder/cargokit/run_build_tool.sh: line 55: shasum: command not found
...
[ ] Exception: Build process failed
[ +4 ms] "flutter run" took 12,405ms.
[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:790:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1367:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:348:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:294:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:112:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +35 ms] ensureAnalyticsSent: 34ms
[ ] Running 1 shutdown hook
[ +5 ms] Shutdown hooks complete
[ ] exiting with code 1
Temporary fix:
ln -s /usr/bin/sha1sum /usr/bin/shasum
Thank you for creating this project that has greatly aided my development efforts.
I'm get an issue where the compiled iOS package, the output framework lib size is too large.
keychat_rust_ffi_plugin.framework 24 MB
I integrated flutter_rust_bridge 2.1.0.
My project: https://github.com/keychat-io/keychat_rust_ffi_plugin/blob/dev/ios/keychat_rust_ffi_plugin.podspec
Do you know what the reasons are? Or give analysis suggestions
When attempting to archive a build in preparation to submit to App Store in Xcode there is a PhaseScriptExecution error: Command PhaseScriptExecution failed with a nonzero exit code
Specifically: run_build_tool.sh: line 75: dart: command not found
It appears that FLUTTER_ROOT
is not set when run_build_tool.sh
is called and when printing PATH
(from within run_build_tool.sh
) I get only /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
so it appears Xcode is stripping my user defined path.
Note: flutter build ios
works as expected.
This may be unrelated to cargo kit specifically but I thought I would open an issue here just in case.
My current workaround is to add a symlink to dart in /usr/local/bin
like so: ln -s /pathToMyFlutterInstall/dart /usr/local/bin/dart
Compilers may embed some debugging information directly into the compiled code or generate separate files (like .pdb for Windows or .dSYM for macOS) that contain debugging symbols and information. These files aid the debugger in correlating the machine code with the original source code.
If such method is possible, it will hugely benefit users using Rinf. Breakpoints will work if we run Rust code directly with cargo run
, but will they work if they are linked to a Flutter app?
Hi thanks for the toolkit! I am trying to use it on windows but seems to have a bug. Reproduction steps are: On a windows 10 machine (indeed virtual machine in my case), use powershell to execute:
git clone https://github.com/irondash/hello_rust_ffi_plugin
cd hello_rust_ffi_plugin/example
flutter run -d windows --verbose
Then fail to compile and see:
PS C:\Users\Tom\hello_rust_ffi_plugin\example> flutter run -d windows
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Resolving dependencies... (1.3s)
* async 2.11.0 (was 2.11.0)
* boolean_selector 2.1.1 (was 2.1.1)
* characters 1.3.0 (was 1.3.0)
* clock 1.1.1 (was 1.1.1)
* collection 1.18.0 (was 1.18.0)
* cupertino_icons 1.0.6 (was 1.0.5)
* fake_async 1.3.1 (was 1.3.1)
* flutter_lints 2.0.3 (was 2.0.2) (3.0.1 available)
* lints 2.1.1 (was 2.1.1) (3.0.0 available)
* matcher 0.12.16 (was 0.12.16)
* material_color_utilities 0.5.0 (was 0.5.0) (0.8.0 available)
* meta 1.10.0 (was 1.9.1) (1.11.0 available)
* path 1.8.3 (was 1.8.3)
* plugin_platform_interface 2.1.7 (was 2.1.5)
* source_span 1.10.0 (was 1.10.0)
* stack_trace 1.11.1 (was 1.11.1)
* stream_channel 2.1.2 (was 2.1.2)
* string_scanner 1.2.0 (was 1.2.0)
* term_glyph 1.2.1 (was 1.2.1)
* test_api 0.6.1 (was 0.6.1)
* vector_math 2.1.4 (was 2.1.4)
* web 0.3.0 (was 0.1.4-beta) (0.4.0 available)
Changed 22 dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib\main.dart on Windows in debug mode...
windows/flutter/CMakeLists.txt does not use FLUTTER_TARGET_PLATFORM, updating.
Building Windows application... β’ΏTerminate batch job (Y/N)?
^C
PS C:\Users\Tom\hello_rust_ffi_plugin\example> flutter run -d windows --verbose
[ +370 ms] Unable to locate an Android SDK.
[ +211 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +12 ms] Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[ +149 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +3 ms] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +9 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +120 ms] Skipping pub get: version match.
[ +138 ms] Found plugin hello_rust_ffi_plugin at C:\Users\Tom\hello_rust_ffi_plugin\
[ +127 ms] Found plugin hello_rust_ffi_plugin at C:\Users\Tom\hello_rust_ffi_plugin\
[ +98 ms] Generating
C:\Users\Tom\hello_rust_ffi_plugin\example\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +229 ms] Initializing file store
[ +29 ms] Skipping target: gen_localizations
[ +7 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated
contents: C:\Users\Tom\hello_rust_ffi_plugin\example\.dart_tool\package_config_subset}
[ +168 ms] Found plugin hello_rust_ffi_plugin at C:\Users\Tom\hello_rust_ffi_plugin\
[ +13 ms] gen_dart_plugin_registrant: Complete
[ +2 ms] Skipping target: _composite
[ +2 ms] complete
[ +9 ms] Launching lib\main.dart on Windows in debug mode...
[ +8 ms] C:\Users\Tom\fvm\default\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\Tom\fvm\default\bin\cache\dart-sdk\bin\snapshots\frontend_server.dart.snapshot --sdk-root
C:\Users\Tom\fvm\default\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter
--experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/74d16627b940bb15e50891f82cad6c3e3465bd6d/ --output-dill
C:\Users\Tom\AppData\Local\Temp\flutter_tools.d669e3a5\flutter_tool.12452cc1\app.dill --packages
C:\Users\Tom\hello_rust_ffi_plugin\example\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false
--enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build\25c7fdbd37e2353f978846c51150293c.cache.dill.track.dill --verbosity=error
--enable-experiment=alternative-invalidation-strategy
[ +65 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest
-version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.VC.CMake.Project
[ +87 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8
-latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.VC.CMake.Project
[ +2 ms] [
{
"instanceId": "88105f9f",
"installDate": "2022-03-03T04:21:18Z",
"installationName": "VisualStudio/17.1.0+32210.238",
"installationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
"installationVersion": "17.1.32210.238",
"productId": "Microsoft.VisualStudio.Product.Community",
"productPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Community 2022",
"description": "Powerful IDE, free for students, open-source contributors, and individuals",
"channelId": "VisualStudio.17.Release",
"channelUri": "https://aka.ms/vs/17/release/channel",
"enginePath": "C:\\Program Files (x86)\\Microsoft Visual
Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
"installedChannelUri": "https://aka.ms/vs/17/release/channel",
"releaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.1#17.1.0",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
"updateDate": "2022-03-03T04:21:18.6874627Z",
"catalog": {
"buildBranch": "d17.1",
"buildVersion": "17.1.32210.238",
"id": "VisualStudio/17.1.0+32210.238",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "17.1.0",
"productLine": "Dev17",
"productLineVersion": "2022",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "0",
"productPreReleaseMilestoneSuffix": "7.0",
"productSemanticVersion": "17.1.0+32210.238",
"requiredEngineVersion": "3.1.2196.8931"
},
"properties": {
"campaignId": "2030",
"channelManifestId": "VisualStudio.17.Release/17.1.0+32210.238",
"nickname": "",
"setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
}
}
]
[ +13 ms] Building Windows application...
[ +13 ms] <- compile package:hello_rust_ffi_plugin_example/main.dart
[ +3 ms] executing: C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S
C:\Users\Tom\hello_rust_ffi_plugin\example\windows -B build\windows\x64 -G Visual Studio 17 2022 -A x64
-DFLUTTER_TARGET_PLATFORM=windows-x64
[ +112 ms] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
[ +753 ms] -- Configuring done
[ +593 ms] -- Generating done
[ +78 ms] -- Build files have been written to: C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64
[ +51 ms] executing: C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe --build build\windows\x64 --config Debug
--target INSTALL --verbose
[ +269 ms] Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
[ +2 ms] Copyright (C) Microsoft Corporation. All rights reserved.
[ +109 ms] Build started 11/29/2023 9:33:16 AM.
[ +296 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj" on node 1 (default targets).
[ +2 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj" (1) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
[ +3 ms] InitializeBuildStatus:
[ +1 ms] Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[ +30 ms] CustomBuild:
[ +1 ms] All outputs are up-to-date.
[ +102 ms] Checking Build System
[ +123 ms] FinalizeBuildStatus:
[ +1 ms] Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
[ ] Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
[ +1 ms] Done Building Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ZERO_CHECK.vcxproj" (default
targets).
[ +102 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj" (1) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (3) on node 1 (default targets).
[ +1 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\plugins\hello_rust_ffi_plugin\hello_rust_ffi_plugin_cargokit.vcxpro
j" (4) on node 1 (default targets).
[ +1 ms] InitializeBuildStatus:
[ +1 ms] Creating "x64\Debug\hello_rust_ffi_plugin_cargokit\hello_ru.0EB085AF.tlog\unsuccessfulbuild" because "AlwaysCreate"
was specified.
[ +2 ms] CustomBuild:
[ +1 ms] "The build of
'C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\CMakeFiles\09884c161b4d1159148036d354c7554c\hello_rust_ffi_plugin_c
argokit.rule' depends on
'C:\USERS\TOM\HELLO_RUST_FFI_PLUGIN\EXAMPLE\BUILD\WINDOWS\X64\PLUGINS\HELLO_RUST_FFI_PLUGIN\RELEASE\HELLO_RUST_FFI_PLUGIN.DLL'
which is produced by the build of
'C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\CMakeFiles\d596b4374547061572aa24c233e75f53\hello_rust_ffi_plugin.d
ll.rule'. The items cannot be built in parallel."
[ +115 ms] Generating Release/hello_rust_ffi_plugin.dll, _phony_
[ +242 ms] 1 file(s) moved.
[ +331 ms] Resolving dependencies...
[ +665 ms] github 9.17.0 (9.20.0 available)
[ +1 ms] http 1.1.0 (1.1.2 available)
[ ] path 1.8.0 (1.8.3 available)
[ ] petitparser 5.4.0 (6.0.1 available)
[ +1 ms] version 3.0.0 (3.0.2 available)
[ ] Got dependencies!
[ +3 ms] 5 packages have newer versions incompatible with dependency constraints.
[ +1 ms] Try `dart pub outdated` for more information.
[ +495 ms] Compiling bin/build_tool_runner.dart to kernel file bin/build_tool_runner.dill.
[+3723 ms] INFO: Precompiled binaries are disabled
[ +300 ms] INFO: Building hello_rust_ffi_plugin for x86_64-pc-windows-msvc
[ +212 ms] FinalizeBuildStatus:
[ +1 ms] Deleting file "x64\Debug\hello_rust_ffi_plugin_cargokit\hello_ru.0EB085AF.tlog\unsuccessfulbuild".
[ ] Touching
"x64\Debug\hello_rust_ffi_plugin_cargokit\hello_ru.0EB085AF.tlog\hello_rust_ffi_plugin_cargokit.lastbuildstate".
[ ] Done Building Project
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\plugins\hello_rust_ffi_plugin\hello_rust_ffi_plugin_cargokit.vcxpro
j" (default targets).
[ +81 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_wrapper_app.vcxproj" (5) on node 1 (default
targets).
[ +1 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_wrapper_app.vcxproj" (5) is
building "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_assemble.vcxproj" (6) on node 1 (default
targets).
[ ] InitializeBuildStatus:
[ +2 ms] Creating "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[ +2 ms] CustomBuild:
[ +1 ms] "The build of
'C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\CMakeFiles\9e28d992a8143f7af058561420f0ae9f\flutter_assemble.rule'
depends on 'C:\USERS\TOM\HELLO_RUST_FFI_PLUGIN\EXAMPLE\WINDOWS\FLUTTER\EPHEMERAL\FLUTTER_WINDOWS.DLL' which is produced by the
build of
'C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\CMakeFiles\f6a442b70ac87b7a38c4bfb0ed8343c4\flutter_windows.dll.rul
e'. The items cannot be built in parallel."
[ +77 ms] Generating C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_windows.dll,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_export.h,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_windows.h,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_messenger.h,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_plugin_registrar.h,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/flutter_texture_registrar.h,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc,
C:/Users/Tom/hello_rust_ffi_plugin/example/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
[+1560 ms] [ +546 ms] Unable to locate an Android SDK.
[ +33 ms] [ +53 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +2 ms] [ +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +2 ms] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ +3 ms] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ +2 ms] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +4 ms] [ +12 ms] Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[ +178 ms] [ +179 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ +10 ms] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ +5 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +71 ms] [ +83 ms] Initializing file store
[ +36 ms] [ +36 ms] Done initializing file store
[ +138 ms] [ +138 ms] Skipping target: native_assets
[ +10 ms] [ +10 ms] Skipping target: gen_localizations
[ +1 ms] [ +2 ms] Skipping target: gen_dart_plugin_registrant
[+4074 ms] [+4074 ms] Skipping target: unpack_windows
[ +641 ms] [ +640 ms] Skipping target: kernel_snapshot
[ +265 ms] [ +266 ms] Skipping target: debug_bundle_windows_assets
[ +1 ms] [ ] Persisting file store
[ +12 ms] [ +14 ms] Done persisting file store
[ +7 ms] [ +7 ms] build succeeded.
[ +13 ms] [ +12 ms] "flutter assemble" took 5,520ms.
[ +267 ms] [ +267 ms] ensureAnalyticsSent: 252ms
[ +2 ms] [ ] Running 0 shutdown hooks
[ +1 ms] [ ] Shutdown hooks complete
[ ] [ ] exiting with code 0
[ +120 ms] FinalizeBuildStatus:
[ +1 ms] Deleting file "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild".
[ +1 ms] Touching "x64\Debug\flutter_assemble\flutter_assemble.tlog\flutter_assemble.lastbuildstate".
[ ] Done Building Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_assemble.vcxproj"
(default targets).
[ +9 ms] InitializeBuildStatus:
[ +1 ms] Creating "flutter_wrapper_app.dir\Debug\flutter_.C03E6CCE.tlog\unsuccessfulbuild" because "AlwaysCreate" was
specified.
[ +4 ms] CustomBuild:
[ +1 ms] All outputs are up-to-date.
[ +68 ms] ClCompile:
[ +1 ms] All outputs are up-to-date.
[ +24 ms] Lib:
[ +1 ms] All outputs are up-to-date.
[ +1 ms] flutter_wrapper_app.vcxproj ->
C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\Debug\flutter_wrapper_app.lib
[ +19 ms] FinalizeBuildStatus:
[ +2 ms] Deleting file "flutter_wrapper_app.dir\Debug\flutter_.C03E6CCE.tlog\unsuccessfulbuild".
[ +2 ms] Touching "flutter_wrapper_app.dir\Debug\flutter_.C03E6CCE.tlog\flutter_wrapper_app.lastbuildstate".
[ +1 ms] Done Building Project
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_wrapper_app.vcxproj" (default targets).
[ +39 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_wrapper_plugin.vcxproj" (7) on node 1 (default
targets).
[ +2 ms] InitializeBuildStatus:
[ +1 ms] Creating "flutter_wrapper_plugin.dir\Debug\flutter_.219563FD.tlog\unsuccessfulbuild" because "AlwaysCreate" was
specified.
[ +2 ms] CustomBuild:
[ +2 ms] All outputs are up-to-date.
[ +7 ms] ClCompile:
[ +1 ms] All outputs are up-to-date.
[ +2 ms] Lib:
[ +2 ms] All outputs are up-to-date.
[ +1 ms] flutter_wrapper_plugin.vcxproj ->
C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\Debug\flutter_wrapper_plugin.lib
[ +12 ms] FinalizeBuildStatus:
[ +2 ms] Deleting file "flutter_wrapper_plugin.dir\Debug\flutter_.219563FD.tlog\unsuccessfulbuild".
[ +2 ms] Touching "flutter_wrapper_plugin.dir\Debug\flutter_.219563FD.tlog\flutter_wrapper_plugin.lastbuildstate".
[ +1 ms] Done Building Project
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\flutter\flutter_wrapper_plugin.vcxproj" (default targets).
[ +37 ms] Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\runner\hello_rust_ffi_plugin_example.vcxproj" (8) on node 1
(default targets).
[ +1 ms] InitializeBuildStatus:
[ +1 ms] Creating "hello_rust_ffi_plugin_example.dir\Debug\hello_ru.6CD68D06.tlog\unsuccessfulbuild" because "AlwaysCreate"
was specified.
[ +1 ms] CustomBuild:
[ +1 ms] All outputs are up-to-date.
[ +35 ms] ClCompile:
[ +3 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c
/IC:\Users\Tom\hello_rust_ffi_plugin\example\windows /IC:\Users\Tom\hello_rust_ffi_plugin\example\windows\flutter\ephemeral
/IC:\Users\Tom\hello_rust_ffi_plugin\example\windows\flutter\ephemeral\cpp_client_wrapper\include /Zi /nologo /W4 /WX
/diagnostics:column /Od /Ob0 /D _UNICODE /D UNICODE /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D
"FLUTTER_VERSION=\"1.0.0+1\"" /D FLUTTER_VERSION_MAJOR=1 /D FLUTTER_VERSION_MINOR=0 /D FLUTTER_VERSION_PATCH=0 /D
FLUTTER_VERSION_BUILD=1 /D NOMINMAX /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"hello_rust_ffi_plugin_example.dir\Debug\\"
/Fd"hello_rust_ffi_plugin_example.dir\Debug\vc143.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue
C:\Users\Tom\hello_rust_ffi_plugin\example\windows\flutter\generated_plugin_registrant.cc
C:\Users\Tom\hello_rust_ffi_plugin\example\windows\runner\flutter_window.cpp
[ +94 ms] generated_plugin_registrant.cc
[ +520 ms] flutter_window.cpp
[+1075 ms] Generating Code...
[ +117 ms] ResourceCompile:
[ +1 ms] All outputs are up-to-date.
[ +40 ms] Link:
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe
/ERRORREPORT:QUEUE
/OUT:"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\runner\Debug\hello_rust_ffi_plugin_example.exe" /INCREMENTAL
/ILK:"hello_rust_ffi_plugin_example.dir\Debug\hello_rust_ffi_plugin_example.ilk" /NOLOGO ..\flutter\Debug\flutter_wrapper_app.lib
dwmapi.lib C:\Users\Tom\hello_rust_ffi_plugin\example\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib
gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed
/manifestinput:C:\Users\Tom\hello_rust_ffi_plugin\example\windows\runner\runner.exe.manifest /DEBUG
/PDB:"C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/runner/Debug/hello_rust_ffi_plugin_example.pdb"
/SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/runner/Debug/hello_rust_ffi_plugin_example.lib"
/MACHINE:X64 /pdbthreads:6 /machine:x64 hello_rust_ffi_plugin_example.dir\Debug\Runner.res
[ +2 ms] hello_rust_ffi_plugin_example.dir\Debug\flutter_window.obj
[ +1 ms] hello_rust_ffi_plugin_example.dir\Debug\main.obj
[ +1 ms] hello_rust_ffi_plugin_example.dir\Debug\utils.obj
[ +1 ms] hello_rust_ffi_plugin_example.dir\Debug\win32_window.obj
[ +1 ms] hello_rust_ffi_plugin_example.dir\Debug\generated_plugin_registrant.obj
[ +265 ms] hello_rust_ffi_plugin_example.vcxproj ->
C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\runner\Debug\hello_rust_ffi_plugin_example.exe
[ +11 ms] FinalizeBuildStatus:
[ +2 ms] Deleting file "hello_rust_ffi_plugin_example.dir\Debug\hello_ru.6CD68D06.tlog\unsuccessfulbuild".
[ +2 ms] Touching
"hello_rust_ffi_plugin_example.dir\Debug\hello_ru.6CD68D06.tlog\hello_rust_ffi_plugin_example.lastbuildstate".
[ +1 ms] Done Building Project
"C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\runner\hello_rust_ffi_plugin_example.vcxproj" (default targets).
[ +12 ms] InitializeBuildStatus:
[ +1 ms] Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[ +2 ms] CustomBuild:
[ +1 ms] All outputs are up-to-date.
[ +61 ms] Building Custom Rule C:/Users/Tom/hello_rust_ffi_plugin/example/windows/CMakeLists.txt
[ +70 ms] FinalizeBuildStatus:
[ +1 ms] Deleting file "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
[ +1 ms] Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
[ +1 ms] Done Building Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\ALL_BUILD.vcxproj" (default
targets).
[ +6 ms] InitializeBuildStatus:
[ +1 ms] Touching "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[ +82 ms] PostBuildEvent:
[ +1 ms] setlocal
[ +1 ms] "C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
[ +2 ms] if %errorlevel% neq 0 goto :cmEnd
[ ] :cmEnd
[ ] endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[ +1 ms] :cmErrorLevel
[ ] exit /b %1
[ +1 ms] :cmDone
[ +1 ms] if %errorlevel% neq 0 goto :VCEnd
[ +1 ms] :VCEnd
[ +81 ms] -- Install configuration: "Debug"
[ +66 ms] -- Up-to-date: C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/runner/Debug/data/icudtl.dat
[ +96 ms] -- Up-to-date: C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/runner/Debug/flutter_windows.dll
[ +1 ms] CMake Error at cmake_install.cmake:162 (file):
[ +1 ms] file INSTALL cannot find
[ +1 ms]
"C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plugins/hello_rust_ffi_plugin/Debug/hello_rust_ffi_plugin.dll":
[ +1 ms] No error.
[ +15 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: The command "setlocal [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +4 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: "C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
[C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +2 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :cmEnd [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +2 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :cmErrorLevel [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: exit /b %1 [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +2 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :cmDone [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +3 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :VCEnd" exited with code 1. [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] Done Building Project "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj" (default targets)
-- FAILED.
[ +1 ms] Build FAILED.
[ ] "C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj" (default target) (1) ->
[ ] (PostBuildEvent target) ->
[ +1 ms] C:\Program Files\Microsoft Visual
Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: The command "setlocal
[C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +2 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: "C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
[C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +3 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +3 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :cmErrorLevel [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: exit /b %1 [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :cmDone [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +3 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +4 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5):
error MSB3073: :VCEnd" exited with code 1. [C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\INSTALL.vcxproj]
[ +2 ms] 0 Warning(s)
[ +1 ms] 1 Error(s)
[ +1 ms] Time Elapsed 00:00:17.41
[ +13 ms] Building Windows application... (completed in 19.5s)
[ +2 ms] Exception: Build process failed.
[ +10 ms] "flutter run" took 20,848ms.
[ +5 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:752:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1350:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:348:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:294:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:112:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +212 ms] ensureAnalyticsSent: 199ms
[ +1 ms] Running 1 shutdown hook
[ +5 ms] Shutdown hooks complete
[ +1 ms] exiting with code 1
Given that
[ +1 ms] CMake Error at cmake_install.cmake:162 (file):
[ +1 ms] file INSTALL cannot find
[ +1 ms]
"C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plugins/hello_rust_ffi_plugin/Debug/hello_rust_ffi_plugin.dll":
[ +1 ms] No error.
I check the folders:
PS C:\Users\Tom\hello_rust_ffi_plugin\example> ls C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plugins/hello_rust_ffi_plugin
Directory: C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\plugins\hello_rust_ffi_plugin
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 11/29/2023 9:32 AM cargokit_build
d----- 11/29/2023 9:35 AM CMakeFiles
d----- 11/29/2023 9:35 AM Release
d----- 11/29/2023 9:32 AM x64
-a---- 11/29/2023 9:32 AM 18784 ALL_BUILD.vcxproj
-a---- 11/29/2023 9:32 AM 370 ALL_BUILD.vcxproj.filters
-a---- 11/29/2023 9:32 AM 1145 cmake_install.cmake
-a---- 11/29/2023 9:32 AM 3460 hello_rust_ffi_plugin.sln
-a---- 11/29/2023 9:32 AM 46824 hello_rust_ffi_plugin_cargokit.vcxproj
-a---- 11/29/2023 9:32 AM 1139 hello_rust_ffi_plugin_cargokit.vcxproj.filters
-a---- 11/29/2023 9:32 AM 14111 INSTALL.vcxproj
-a---- 11/29/2023 9:32 AM 551 INSTALL.vcxproj.filters
PS C:\Users\Tom\hello_rust_ffi_plugin\example> ls C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plugins/hello_rust_ffi_plugin/Release
Directory: C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\plugins\hello_rust_ffi_plugin\Release
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 11/29/2023 9:32 AM 122880 hello_rust_ffi_plugin.dll
-a---- 11/29/2023 9:32 AM 2150 hello_rust_ffi_plugin.dll.lib
-a---- 11/29/2023 9:32 AM 1249280 hello_rust_ffi_plugin.pdb
PS C:\Users\Tom\hello_rust_ffi_plugin\example> ls C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plugins/hello_rust_ffi_plugin/Debug
ls : Cannot find path 'C:\Users\Tom\hello_rust_ffi_plugin\example\build\windows\x64\plugins\hello_rust_ffi_plugin\Debug'
because it does not exist.
At line:1 char:1
+ ls C:/Users/Tom/hello_rust_ffi_plugin/example/build/windows/x64/plug ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Tom\he...fi_plugin\Debug:String) [Get-ChildItem], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
PS C:\Users\Tom\hello_rust_ffi_plugin\example>
Thus, it seems Release
folder has the dll, while Debug
does not, and cmake somehow expects to see files in the Debug folder, even if here we are building the debug mode instead of release mode.
Thus, I try to run it in release mode:
flutter run -d windows --release
And it works well:
P.S. After run --release, it seems that need to run flutter clean
to reproduce the bug.
I'm trying to build my application with Fastlane for android (I guess that doesn't really matter), but I get this error:
Task :irondash_engine_context:cargokitCargoBuildIrondash_engine_context_nativeRelease FAILED
/Users/maxfornacon/.pub-cache/hosted/pub.dev/irondash_engine_context-0.5.3/cargokit/gradle/../run_build_tool.sh: line 75: /Users/maxfornacon/maxfornacon/stable/bin/cache/dart-sdk/bin/dart: No such file or directory
I noticed that my name is occurring twice in the path where it's saying no such file or directory
. This might be the problem.
This should be more reliable. Current assumption that rustup always install cargo inside ~/.cargo
is wrong when rustup is installed through linux package manager.
We can't however just invoke any cargo that we find, because that might be system cargo intallation (i.e. homebrew) that has no access to rustup toolchains.
I think the referred way for this would be to always invoked cargo through rustup run stable cargo ...
and prepend ~/cargo/bin to PATH
when doing it.
Currently, cargokit always builds for all supported architectures. For example, there are 3 targets for iOS and 4 targets for Android.
However, many devs test primarily on one device during development and only need to build for all architectures during release. This means that a lot of build time is wasted on architectures that the devs don't need, slowing down the development cycle.
It'd be great if devs can whitelist/blacklist target architectures in dev mode to cut down unnecessary build time.
Cargokit is used by Rust In Flutter: https://github.com/cunarist/rust-in-flutter
There is an ongoing issue there regarding this cunarist/rinf#147
Basically it seems like even is the default toolchain is set to nightly, stable is being automatically set up and used.
I'm using flutter_rust_bridge to build lib for android and iOS. android side was ok.
but on iOS, when I manually add Libs on Xcode , then rerun with flutter run
my settings will be clear, is it related to cargokit code gen or some process?
detail can be found here: fzyzcjy/flutter_rust_bridge#1875 (comment)
I reported an analogous issue with flutter_rust_bridge
and was forwarded to here.
Indeed, it seems it is caused by cargokit
using stable
even though nightly
is set as default on my system and I have nightly
-only options in my ~/.cargo/config.toml
.
TLDR; how can I tell cargokit
to use a nightly
toolchain?
Output from flutter run
:
Connected devices:
Linux (desktop) β’ linux β’ linux-x64 β’ Ubuntu 23.10 6.5.11-060511-generic
Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 123.0.6312.105
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on Linux in debug mode...
SEVERE: error: failed to run `rustc` to learn about target-specific information
SEVERE: error: the option `Z` is only accepted on the nightly compiler
SEVERE: error: 1 nightly option were parsed
Building Linux application...
Error: Build process failed
And output from flutter run --verbose
:
[ +13 ms] executing: uname -m
[ +8 ms] Exit code 0 from: uname -m
[ ] x86_64
[ +80 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +91 ms] executing: /home/moritz/Android/Sdk/platform-tools/adb devices -l
[ +43 ms] List of devices attached
[ +3 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +50 ms] Connected devices:
[ +174 ms] Linux (desktop) β’ linux β’ linux-x64 β’ Ubuntu 23.10 6.5.11-060511-generic
[ ] Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 123.0.6312.105
[ ] [1]: Linux (linux)
[ ] [2]: Chrome (chrome)
[ ] Please choose one (or "q" to quit)
[ ] :
[+3627 ms] 1
[ +9 ms] Skipping pub get: version match.
[ +71 ms] Found plugin rust_lib_fl_test at /home/moritz/code/zynk/fl_test/rust_builder/
[ +20 ms] Found plugin integration_test at /opt/flutter/packages/integration_test/
[ +45 ms] Found plugin rust_lib_fl_test at /home/moritz/code/zynk/fl_test/rust_builder/
[ +7 ms] Found plugin integration_test at /opt/flutter/packages/integration_test/
[ +29 ms] Found plugin rust_lib_fl_test at /home/moritz/code/zynk/fl_test/rust_builder/
[ +4 ms] Found plugin integration_test at /opt/flutter/packages/integration_test/
[ +47 ms] Generating /home/moritz/code/zynk/fl_test/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +60 ms] No packages with native assets. Skipping native assets compilation.
[ +1 ms] Initializing file store
[ +6 ms] Skipping target: gen_localizations
[ +2 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/moritz/code/zynk/fl_test/.dart_tool/package_config_subset}
[ +23 ms] Found plugin rust_lib_fl_test at /home/moritz/code/zynk/fl_test/rust_builder/
[ +4 ms] Found plugin integration_test at /opt/flutter/packages/integration_test/
[ +2 ms] gen_dart_plugin_registrant: Complete
[ ] Skipping target: _composite
[ +1 ms] complete
[ +2 ms] Launching lib/main.dart on Linux in debug mode...
[ +2 ms] /opt/flutter/bin/cache/dart-sdk/bin/dartaotruntime --disable-dart-dev /opt/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root
/opt/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/e76c956498841e1ab458577d3892003e553e4f3c/ --output-dill /tmp/flutter_tools.RMQAWW/flutter_tool.QLDKKW/app.dill --packages
/home/moritz/code/zynk/fl_test/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
--initialize-from-dill build/129fe64d39a60f20f40290b7a749e2dc.cache.dill.track.dill --verbosity=error --enable-experiment=alternative-invalidation-strategy
[ +17 ms] Building Linux application...
[ +11 ms] <- compile package:fl_test/main.dart
[ +2 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/moritz/code/zynk/fl_test/linux
[ +142 ms] -- Configuring done (0.1s)
[ +41 ms] -- Generating done (0.0s)
[ +12 ms] -- Build files have been written to: /home/moritz/code/zynk/fl_test/build/linux/x64/debug
[ +11 ms] executing: ninja -C build/linux/x64/debug install
[ +7 ms] ninja: Entering directory `build/linux/x64/debug'
[ +690 ms] [1/6] Generating librust_lib_fl_test.so, _phony_
[ +2 ms] FAILED: plugins/rust_lib_fl_test/librust_lib_fl_test.so plugins/rust_lib_fl_test/_phony_ /home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test/librust_lib_fl_test.so
/home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test/_phony_
[ +20 ms] cd /home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test && /usr/bin/cmake -E env CARGOKIT_CMAKE=/usr/bin/cmake CARGOKIT_CONFIGURATION=Debug
CARGOKIT_MANIFEST_DIR=/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/.plugin_symlinks/rust_lib_fl_test/linux/../../rust
CARGOKIT_TARGET_TEMP_DIR=/home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test/cargokit_build
CARGOKIT_OUTPUT_DIR=/home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test CARGOKIT_TARGET_PLATFORM=linux-x64
CARGOKIT_TOOL_TEMP_DIR=/home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test/cargokit_build/tool CARGOKIT_ROOT_PROJECT_DIR=/home/moritz/code/zynk/fl_test/linux
/home/moritz/code/zynk/fl_test/rust_builder/cargokit/run_build_tool.sh build-cmake
[ +1 ms] INFO: Precompiled binaries are disabled
[ ] INFO: Building rust_lib_fl_test for x86_64-unknown-linux-gnu
[ ] SEVERE: ================================================================================
[ ] SEVERE: Cargokit BuildTool failed with error:
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: External Command: rustup "run" "stable" "cargo" "build" "--manifest-path" "/home/moritz/code/zynk/fl_test/rust/Cargo.toml" "-p" "rust_lib_fl_test" "--target" "x86_64-unknown-linux-gnu"
"--target-dir" "/home/moritz/code/zynk/fl_test/build/linux/x64/debug/plugins/rust_lib_fl_test/cargokit_build"
[ ] SEVERE: Returned Exit Code: 101
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: STDOUT:
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: STDERR:
[ ] SEVERE: error: failed to run `rustc` to learn about target-specific information
[ +1 ms] SEVERE:
[ ] SEVERE: Caused by:
[ ] SEVERE: process didn't exit successfully: `sccache /home/moritz/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -Z share-generics=y -C
link-arg=--ld-path=/usr/bin/mold --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot
--print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
[ ] SEVERE: --- stderr
[ ] SEVERE: error: the option `Z` is only accepted on the nightly compiler
[ ] SEVERE:
[ ] SEVERE: help: consider switching to a nightly toolchain: `rustup default nightly`
[ ] SEVERE:
[ ] SEVERE: note: selecting a toolchain with `+toolchain` arguments require a rustup proxy; see <https://rust-lang.github.io/rustup/concepts/index.html>
[ ] SEVERE:
[ ] SEVERE: note: for more information about Rust's stability policy, see <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#unstable-features>
[ ] SEVERE:
[ ] SEVERE: error: 1 nightly option were parsed
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: #0 runCommand (package:build_tool/src/util.dart:121:5)
[ ] SEVERE: #1 RustBuilder.build (package:build_tool/src/builder.dart:142:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #2 ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:71:25)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #3 BuildCMake.build (package:build_tool/src/build_cmake.dart:29:23)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #4 BuildCMakeCommand.runBuildCommand (package:build_tool/src/build_tool.dart:79:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #5 BuildCommand.run (package:build_tool/src/build_tool.dart:37:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #7 runMain (package:build_tool/src/build_tool.dart:251:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: BuildTool arguments: [build-cmake]
[ ] SEVERE: ================================================================================
[ +776 ms] [2/6] Generating /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/libflutter_linux_gtk.so, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_engine.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_method_call.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/fl_view.h,
/home/moritz/code/zynk/fl_test/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[ +1 ms] [ +9 ms] executing: uname -m
[ ] [ +8 ms] Exit code 0 from: uname -m
[ ] [ ] x86_64
[ ] [ +19 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ ] [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ +65 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ ] [ +21 ms] Initializing file store
[ ] [ +5 ms] Done initializing file store
[ ] [ +30 ms] Skipping target: native_assets
[ ] [ +1 ms] Skipping target: gen_localizations
[ ] [ +1 ms] Skipping target: gen_dart_plugin_registrant
[ ] [ +375 ms] Skipping target: unpack_linux
[ ] [ +237 ms] Skipping target: kernel_snapshot
[ ] [ +175 ms] Skipping target: debug_bundle_linux-x64_assets
[ ] [ ] Persisting file store
[ ] [ +6 ms] Done persisting file store
[ ] [ +3 ms] build succeeded.
[ ] [ +5 ms] "flutter assemble" took 941ms.
[ ] [ +1 ms] Running 0 shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ ] exiting with code 0
[ ] ninja: build stopped: subcommand failed.
[ +7 ms] Building Linux application... (completed in 1,729ms)
[ ] Error: Build process failed
[ ] "flutter run" took 6,128ms.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:815:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1389:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:295:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:119:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ ] Running 1 shutdown hook
[ +4 ms] Shutdown hooks complete
[ ] exiting with code 1
I was using flutter rust bridge and in my Rust code I use the reqwest library to make requests to a server, this application works for Linux, iOS and Android but for MacOS it does not. When I run flutter run in MacOS I get the following error:
akalugo@MBPdeAlejandro my_app % flutter run
Connected devices:
macOS (desktop) β’ macos β’ darwin-arm64 β’ macOS 14.2.1 23C71 darwin-arm64
Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 120.0.6099.129
Checking for wireless devices...
[1]: macOS (macos)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006030-000E09490AD0001C }
{ platform:macOS, arch:x86_64, id:00006030-000E09490AD0001C }
ld: Undefined symbols:
_SCDynamicStoreCopyProxies, referenced from:
system_configuration::dynamic_store::SCDynamicStore::get_proxies::hca7a3e33ea42720a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCDynamicStoreCreateWithOptions, referenced from:
system_configuration::dynamic_store::SCDynamicStore::create::h1f50eed3aa13ff91 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkInterfaceCopyAll, referenced from:
system_configuration::network_configuration::get_interfaces::h5cb58503ece28fca in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkInterfaceGetBSDName, referenced from:
system_configuration::network_configuration::SCNetworkInterface::bsd_name::h3a40fc94d65ef1d2 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkInterfaceGetInterfaceType, referenced from:
system_configuration::network_configuration::SCNetworkInterface::interface_type_string::h38c50491db9f096d in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkInterfaceGetLocalizedDisplayName, referenced from:
system_configuration::network_configuration::SCNetworkInterface::display_name::h943477d971a4162a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityCreateWithAddress, referenced from:
_$LT$system_configuration..network_reachability..SCNetworkReachability$u20$as$u20$core..convert..From$LT$core..net..socket_addr..SocketAddr$GT$$GT$::from::hdfb3d73cd9aaff70 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityCreateWithAddressPair, referenced from:
system_configuration::network_reachability::SCNetworkReachability::from_addr_pair::h052fe060f69d2906 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityCreateWithName, referenced from:
system_configuration::network_reachability::SCNetworkReachability::from_host::h8ba2715bc1c607a1 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityGetFlags, referenced from:
system_configuration::network_reachability::SCNetworkReachability::reachability::h473fdb2b399e1fe7 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityScheduleWithRunLoop, referenced from:
system_configuration::network_reachability::SCNetworkReachability::schedule_with_runloop::h486ddedc15c59d7f in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkReachabilityUnscheduleFromRunLoop, referenced from:
system_configuration::network_reachability::SCNetworkReachability::unschedule_from_runloop::h8fe75c704defada3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkServiceCopyAll, referenced from:
system_configuration::network_configuration::SCNetworkService::get_services::h6748b9b8a830578d in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkServiceGetEnabled, referenced from:
system_configuration::network_configuration::SCNetworkService::enabled::ha7da5a9f0f84e69a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkServiceGetInterface, referenced from:
system_configuration::network_configuration::SCNetworkService::network_interface::h385789985db8e4aa in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkServiceGetServiceID, referenced from:
system_configuration::network_configuration::SCNetworkService::id::h8515f069c7580bb1 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkSetCopyCurrent, referenced from:
system_configuration::network_configuration::SCNetworkSet::new::h036e026faf48eba5 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_SCNetworkSetGetServiceOrder, referenced from:
system_configuration::network_configuration::SCNetworkSet::service_order::h6c67a457b9b9b85e in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCDynamicStoreUseSessionKeys, referenced from:
system_configuration::dynamic_store::SCDynamicStoreBuilder$LT$T$GT$::create_store_options::ha0e8653be94a3042 in librust_lib.a[arm64][145](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.08.rcgu.o)
_kSCNetworkInterfaceType6to4, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeBluetooth, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeBond, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeBridge, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeEthernet, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeFireWire, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeIEEE80211, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeIPSec, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeIPv4, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeIrDA, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeL2TP, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeModem, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypePPP, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypePPTP, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeSerial, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeVLAN, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCNetworkInterfaceTypeWWAN, referenced from:
system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
_kSCPropNetProxiesHTTPEnable, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
_kSCPropNetProxiesHTTPPort, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
_kSCPropNetProxiesHTTPProxy, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
_kSCPropNetProxiesHTTPSEnable, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
_kSCPropNetProxiesHTTPSPort, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
_kSCPropNetProxiesHTTPSProxy, referenced from:
reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
Building macOS application...
Exception: Build process failed
This occurs either on a Mac with an M1 processor or with an M3 pro, to make it happen just simply add the Reqwest dependency to the file.
use reqwest;
Thinking that this error could be caused by the Cargokit configuration that uses flutter rust bridge, I made the configuration manually and the error occurs again. I also tried to use Surf in case the problem was in Reqwest itself and the error is as follows:
akalugo@MBPdeAlejandro my_app % flutter run
Connected devices:
macOS (desktop) β’ macos β’ darwin-arm64 β’ macOS 14.2.1 23C71 darwin-arm64
Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 120.0.6099.129
Checking for wireless devices...
[1]: macOS (macos)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006030-000E09490AD0001C }
{ platform:macOS, arch:x86_64, id:00006030-000E09490AD0001C }
ld: Undefined symbols:
_curl_easy_cleanup, referenced from:
_$LT$curl..easy..handler..Easy2$LT$H$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hcaeb10b2cfda84dd in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
_$LT$curl..easy..handler..Easy2$LT$H$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hd335fadaff0ae0f3 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_escape, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::url_encode::hab7cdda36d5ca71a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_getinfo, referenced from:
isahc::handler::RequestHandler::get_primary_ip::hac006a2eaabcfb80 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
isahc::handler::RequestHandler::get_primary_port::h741914678a0daa7f in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
isahc::handler::RequestHandler::get_local_ip::h37667b45d918ca65 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
isahc::handler::RequestHandler::get_local_port::h03f235b7ebe1c0e4 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
_$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
...
_curl_easy_init, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::new::h54ae3033228d88ff in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::new::hf2f843ca13d3cb1a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_pause, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::unpause_read::he2f07267981dbc9b in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::unpause_write::hdefb28190196e0c7 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::unpause_read::ha1cb79301716152e in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::unpause_write::h96842eaea3dc67ae in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_perform, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::perform::h51aa1ccda1b1cfea in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_recv, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::recv::hc9cde2f6bedbeb87 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_reset, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::reset::h72694cb0bc1245bf in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_send, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::send::h01c5b16da62d77e0 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_easy_setopt, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::setopt_ptr::h93c3458cd5b90fde in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::setopt_long::h45fa44d494ad9444 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::setopt_off_t::h12abdae596eca021 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
_$LT$isahc..config..dns..DnsCache$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h796e1bf73ab85c22 in librust_lib.a[arm64][295](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.08.rcgu.o)
curl::multi::Easy2Handle$LT$H$GT$::set_token::h2f6d0bce5b3f249d in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
_$LT$isahc..config..NetworkInterface$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h01577c134232cd37 in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
_$LT$isahc..config..AutomaticDecompression$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h4c93445de5e2f12c in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
...
_curl_easy_strerror, referenced from:
curl::error::Error::description::h1523a51703a60c7f in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
_curl_easy_unescape, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::url_decode::h67ff697569e18e3f in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_formadd, referenced from:
curl::easy::form::Part::add::h0666c18764b742ff in librust_lib.a[arm64][367](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.7.rcgu.o)
_curl_formfree, referenced from:
_$LT$curl..easy..form..Form$u20$as$u20$core..ops..drop..Drop$GT$::drop::h18055e4e4669de4f in librust_lib.a[arm64][367](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.7.rcgu.o)
_curl_free, referenced from:
curl::easy::handler::Easy2$LT$H$GT$::url_encode::hab7cdda36d5ca71a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
curl::easy::handler::Easy2$LT$H$GT$::url_decode::h67ff697569e18e3f in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
_curl_global_init, referenced from:
curl::init::_$u7b$$u7b$closure$u7d$$u7d$::hfba944e770deaf65 in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
_curl_multi_add_handle, referenced from:
curl::multi::Multi::add2::h51a2eb47990f058c in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
curl::multi::Multi::add::h513600e42c7539b0 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_assign, referenced from:
curl::multi::Multi::assign::h50f09520a43d7dba in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_cleanup, referenced from:
_$LT$curl..multi..RawMulti$u20$as$u20$core..ops..drop..Drop$GT$::drop::h9bd1dd9dd1188893 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_fdset, referenced from:
curl::multi::Multi::fdset2::hdbb584ab76276f6a in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_info_read, referenced from:
curl::multi::Multi::_messages::h48df6cc7458580dc in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_init, referenced from:
curl::multi::Multi::new::hed4ddcf61577a93b in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_perform, referenced from:
curl::multi::Multi::perform::h6962f22302a69742 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_remove_handle, referenced from:
curl::multi::DetachGuard::detach::h30665dc45a78ae1a in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_setopt, referenced from:
curl::multi::Multi::setopt_long::ha478189f0a0f8750 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
curl::multi::Multi::setopt_ptr::hfdcc28c2293366c0 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_socket_action, referenced from:
curl::multi::Multi::action::hf9afcc490c381c3d in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
curl::multi::Multi::timeout::h2e5dcd3b1ce0f760 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_strerror, referenced from:
curl::error::MultiError::description::h775a2b4625681ed9 in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
_curl_multi_timeout, referenced from:
curl::multi::Multi::get_timeout::h4a2f99ad92c66db2 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_multi_wait, referenced from:
curl::multi::Multi::wait::h356a6528cb1b5037 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
_curl_share_strerror, referenced from:
curl::error::ShareError::description::h66deae251fbb4cda in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
_curl_slist_append, referenced from:
curl::easy::list::List::append::h58e2776a75a8120c in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
_curl_slist_free_all, referenced from:
_$LT$curl..easy..list..List$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0854b9ceb500b409 in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
_curl_version, referenced from:
curl::version::Version::num::h6f468b454888c475 in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
_curl_version_info, referenced from:
curl::version::Version::get::he2a4eb089732cf4e in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
Building macOS application...
Exception: Build process failed
To replicate any of the examples simply:
Cargokit should detect that NDK is missing for provided minSdkVersion and either fail with error or choose the correct version.
Otherwise it may fail after flutter update, requiring users to manually do flutter clean
.
dlopen failed: cannot locate symbol "__extenddftf2"
specifically
Discussion of the issue: termux/termux-packages#8029
termux/termux-packages#8029 (comment) may work. What would the best way be to pass something like this LDFLAGS through to cargokit?
I believe it would only be required for Android when Linux is the host system. I did not run into this while building for Android on MacOS.
Possibly related to #23
Could be used to vendor prebuilt binaries in offline or restricted environment
Works ok on android, fails on iOS. Build on OSX
Created release [iOS-prod] 1.0.0 (43)@1.0.0+1
[ββββββββββββββββββββββ] 27% uploading source maps..
> Rewriting sources
> Adding source map references
> Nothing to upload
error: /Users/tomasradvansky/actions-runner-2/_work/backyard-hunt/backyard-hunt/app/build/ios/Release-prod-iphoneos/super_native_extensions/cargokit_phony: IO error for operation on /Users/tomasradvansky/actions-runner-2/_work/backyard-hunt/backyard-hunt/app/build/ios/Release-prod-iphoneos/super_native_extensions/cargokit_phony: No such file or directory (os error 2)
I tried to navigate there...there is only symlink, which leads nowhere
Right now it computes hash of Cargo.toml
, Cargo.lock
, cargokit.yaml
and all rust files inside crate. However it is possible for Cargo.toml
to reference another crates by path that are part of same plugin and the current algorithm will not detect changes in those.
Crate-hash should attempt to find path dependencies from Cargo.toml
and follow them.
Some crates may be configured through environment variables
Hi, @knopp,
Thank you for providing this great project.
I try to understand the specific implementation of cargokit on different platforms:
Target | Toolchains | Type | Suffix |
---|---|---|---|
Android | GradleΒ | cdylib | .so |
iOS | Cocoapods | staticlib | .a |
macOS | Cocoapods | staticlib | .a |
Windows | cmake | cdylib | .dll |
Linux | cmake | cdylib | .so |
Is this a reasonable summary?
btw:
The name of file build_android.rs
and function build_android()
not was build_gradle
, is there any special consideration for doing this?
How do you think that change name build_android
to build_gradle
without any logic changes?(like #5 )
Key note: this happened while trying to use flutter_rust_bridge v2, but as far as I can tell the Cargokit aspect is what's causing the error
When running flutter run -v
I got this error:
[ +10 ms] executing: uname -m
[ +10 ms] Exit code 0 from: uname -m
[ ] x86_64
[ +50 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +42 ms] executing: /home/clock/Android/Sdk/platform-tools/adb devices -l
[ +46 ms] List of devices attached
[ +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +68 ms] Skipping pub get: version match.
[ +71 ms] Found plugin rust_builder at /home/clock/Documents/Scripts/Flutter/my_app/rust_builder/
[ +22 ms] Found plugin integration_test at /home/clock/snap/flutter/common/flutter/packages/integration_test/
[ +46 ms] Found plugin rust_builder at /home/clock/Documents/Scripts/Flutter/my_app/rust_builder/
[ +10 ms] Found plugin integration_test at /home/clock/snap/flutter/common/flutter/packages/integration_test/
[ +41 ms] Found plugin rust_builder at /home/clock/Documents/Scripts/Flutter/my_app/rust_builder/
[ +8 ms] Found plugin integration_test at /home/clock/snap/flutter/common/flutter/packages/integration_test/
[ +68 ms] Generating /home/clock/Documents/Scripts/Flutter/my_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +83 ms] Initializing file store
[ +7 ms] Skipping target: gen_localizations
[ +3 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /home/clock/Documents/Scripts/Flutter/my_app/.dart_tool/package_config_subset}
[ +28 ms] Found plugin rust_builder at /home/clock/Documents/Scripts/Flutter/my_app/rust_builder/
[ +6 ms] Found plugin integration_test at /home/clock/snap/flutter/common/flutter/packages/integration_test/
[ +3 ms] gen_dart_plugin_registrant: Complete
[ ] Skipping target: _composite
[ +1 ms] complete
[ +3 ms] Launching lib/main.dart on Linux in debug mode...
[ +3 ms] /home/clock/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/clock/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root /home/clock/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/6e2ea58a5ccbefcfadc2d4b7b8045fc6c20ab812/ --output-dill /tmp/flutter_tools.JXVTKX/flutter_tool.FAAUFT/app.dill --packages /home/clock/Documents/Scripts/Flutter/my_app/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/b01ca64756e6102cf66a48c2b6c3089e.cache.dill.track.dill --verbosity=error --enable-experiment=alternative-invalidation-strategy
[ +15 ms] Building Linux application...
[ +6 ms] <- compile package:my_app/main.dart
[ +2 ms] executing: [build/linux/x64/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFLUTTER_TARGET_PLATFORM=linux-x64 /home/clock/Documents/Scripts/Flutter/my_app/linux
[ +35 ms] -- Configuring done
[ +7 ms] -- Generating done
[ ] -- Build files have been written to: /home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug
[ +4 ms] executing: ninja -C build/linux/x64/debug install
[ +11 ms] ninja: Entering directory `build/linux/x64/debug'
[ +847 ms] [1/7] Generating librust_lib.so, _phony_
[ ] FAILED: plugins/rust_builder/librust_lib.so plugins/rust_builder/_phony_
[ +32 ms] cd /home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder && /var/lib/snapd/snap/flutter/145/usr/bin/cmake -E env CARGOKIT_CMAKE=/var/lib/snapd/snap/flutter/145/usr/bin/cmake CARGOKIT_CONFIGURATION=Debug CARGOKIT_MANIFEST_DIR=/home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/.plugin_symlinks/rust_builder/linux/../../rust CARGOKIT_TARGET_TEMP_DIR=/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build CARGOKIT_OUTPUT_DIR=/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder CARGOKIT_TARGET_PLATFORM=linux-x64 CARGOKIT_TOOL_TEMP_DIR=/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/tool CARGOKIT_ROOT_PROJECT_DIR=/home/clock/Documents/Scripts/Flutter/my_app/linux /home/clock/Documents/Scripts/Flutter/my_app/rust_builder/cargokit/run_build_tool.sh build-cmake
[ ] INFO: Precompiled binaries are disabled
[ ] INFO: Building rust_lib for x86_64-unknown-linux-gnu
[ ] SEVERE: ================================================================================
[ ] SEVERE: Cargokit BuildTool failed with error:
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: External Command: rustup "run" "stable" "cargo" "build" "--manifest-path" "/home/clock/Documents/Scripts/Flutter/my_app/rust/Cargo.toml" "-p" "rust_lib" "--target" "x86_64-unknown-linux-gnu" "--target-dir" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build"
[ ] SEVERE: Returned Exit Code: 101
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: STDOUT:
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: STDERR:
[ ] SEVERE: Compiling libc v0.2.150
[ ] SEVERE: Compiling proc-macro2 v1.0.70
[ ] SEVERE: Compiling futures-core v0.3.29
[ +1 ms] SEVERE: |
[ +32 ms] SEVERE: = note: LC_ALL="C" PATH="/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/home/clock/.cargo/bin:/home/clock/.local/bin:/home/clock/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin:/home/clock/.local/share/JetBrains/Toolbox/scripts" VSLANG="1033" "cc" "-m64" "/tmp/rustcRjhy73/symbols.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/futures-core-ac0ceb7b2f28e98a/build_script_build-ac0ceb7b2f28e98a.build_script_build.d25c1545b1c73a89-cgu.0.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/futures-core-ac0ceb7b2f28e98a/build_script_build-ac0ceb7b2f28e98a.4abliq7sef41tist.rcgu.o" "-Wl,--as-needed" "-L" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/deps" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-90f6ddbf82de36ec.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-480c41e9d4e1f677.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-db744c0ca03eed1d.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-8ba652dc7d4b285a.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d5f4520a9ebc0d58.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-4ad84de58f0cb463.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0d10aae2e0f38735.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-0c17cff739e6745b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b29e17139dde1aa8.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1f975299829cc7bd.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86bae3bc3079f89b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-321b82c30dffdf5f.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3dd8a6810a0bdfef.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eb39a61c0c879984.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aa769569f91c3548.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-510a192a50a983ed.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-0577018320f99037.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-193cf992125ccd4c.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/futures-core-ac0ceb7b2f28e98a/build_script_build-ac0ceb7b2f28e98a" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
[ ] SEVERE: = note: /snap/flutter/current/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /var/lib/snapd/snap/flutter/145/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so)
[ ] SEVERE:
[ ] SEVERE:
[ ] SEVERE: |
[ +40 ms] SEVERE: = note: LC_ALL="C" PATH="/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/home/clock/.cargo/bin:/home/clock/.local/bin:/home/clock/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin:/home/clock/.local/share/JetBrains/Toolbox/scripts" VSLANG="1033" "cc" "-m64" "/tmp/rustcPRFk34/symbols.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/proc-macro2-c92c3a860edceb15/build_script_build-c92c3a860edceb15.build_script_build.576210098a1e6f96-cgu.0.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/proc-macro2-c92c3a860edceb15/build_script_build-c92c3a860edceb15.build_script_build.576210098a1e6f96-cgu.1.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/proc-macro2-c92c3a860edceb15/build_script_build-c92c3a860edceb15.build_script_build.576210098a1e6f96-cgu.2.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/proc-macro2-c92c3a860edceb15/build_script_build-c92c3a860edceb15.1n5fioobf9hneoif.rcgu.o" "-Wl,--as-needed" "-L" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/deps" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-90f6ddbf82de36ec.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-480c41e9d4e1f677.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-db744c0ca03eed1d.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-8ba652dc7d4b285a.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d5f4520a9ebc0d58.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-4ad84de58f0cb463.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0d10aae2e0f38735.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-0c17cff739e6745b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b29e17139dde1aa8.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1f975299829cc7bd.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86bae3bc3079f89b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-321b82c30dffdf5f.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3dd8a6810a0bdfef.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eb39a61c0c879984.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aa769569f91c3548.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-510a192a50a983ed.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-0577018320f99037.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-193cf992125ccd4c.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/proc-macro2-c92c3a860edceb15/build_script_build-c92c3a860edceb15" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
[ ] SEVERE: = note: /snap/flutter/current/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /var/lib/snapd/snap/flutter/145/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so)
[ ] SEVERE:
[ ] SEVERE:
[ ] SEVERE: |
[ +39 ms] SEVERE: = note: LC_ALL="C" PATH="/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/home/clock/.cargo/bin:/home/clock/.local/bin:/home/clock/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin:/home/clock/.local/share/JetBrains/Toolbox/scripts" VSLANG="1033" "cc" "-m64" "/tmp/rustcNxWT1v/symbols.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c.build_script_build.ffd6dcc343eebd25-cgu.0.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c.build_script_build.ffd6dcc343eebd25-cgu.1.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c.build_script_build.ffd6dcc343eebd25-cgu.2.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c.build_script_build.ffd6dcc343eebd25-cgu.3.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c.4w6glr9qhs0js7hq.rcgu.o" "-Wl,--as-needed" "-L" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/deps" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-90f6ddbf82de36ec.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-480c41e9d4e1f677.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-db744c0ca03eed1d.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-8ba652dc7d4b285a.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d5f4520a9ebc0d58.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-4ad84de58f0cb463.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0d10aae2e0f38735.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-0c17cff739e6745b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b29e17139dde1aa8.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1f975299829cc7bd.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86bae3bc3079f89b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-321b82c30dffdf5f.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3dd8a6810a0bdfef.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eb39a61c0c879984.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aa769569f91c3548.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-510a192a50a983ed.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-0577018320f99037.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-193cf992125ccd4c.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-1992b43e8ef77a2c/build_script_build-1992b43e8ef77a2c" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
[ ] SEVERE: = note: /snap/flutter/current/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /var/lib/snapd/snap/flutter/145/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so)
[ ] SEVERE:
[ ] SEVERE:
[ ] SEVERE: |
[ +37 ms] SEVERE: = note: LC_ALL="C" PATH="/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/snap/flutter/current/usr/bin:/snap/flutter/current/bin:/home/clock/snap/flutter/common/flutter/bin:/home/clock/.cargo/bin:/home/clock/.local/bin:/home/clock/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/var/lib/snapd/snap/bin:/home/clock/.local/share/JetBrains/Toolbox/scripts" VSLANG="1033" "cc" "-m64" "/tmp/rustcbQ0BV2/symbols.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84.build_script_build.76299e2f9fc855d6-cgu.0.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84.build_script_build.76299e2f9fc855d6-cgu.1.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84.build_script_build.76299e2f9fc855d6-cgu.2.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84.build_script_build.76299e2f9fc855d6-cgu.3.rcgu.o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84.1fyhyr36cs06t5e5.rcgu.o" "-Wl,--as-needed" "-L" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/deps" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-90f6ddbf82de36ec.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-480c41e9d4e1f677.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-db744c0ca03eed1d.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-8ba652dc7d4b285a.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d5f4520a9ebc0d58.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-4ad84de58f0cb463.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0d10aae2e0f38735.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-0c17cff739e6745b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b29e17139dde1aa8.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1f975299829cc7bd.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86bae3bc3079f89b.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-321b82c30dffdf5f.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3dd8a6810a0bdfef.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eb39a61c0c879984.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aa769569f91c3548.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-510a192a50a983ed.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-0577018320f99037.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-193cf992125ccd4c.rlib" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/clock/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build/debug/build/libc-7b846dcdd0c2ec84/build_script_build-7b846dcdd0c2ec84" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
[ ] SEVERE: = note: /snap/flutter/current/usr/bin/ld: /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so: error loading plugin: /var/lib/snapd/snap/flutter/145/usr/bin/../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so)
[ ] SEVERE:
[ ] SEVERE:
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: #0 runCommand (package:build_tool/src/util.dart:121:5)
[ ] SEVERE: #1 RustBuilder.build (package:build_tool/src/builder.dart:142:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #2 ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:71:25)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #3 BuildCMake.build (package:build_tool/src/build_cmake.dart:29:23)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #4 BuildCMakeCommand.runBuildCommand (package:build_tool/src/build_tool.dart:79:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #5 BuildCommand.run (package:build_tool/src/build_tool.dart:37:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: #7 runMain (package:build_tool/src/build_tool.dart:251:5)
[ ] SEVERE: <asynchronous suspension>
[ ] SEVERE: --------------------------------------------------------------------------------
[ ] SEVERE: BuildTool arguments: [build-cmake]
[ ] SEVERE: ================================================================================
[+1107 ms] [2/7] Generating /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/libflutter_linux_gtk.so, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_value.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/fl_view.h, /home/clock/Documents/Scripts/Flutter/my_app/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[ ] [ +44 ms] executing: uname -m
[ ] [ +16 ms] Exit code 0 from: uname -m
[ ] [ ] x86_64
[ ] [ +52 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ ] [ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ +180 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ +4 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ ] [ +57 ms] Initializing file store
[ ] [ +12 ms] Done initializing file store
[ ] [ +54 ms] Skipping target: native_assets
[ ] [ +1 ms] Skipping target: gen_localizations
[ ] [ +1 ms] Skipping target: gen_dart_plugin_registrant
[ ] [ +556 ms] Skipping target: unpack_linux
[ ] [ +371 ms] Skipping target: kernel_snapshot
[ ] [ +263 ms] Skipping target: debug_bundle_linux-x64_assets
[ ] [ ] Persisting file store
[ ] [ +10 ms] Done persisting file store
[ ] [ +5 ms] build succeeded.
[ ] [ +9 ms] "flutter assemble" took 1,548ms.
[ ] [ +2 ms] Running 0 shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ ] exiting with code 0
[ ] ninja: build stopped: subcommand failed.
[ +11 ms] Building Linux application... (completed in 2,221ms)
[ +3 ms] "flutter run" took 10,584ms.
[ +1 ms] Running 1 shutdown hook
[ +3 ms] Shutdown hooks complete
[ ] exiting with code 1
On line 61 Cargokit BuildTool fails when trying to run an external command:
rustup "run" "stable" "cargo" "build" "--manifest-path" "/home/clock/Documents/Scripts/Flutter/my_app/rust/Cargo.toml" "-p" "rust_lib" "--target" "x86_64-unknown-linux-gnu" "--target-dir" "/home/clock/Documents/Scripts/Flutter/my_app/build/linux/x64/debug/plugins/rust_builder/cargokit_build"
However, when running this command manually from a terminal it compiled & ran just fine! After running flutter clean
to start anew, it yields the same error. My best guess is that it's some permission issue with the Flutter Snap package, but that's about all I've got
Using the default config of cargokit with Flutter Rust Bridge V2, I observed that the panic backtrace works well on iOS. However, when I tested on Android, I noticed that the debug symbols are redacted as s.
I tested the panic backtrace using backtrace-rs and sentry-rust's panic monitoring mechanism. Flutter was ran under the debug mode with no modification to cargokit's configurations. I also tested on both a real Android 10 device and a Android 14 simulator. All experiments produced the same result: full trace on iOS but redacted trace on Android. I think this maybe due to missing debug symbols for Android.
Here are the panic backtraces for iOS and Android:
PanicException(Jan 3 panic test! 0: backtrace::backtrace::trace_unsynchronized
1: backtrace::backtrace::trace
2: backtrace::capture::Backtrace::create
3: backtrace::capture::Backtrace::new
4: flutter_rust_bridge::misc::panic_backtrace::PanicBacktrace::setup::{{closure}}
5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
6: <sentry_panic::PanicIntegration as sentry_core::integration::Integration>::setup::{{closure}}::{{closure}}
7: std::panicking::rust_panic_with_hook
8: std::panicking::begin_panic_handler::{{closure}}
9: std::sys_common::backtrace::__rust_end_short_backtrace
10: _rust_begin_unwind
11: core::panicking::panic_fmt
12: rust_lib::api::api::combined_search
13: rust_lib::frb_generated::wire_combined_search_impl::{{closure}}::{{closure}}::{{closure}}
14: rust_lib::frb_generated::wire_combined_search_impl::{{closure}}::{{closure}}
15: <flutter_rust_bridge::handler::implementation::executor::SimpleExecutor<EL,TP,AR> as flutter_rust_bridge::handler::executor::Executor>::execute_normal::{{closure}}::{{closure}}
16: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
17: std::panicking::try::do_call
18: ___rust_try
19: std::panicking::try
20: std::panic::catch_unwind
21: flutter_rust_bridge::misc::panic_backtrace::PanicBacktrace::catch_unwind
22: <flutter_rust_bridge::handler::implementation::executor::SimpleExecutor<EL,TP,AR> as flutter_rust_bridge::handler::executor::Executor>::execute_normal::{{closure}}
23: <F as threadpool::FnBox>::call_box
24: threadpool::spawn_in_pool::{{closure}}
25: std::sys_common::backtrace::__rust_begin_short_backtrace
26: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
27: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
28: std::panicking::try::do_call
29: ___rust_try
30: std::panicking::try
31: std::thread::Builder::spawn_unchecked_::{{closure}}
32: core::ops::function::FnOnce::call_once{{vtable.shim}}
33: std::sys::unix::thread::Thread::new::thread_start
34: <unknown>
)
PanicException(Jan 3 panic test! 0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: <unknown>
10: <unknown>
11: <unknown>
12: <unknown>
13: <unknown>
14: <unknown>
15: <unknown>
16: <unknown>
17: <unknown>
18: <unknown>
19: <unknown>
20: <unknown>
21: <unknown>
22: <unknown>
23: <unknown>
24: <unknown>
25: <unknown>
26: <unknown>
27: <unknown>
28: <unknown>
29: <unknown>
30: _ZL15__pthread_startPv
31: __start_thread
)
Target | Absolute path | Relative path |
---|---|---|
Android | β | β |
iOS | β | β |
macOS | β | β |
Linux | β | β |
Windows | β | β |
Currently, we cannot provide absolute path to Cmake and gradle. For cocoapods, it is possible. Can this be improved either with direct commit or PR?
Hi, I find this package and it seems to be quite interesting - it was nontrivial to set up a Rust+Flutter project in the old days! Therefore, I wonder when will it be published to pub.dev? (A quick search does not seem to show any results yet.) I am hoping to integrate it into flutter_rust_bridge as one of the ways to build a sample project.
P.S. You have many more merged PRs into Flutter than me! I only have 19 (flutter/engine) + 55 (flutter/flutter), but this number need to exclude some tiny ones (mainly shown in the title, especially the first page).
Hi, I'm using flutter_rust_bridge V2 which uses cargokit under the hood. I noticed that when I have a compiler error in my Rust code, it's not showing up when executing flutter run
. Instead, there's only a mysterious one-liner error message: Could not build the precompiled application for the device
.
I had to do flutter run -v
, browse through the massive trace, and finally find out that the rust library is messed up due to the overwrite. So currently as a workaround, I've been manually running cargo build
to see if my Rust is free of any compiler errors, before executing flutter run
.
I think it'd be nice to show the compiler errors at the default log level when executing flutter run
, so that the user is aware of why the build failed.
I have already posted this to the flutter_rust_bridge repo and they told me to go here.
I have manually installed flutter and android sdk and ndk. I can build the basic example for linux, but for android it can not find the core crate, even though I have the rust targets installed. I ran the suggested command but it did not help, I do have the targets installed as you can see from the logs posted below.
Steps to reproduce
flutter_rust_bridge_codegen create osc3
cd osc3/
flutter build apk
`SEVERE: ================================================================================
SEVERE: Cargokit BuildTool failed with error:
SEVERE: --------------------------------------------------------------------------------
SEVERE: External Command: rustup "run" "stable" "cargo" "build" "--manifest-path" "/home/iota/Code/testing/osc3/rust/Cargo.toml" "-p" "rust_lib_osc3" "--release" "--target" "armv7-linux-androideabi" "--target-dir" "/home/iota/Code/testing/osc3/build/rust_lib_osc3/build"
SEVERE: Returned Exit Code: 101
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDOUT:
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDERR:
SEVERE: Compiling memchr v2.6.4
SEVERE: Compiling libc v0.2.150
SEVERE: Compiling proc-macro2 v1.0.70
SEVERE: Compiling unicode-ident v1.0.12
SEVERE: error[E0463]: can't find crate for `core`
SEVERE: |
SEVERE: = note: the `armv7-linux-androideabi` target may not be installed
SEVERE: = help: consider downloading the target with `rustup target add armv7-linux-androideabi`
SEVERE:
SEVERE: For more information about this error, try `rustc --explain E0463`.
SEVERE: error: could not compile `memchr` (lib) due to 1 previous error
SEVERE: warning: build failed, waiting for other jobs to finish...
SEVERE: --------------------------------------------------------------------------------
SEVERE: #0 runCommand (package:build_tool/src/util.dart:121:5)
SEVERE: #1 RustBuilder.build (package:build_tool/src/builder.dart:142:5)
SEVERE: <asynchronous suspension>
SEVERE: #2 ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:71:25)
SEVERE: <asynchronous suspension>
SEVERE: #3 BuildGradle.build (package:build_tool/src/build_gradle.dart:35:23)
SEVERE: <asynchronous suspension>
SEVERE: #4 BuildGradleCommand.runBuildCommand (package:build_tool/src/build_tool.dart:65:5)
SEVERE: <asynchronous suspension>
SEVERE: #5 BuildCommand.run (package:build_tool/src/build_tool.dart:37:5)
SEVERE: <asynchronous suspension>
SEVERE: #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
SEVERE: <asynchronous suspension>
SEVERE: #7 runMain (package:build_tool/src/build_tool.dart:251:5)
SEVERE: <asynchronous suspension>
SEVERE: --------------------------------------------------------------------------------
SEVERE: BuildTool arguments: [build-gradle]
SEVERE: ================================================================================
FAILURE: Build failed with an exception.
* Where:
Script '/home/iota/Code/testing/osc3/rust_builder/cargokit/gradle/plugin.gradle' line: 68
* What went wrong:
Execution failed for task ':rust_lib_osc3:cargokitCargoBuildRust_lib_osc3Release'.
> Process 'command '/home/iota/Code/testing/osc3/rust_builder/cargokit/gradle/../run_build_tool.sh'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 22s
$ rustup target list --installed
aarch64-linux-android
armv7-linux-androideabi
i686-linux-android
x86_64-linux-android
x86_64-unknown-linux-gnu
I've encountered an issue while attempting to run Android, and I've come here seeking assistance. The error I'm facing is:
[ ] SEVERE: running: cd "/Users/Mnieme/projects/frb_libs/demo_app/build/rust_builder/build/aarch64-linux-android/debug/build/dart-rs-sys-26e25a64cb835ebf/out/build" && CMAKE_PREFIX_PATH="" "cmake" "-Wdev" "--debug-output" "/Users/Mnieme/projects/frb_libs/demo_app/build/rust_builder/build/aarch64-linux-android/debug/build/dart-rs-sys-26e25a64cb835ebf/out/" "-DBUILD_SHARED_LIBS=OFF" "-DWHISPER_ALL_WARNINGS=OFF" "-DWHISPER_ALL_WARNINGS_3RD_PARTY=OFF" "-DWHISPER_BUILD_TESTS=OFF" "-DWHISPER_BUILD_EXAMPLES=OFF" "-DWHISPER_METAL=OFF" "-DCMAKE_SYSTEM_NAME=Android" "-DCMAKE_SYSTEM_PROCESSOR=aarch64" "-DCMAKE_INSTALL_PREFIX=/Users/Mnieme/projects/frb_libs/demo_app/build/rust_builder/build/aarch64-linux-android/debug/build/dart-rs-sys-26e25a64cb835ebf/out" "-DCMAKE_C_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC --target=aarch64-linux-android --target=aarch64-linux-android21" "-DCMAKE_C_COMPILER=/Users/Mnieme/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" "-DCMAKE_CXX_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC --target=aarch64-linux-android --target=aarch64-linux-android21" "-DCMAKE_CXX_COMPILER=/Users/Mnieme/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++" "-DCMAKE_ASM_FLAGS= -DANDROID -ffunction-sections -fdata-sections -fPIC --target=aarch64-linux-android --target=aarch64-linux-android21" "-DCMAKE_ASM_COMPILER=/Users/Mnieme/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
[ ] SEVERE: Running with debug output on.
[ ] SEVERE: -- Configuring incomplete, errors occurred!
[ ] SEVERE:
[ ] SEVERE: --- stderr
[ ] SEVERE: CMake Error at /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/Platform/Android-Determine.cmake:217 (message):
[ ] SEVERE: Android: Neither the NDK or a standalone toolchain was found.
[ ] SEVERE: Call Stack (most recent call first):
[ ] SEVERE: /opt/homebrew/Cellar/cmake/3.28.1/share/cmake/Modules/CMakeDetermineSystem.cmake:212 (include)
[ ] SEVERE: CMakeLists.txt:3 (project)
I have installed CMake and NDK using Android Studio. Additionally, I attempted to install CMake and Android NDK using Homebrew, and I added the environment paths for NDKs. However, the error persists.
Could someone provide guidance on resolving this issue? Any help would be greatly appreciated.
Hello, I am trying to compile for Android a C library that needs to be compiled separately for every Android architecture.
This C library is a dependency of a rust library which in turn is also dependency of another rust library which is dependency of the hub crate of rinf. rinf uses Cargokit under the hood.
The rust library hub is depending on has a build.rs file where I build the C library.
The C library is building fine, and I can even use it in my crate Rust tests .
But when running the Android app, on startup I get this error:
E/flutter (23507): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libhub.so': dlopen failed: cannot locate symbol "_ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev" referenced by "/data/app/~~J4JqwUrdz54b5jQTjobuHg==/security.planck.phoenix-uCymzZHJOoinr6TH7XUveg==/base.apk!/lib/arm64-v8a/libhub.so"...
E/flutter (23507): #0 _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
E/flutter (23507): #1 new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
E/flutter (23507): #2 loadRustLibrary (package:rinf/src/load_os.dart:25:27)
E/flutter (23507): #3 rustLibrary (package:rinf/src/load_os.dart:5:21)
E/flutter (23507): #4 rustLibrary (package:rinf/src/load_os.dart)
E/flutter (23507): #5 prepareInterfaceReal (package:rinf/src/interface_os.dart:21:24)
E/flutter (23507): #6 initializeRust (package:rinf/rinf.dart:17:9)
The problem seems to be that the build is not linking with the standard ndk C++ library (like libc++_shared.so).
Also in my Rust crate's build.rs I printed the env variables, and some are set by Cargokit.
I get some env vars that look a bit strange, like for example:
CC_aarch64-linux-android: /Users/ignaciogarcia/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
Somehow the target arch is not included in these vars... like I would be expecting something like
/Users/ignaciogarcia/Library/Android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android21-clang
Please see the difference: the second path has included aarch64-linux-android21- which are the target triplet + the min android version.
When I tried to use these env vars for my compilation it did not work, so I used the ones that seemed to work, as I provided above, some of them include target arch, etc.
So I have a few questions:
Thanks in advance, regards.
We are using cargokit here: https://github.com/cypherstack/tor/tree/no_scripts
We were having issues with building for Android so updated cargokit: https://github.com/cypherstack/tor/tree/no_scripts_updated_cargokit
However, this broke running for Linux, too. (error here, verbose log here, flutter doctor output here) So we reverted to the older cargokit.
Then we found this comment:
// Right now we don't support cross-compiling on Linux. So we just return
// the host target.
So, we are wondering if there's a good direction to go in in order to enable cross-compiling for Android from Linux. Got any pointers? We'd love to help get this working better
We would also like to help fix running on Linux with the updated cargokit instead of using the older version from https://github.com/irondash/hello_rust_ffi_plugin
Thanks!
Hi, nice work!
I run into a small problem, where cargokit fails if rustup esp toolchain is installed:
$ rustup target list --toolchain esp --installed
error: toolchain 'esp' does not support components: esp is a custom toolchain
The following small hack allows cargokit to ignore the esp toolchain, and all other toolchains which fails to be queried for targets...
--- a/build_tool/lib/src/rustup.dart
+++ b/build_tool/lib/src/rustup.dart
@@ -78,19 +78,24 @@ class Rustup {
}
static List<String> _getInstalledTargets(String toolchain) {
- final res = runCommand("rustup", [
- 'target',
- 'list',
- '--toolchain',
- toolchain,
- '--installed',
- ]);
- final lines = res.stdout
- .toString()
- .split('\n')
- .where((e) => e.isNotEmpty)
- .toList(growable: true);
- return lines;
+ try {
+ final res = runCommand("rustup", [
+ 'target',
+ 'list',
+ '--toolchain',
+ toolchain,
+ '--installed',
+ ]);
+ final lines = res.stdout
+ .toString()
+ .split('\n')
+ .where((e) => e.isNotEmpty)
+ .toList(growable: true);
+ return lines;
+ } catch (e) {
+ log.warning("Ignoring toolchain: $toolchain");
+ return [];
+ }
}
bool _didInstallRustSrcForNightly = false;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.