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

Unable to load libtor.so #36

Open
nns52k opened this issue Apr 22, 2024 · 5 comments
Open

Unable to load libtor.so #36

nns52k opened this issue Apr 22, 2024 · 5 comments
Labels

Comments

@nns52k
Copy link

nns52k commented Apr 22, 2024

Does anyone encounter the same problem unable to load libtor.so, when flutter run?

Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'libtor.so': dlopen failed: cannot locate symbol "__extenddftf2" referenced by "/data/app/~~rTNkc4SQHo-7fdh2bp_IVA==/com.example.flutter_project1-DWd49BnV_9C021gZ0N8MVQ==/lib/x86_64/libtor.so"...

I was able to run the official example ~/.pub-cache/hosted/pub.dev/tor-0.0.3/example/ that came with this Flutter package tor without any problem, but running the same example in my new PC, that has newer versions of everything, I got the error mentioned.

These are my tools that built the Android app that has the runtime error mentioned:

  • Flutter version: 3.19.6
  • Dart version: 3.3.4
  • Rust & Cargo version: 1.77.2
  • Cargo NDK version: 3.5.4
  • Linux distro: MX-23.2_x64 Libretto January 21, 2024

By the way, the instruction in GitHub - Foundation-Devices/tor: Tor plugin for Flutter is kind of confusing.

  1. Is pulling Cargokit into our Flutter project still a prerequsite, since these is ~/.pub-cache/hosted/pub.dev/tor-0.0.3/cargokit that came with Flutter package tor-0.0.3?
  2. Will it be more clear if we change "To (re)generate Dart bindings run just generate" to "To (re)generate Dart bindings, run just generate"?
@nns52k
Copy link
Author

nns52k commented Apr 22, 2024

Fix missing __extenddftf2 symbols for x86-64 targets by adzialocha · Pull Request #21 · p2panda/meli seems to be a work-around, but I'm not sure because I know very little about Rust. Need help from Rust programmers on this.

@icota icota added the linux label Apr 22, 2024
@nns52k
Copy link
Author

nns52k commented Apr 22, 2024

According to flutter run fails on x86_64 emulator · Issue #553 · breez/c-breez, this "cannot locate symbol "__extenddftf2"" error only happens when an app run on an Android x86_64 image.

The issue doesn't exist on ARM (running the app on a connected physical Android) or just x86 emulator images.

I just tried running the tor-0.0.3 example on an Android x86 image, and it worked. No "cannot locate symbol "__extenddftf2"" happened.

@yshwanth
Copy link

yshwanth commented Apr 23, 2024

How many build types it took android in example app ? Also how much total size of build folder ?

@nns52k
Copy link
Author

nns52k commented Apr 23, 2024

How many build types it took android in example app ? Also how much total size of build folder ?

It looks like Android NDK builds 2 libtor.so files. One is for x86_64, and another for x86.

The size of build/ folder is 6.1 GiB, if my memory is correct. I usually create the folder in a RAM disk, so as not to torture my storage device too much. It's said that too much heavy I/O operations would shorten the lifespan of the device, regardless SSD or HDD.

@sneurlax
Copy link
Collaborator

@nns52k how's it working for you lately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants