Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for x86_64-android #479

Merged
merged 1 commit into from
Sep 25, 2023
Merged

workaround for x86_64-android #479

merged 1 commit into from
Sep 25, 2023

Conversation

JssDWt
Copy link
Contributor

@JssDWt JssDWt commented Sep 23, 2023

A workaround that fixes breez/c-breez#553
Recommended by @yukibtc here breez/c-breez#553 (comment)

Flutter uses sdk-core for Android, that's why this build script is put in sdk-core. It may be necessary to put it in sdk-bindings as well, for bindings for other languages that work on android, not sure.

Did a testrun with a breez-sdk-flutter release from the CI: https://github.com/breez/breez-sdk/suites/16489120334/artifacts/942132999
The testrun worked.

Copy link
Collaborator

@dangeross dangeross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Did you test the android build CI? I think it may apply to the android bindings build also

@JssDWt
Copy link
Contributor Author

JssDWt commented Sep 25, 2023

I think it may apply to the android bindings build also

I was thinking it might propagate to the sdk-bindings build, because sdk-bindings uses sdk-core. Let's add this into sdk-bindings when someone runs into the same error there.

@erdemyerebasmaz
Copy link
Contributor

erdemyerebasmaz commented Sep 25, 2023

I think it may apply to the android bindings build also

I was thinking it might propagate to the sdk-bindings build, because sdk-bindings uses sdk-core. Let's add this into sdk-bindings when someone runs into the same error there.

@ademar111190 Could you help us with this by running the Android example app you've created recently on a x86_64 emulator?
If it reproduces, please apply these changes to sdk-bindings/build.rs and test again to see if it resolves the issue. This requires NDK 23+ as it stopped distributing libgcc, which is the root cause of this issue.

@ademar111190
Copy link
Contributor

@erdemyerebasmaz yeap the error is happening; I'll try later the fix.

FATAL EXCEPTION: main
    Process: sample.sdk.breez, PID: 6184
    java.lang.UnsatisfiedLinkError: Unable to load library 'breez_sdk_bindings':
    dlopen failed: cannot locate symbol "__extenddftf2" referenced by "/data/app/~~LcWXJgm1fr3Ygm6vj7JORg==/sample.sdk.breez-sMERZDRzjZ5zbpgovkHKdQ==/lib/x86_64/libbreez_sdk_bindings.so"...
    dlopen failed: cannot locate symbol "__extenddftf2" referenced by "/data/app/~~LcWXJgm1fr3Ygm6vj7JORg==/sample.sdk.breez-sMERZDRzjZ5zbpgovkHKdQ==/lib/x86_64/libbreez_sdk_bindings.so"...
    dlopen failed: cannot locate symbol "__extenddftf2" referenced by "/data/app/~~LcWXJgm1fr3Ygm6vj7JORg==/sample.sdk.breez-sMERZDRzjZ5zbpgovkHKdQ==/lib/x86_64/libbreez_sdk_bindings.so"...
    Native library (android-x86-64/libbreez_sdk_bindings.so) not found in resource path (.)
    	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:301)

@JssDWt
Copy link
Contributor Author

JssDWt commented Sep 25, 2023

I tried a build for sdk-flutter where flutter uses sdk-bindings instead of sdk-core on an x86_64 emulator, and it worked. So the sdk-core change also propagates to sdk-bindings.

@JssDWt
Copy link
Contributor Author

JssDWt commented Sep 25, 2023

As discussed with @erdemyerebasmaz, these changes should be put in sdk-bindings/build.rs, rather than sdk-core/build.rs. This should be possible after we have merged #480

@erdemyerebasmaz erdemyerebasmaz added this to the v0.2.4 alpha milestone Sep 25, 2023
@JssDWt JssDWt force-pushed the x86_64-linker branch 2 times, most recently from 678acd4 to eb4a787 Compare September 25, 2023 17:57
@JssDWt JssDWt merged commit 1d71de6 into main Sep 25, 2023
@JssDWt JssDWt temporarily deployed to github-pages September 25, 2023 18:22 — with GitHub Actions Inactive
@JssDWt JssDWt deleted the x86_64-linker branch September 25, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flutter run fails on x86_64 emulator
5 participants