LeastAuthority / destiny

Destiny – Cross-platform Magic Wormhole graphical client
MIT License
249 stars 14 forks source link

[HELP] how do i use dart_wormhole in my app? #256

Open hedihadi opened 8 months ago

hedihadi commented 8 months ago

hello, i'm sorry for making an issue when it's not an actual issue related to this app.

i want to use magic-wormhole in my flutter app, i found this package but when i add it to my app, i get a bunch of errors. for example

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dart_wormhole_william:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `E:\Projects\Zal\github-zal\zal_app\dart_wormhole_william\android\.cxx\Debug\1w2q422g\arm64-v8a'
  [0/6] CC=C:/Users/Hedi/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang
  FAILED: libwormhole_william.so libwormhole_william.h 
  cmd.exe /C "cd /D E:\Projects\Zal\github-zal\zal_app\dart_wormhole_william\wormhole-william && set CGO_ENABLED=1&& set GOARCH=arm64&& set GOOS=android&& set CC_FOR_TARGET=C:/Users/Hedi/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang&& set CC=C:/Users/Hedi/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang&& "C:/Program Files/Go/bin/go.exe" build -buildmode=c-shared -o E:/Projects/Zal/github-zal/zal_app/dart_wormhole_william/android/.cxx/Debug/1w2q422g/arm64-v8a/libwormhole_william.so E:/Projects/Zal/github-zal/zal_app/dart_wormhole_william/android/../wormhole-william/c/ && echo "E:/Projects/Zal/github-zal/zal_app/dart_wormhole_william/android/.cxx/Debug/1w2q422g/arm64-v8a/libwormhole_william.h produced by go build""
  ninja: build stopped: subcommand failed.

  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\Hedi\\AppData\\Local\\Android\\sdk\\cmake\\3.18.1\\bin\\ninja.exe" ^
        -C ^
        "E:\\Projects\\Zal\\github-zal\\zal_app\\dart_wormhole_william\\android\\.cxx\\Debug\\1w2q422g\\arm64-v8a" ^
        bindings ^
        dart_wormhole_william_plugin
    from E:\Projects\Zal\github-zal\zal_app\dart_wormhole_william\android
  # github.com/psanford/wormhole-william/c
  c\wrapped_context.go:125:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:131:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:137:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:144:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:151:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:162:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:167:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:173:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:183:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:194:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:201:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:209:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:214:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:240:13: cannot define new methods on non-local type *C.wrapped_context_t
  c\wrapped_context.go:244:13: cannot define new methods on non-local type *C.wrapped_context_t

image

this error is after i managed to fix a bunch of other errors, but i'm totally lost here about what's the problem this time.

when checking the plugin again, i saw this image i'm not sure what this mean, does this mean i can't/shouldn't use this plugin in a different app other than this?

meejah commented 7 months ago

I don't believe any of these are under active development, but I think all that last notice means is "nobody tried to make it build anywhere else".

So probably "fork, and make it work for your case" is the best approach?