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

TensorFlow gives "Library name too long" error on 64-bit ABIs with API 21 or 22 #669

Closed
mhsmith opened this issue Aug 8, 2022 · 1 comment
Labels

Comments

@mhsmith
Copy link
Member

mhsmith commented Aug 8, 2022

Traceback (most recent call last):
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/app/chaquopy/test/tensorflow.py", line 15, in test_keras
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/app/chaquopy/test/tensorflow.py", line 19, in get_accuracy
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/app/chaquopy/test/tensorflow.py", line 25, in make_model
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow/__init__.py", line 101, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/__init__.py", line 46, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/__init__.py", line 39, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/__init__.py", line 32, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/compat/__init__.py", line 39, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/compat/v1/__init__.py", line 29, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/__init__.py", line 39, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/__init__.py", line 32, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/compat/__init__.py", line 39, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/compat/v1/__init__.py", line 49, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/lite/__init__.py", line 11, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/lite/experimental/__init__.py", line 10, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/_api/v2/compat/v1/lite/experimental/nn/__init__.py", line 10, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/lite/python/lite.py", line 34, in <module>
  File "import.pxi", line 26, in java.chaquopy.import_override
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py", line 29, in <module>
  File "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/python/framework/load_library.py", line 57, in load_op_library
tensorflow.python.framework.errors_impl.NotFoundError: dlopen failed: library name "/data/data/com.chaquo.python.pkgtest3/files/chaquopy/AssetFinder/requirements/tensorflow_core/lite/experimental/microfrontend/python/ops/_audio_microfrontend_op.so" too long

There's a 128-character limit on these devices: see notes in importer.py. This could probably be worked around by altering resource_loader.get_path_to_datafile, which is already in our TensorFlow patch. It's probably better not to call the importer's internal API directly because that would mean we can't change that API without breaking existing wheels. Copy the code instead.

When this is fixed, post an update at #228.

@mhsmith
Copy link
Member Author

mhsmith commented Nov 17, 2023

We're unlikely to update TensorFlow in the near future (#374 (comment)), and we'll also be increasing the minimum API level to 23 soon (#718).

@mhsmith mhsmith closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2023
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

1 participant