trobanga / flutter_btleplug

BSD 3-Clause "New" or "Revised" License
29 stars 9 forks source link

Running the script scripts/build-windows.sh results in an error #34

Closed linbiaojj closed 1 year ago

linbiaojj commented 1 year ago

This is the error log:

error: failed to run custom build command for `btleplug v0.0.0 (C:\Users\linx\Code\flutter\temp\flutter_btleplug\packages\btleplug\native)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `C:\Users\linx\Code\flutter\temp\flutter_btleplug\target\release\build\btleplug-dc55d48d09415ed7\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=src/api.rs

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: External command failure.
  Please update version of ffigen in your dev_dependencies. (version >=8.0.0, <10.0.0)

  Caused by:
      Please update version of ffigen in your dev_dependencies. (version >=8.0.0, <10.0.0)

  Stack backtrace:
     0: backtrace::backtrace::trace_unsynchronized
     1: backtrace::backtrace::trace
     2: anyhow::backtrace::capture::Backtrace::capture
     3: anyhow::backtrace::capture::Backtrace::capture
     4: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
     5: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
     6: lib_flutter_rust_bridge_codegen::frb_codegen_multi
     7: lib_flutter_rust_bridge_codegen::frb_codegen
     8: <str as alloc::string::ToString>::to_string
     9: core::ops::function::FnOnce::call_once
    10: std::sys_common::backtrace::__rust_begin_short_backtrace
    11: std::rt::lang_start::{{closure}}
    12: core::ops::function::impls::impl$2::call_once
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\ops\function.rs:287
    13: std::panicking::try::do_call
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:485
    14: std::panicking::try
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:449
    15: std::panic::catch_unwind
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panic.rs:140
    16: std::rt::lang_start_internal::closure$2
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\rt.rs:148
    17: std::panicking::try::do_call
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:485
    18: std::panicking::try
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:449
    19: std::panic::catch_unwind
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panic.rs:140
    20: std::rt::lang_start_internal
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\rt.rs:148
    21: std::rt::lang_start
    22: main
    23: invoke_main
               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
    24: __scrt_common_main_seh
               at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
    25: BaseThreadInitThunk
    26: RtlUserThreadStart', packages\btleplug\native\build.rs:30:43
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\std\src\panicking.rs:578
     1: core::panicking::panic_fmt
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\panicking.rs:67
     2: core::result::unwrap_failed
               at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library\core\src\result.rs:1687
     3: core::result::Result<T,E>::unwrap
     4: <str as alloc::string::ToString>::to_string
     5: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Flutter doctor output:

┌─────────────────────────────────────────────────────────┐
│ A new version of Flutter is available!                  │
│                                                         │
│ To update to the latest version, run "flutter upgrade". │
└─────────────────────────────────────────────────────────┘
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.10.5, on Microsoft Windows [Version 10.0.19044.3086], locale zh-CN)
    • Flutter version 3.10.5 on channel stable at C:\Users\linx\scoop\persist\fvm\versions\3.10.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (4 months ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1
    • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\linx\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Users\linx\AppData\Local\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio 生成工具 2022 17.7.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
    • Visual Studio 生成工具 2022 version 17.7.34031.279
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1.4
    • Flutter plugin version 75.1.3
    • Dart plugin version 231.9161.14

[√] VS Code (version 1.82.3)
    • VS Code at C:\Users\linx\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.74.0

[√] Connected device (3 available)
    • Windows (desktop)   • windows          • windows-x64    • Microsoft Windows [Version 10.0.19044.3086]
    • Chrome (web)        • chrome           • web-javascript • Google Chrome 117.0.5938.150
    • Edge (web)          • edge             • web-javascript • Microsoft Edge 117.0.2045.36

[√] Network resources
    • All expected network resources are available.

• No issues found!
trobanga commented 1 year ago

Hi, I'm sorry but I am currently not working on this project. However, to fix the error you should update the dependencies and see if it works then. But it's missing almost all functionality you would expect of a BLE lib...