You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
Trying to use fyne together with github.com/faiface/beep causes a linking issue when packaging for android (works fine for native)
I have seen #2064, which looks similar, but after trying the a few older version of the NDK, cleaning the build cache in between, I still get the same result.
NDK version tried:
20.1.5948944
21.4.7075529
23.0.7599858
26.1.10909125
My assumption is that both beep(based on oto) and fyne define the following symbols. This could also be an upstream gomobile bug/limitation.
Here is an error log (I have removed duplicate details):
go build -buildmode=c-shared -o /var/folders/00/z7nqwngs2psft9hb9lws8svm0000gn/T/fyne-work-646537007/lib/armeabi-v7a/libfyne_app.so fyne-app failed: exit status 1
# fyne-app
/opt/homebrew/Cellar/go/1.20.4/libexec/pkg/tool/darwin_arm64/link: running /Users/bogdan/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi21-clang failed: exit status 1
ld.lld: error: duplicate symbol: setCurrentContext
>>> defined at _cgo_export.c:25
>>> /var/folders/00/z7nqwngs2psft9hb9lws8svm0000gn/T/go-link-647208879/000020.o:(setCurrentContext)
>>> defined at _cgo_export.c:25
>>> /var/folders/00/z7nqwngs2psft9hb9lws8svm0000gn/T/go-link-647208879/000039.o:(.text+0x0)
ld.lld: error: duplicate symbol: callMain
ld.lld: error: duplicate symbol: onStart
ld.lld: error: duplicate symbol: onResume
ld.lld: error: duplicate symbol: onSaveInstanceState
ld.lld: error: duplicate symbol: onPause
ld.lld: error: duplicate symbol: onStop
ld.lld: error: duplicate symbol: onCreate
ld.lld: error: duplicate symbol: onDestroy
ld.lld: error: duplicate symbol: onWindowFocusChanged
ld.lld: error: duplicate symbol: onNativeWindowCreated
ld.lld: error: duplicate symbol: onNativeWindowRedrawNeeded
ld.lld: error: duplicate symbol: onNativeWindowDestroyed
ld.lld: error: duplicate symbol: onInputQueueCreated
ld.lld: error: duplicate symbol: onInputQueueDestroyed
ld.lld: error: duplicate symbol: onContentRectChanged
ld.lld: error: duplicate symbol: onConfigurationChanged
ld.lld: error: duplicate symbol: onLowMemory
ld.lld: error: duplicate symbol: JNI_OnLoad
ld.lld: error: duplicate symbol: ANativeActivity_onCreate
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang-17: error: linker command failed with exit code 1 (use -v to see invocation)
Checklist
Describe the bug
Trying to use fyne together with
github.com/faiface/beep
causes a linking issue when packaging for android (works fine for native)I have seen #2064, which looks similar, but after trying the a few older version of the NDK, cleaning the build cache in between, I still get the same result.
NDK version tried:
My assumption is that both
beep
(based onoto
) andfyne
define the following symbols. This could also be an upstreamgomobile
bug/limitation.Here is an error log (I have removed duplicate details):
How to reproduce
Screenshots
No response
Example code
Fyne version
2.4.1
Go compiler version
1.20.4
Operating system and version
macOS Sonoma M1
Additional Information
No response
The text was updated successfully, but these errors were encountered: