Skip to content

[Bug]: Python GRPC Library Error #21272

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

Closed
afrhan-repo opened this issue Aug 27, 2024 · 8 comments · Fixed by #21303
Closed

[Bug]: Python GRPC Library Error #21272

afrhan-repo opened this issue Aug 27, 2024 · 8 comments · Fixed by #21303
Labels
bug report Something is not working properly

Comments

@afrhan-repo
Copy link

Problem description

Yesterday I have installed this package python-grpcio(version 1.66.1) from official termux-repo.
But when I tried to import this package I got this error.

What steps will reproduce the bug?

ipython Python 3.11.9 (main, Aug 13 2024, 11:27:10) [Clang 18.0.1 (https://android.googlesource.com/toolchain/llvm-project d8003a456 Type 'copyright', 'credits' or 'license' for more information IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import grpc ----------------------------------------------------------------------ImportError Traceback (most recent call last)Cell In[1], line 1 ----> 1 import grpc File /data/data/com.termux/files/usr/lib/python3.11/site-packages/grpc/__init__.py:22 19 import logging 20 import sys ---> 22 from grpc import _compression 23 from grpc._cython import cygrpc as _cygrpc 24 from grpc._runtime_protos import protos File /data/data/com.termux/files/usr/lib/python3.11/site-packages/grpc/_compression.py:20 17 from typing import Optional 19 import grpc ---> 20 from grpc._cython import cygrpc 21 from grpc._typing import MetadataType 23 NoCompression = cygrpc.CompressionAlgorithm.none ImportError: dlopen failed: cannot locate symbol "_ZN4absl12lts_2024011612log_internal10LogMessagelsIiTnNSt6__ndk19enable_ifIXntsr4absl16HasAbslStringifyIT_EE5valueEiE4typeELi0EEERS2_RKS6_" referenced by "/data/data/com.termux/files/usr/lib/python3.11/site-packages/grpc/_cython/cygrpc.cpython-311.so"...

What is the expected behavior?

Few weeks ago , it works perfectly fine in my project .But today I got this error.I tried to build it manually,but also failed .

If somebody could help me, thanks in advance.

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PACKAGE_VARIANT=apt-android-7
TERMUX_APP_PID=13030
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_VERSION=0.119.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.librehat.com/apt/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://termux.librehat.com/apt/termux-x11 x11 main
# sources.list.d/termux-adb.list
deb https://nohajc.github.io termux extras
# root-repo (sources.list.d/root.list)
deb https://termux.librehat.com/apt/termux-root root stable
Updatable packages:
gh/stable 2.55.0 aarch64 [upgradable from: 2.54.0]
termux-tools version:
1.43.4
Android version:
9
Kernel build information:
Linux localhost 4.4.153-perf+ #1 SMP PREEMPT Thu Sep 17 11:35:50 WIB 2020 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 5 Pro
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.styling versionCode:1000
@afrhan-repo afrhan-repo added bug report Something is not working properly untriaged labels Aug 27, 2024
@Biswa96
Copy link
Member

Biswa96 commented Aug 27, 2024

What is the output of apt info abseil-cpp?

@afrhan-repo
Copy link
Author

What is the output of apt info abseil-cpp?

Package: abseil-cpp Version: 20240116.2 Maintainer: @termux Installed-Size: 8663 kB Depends: libc++ Conflicts: libgrpc (<< 1.52.0-1) Homepage: https://abseil.io/ Download-Size: 1076 kB APT-Manual-Installed: no APT-Sources: https://termux.librehat.com/apt/termux-main stable/main aarch64 Packages Description: Abseil C++ Common Libraries

@Biswa96
Copy link
Member

Biswa96 commented Aug 27, 2024

Thank you for reporting the issue. I can reproduce it in my system and suspect that build system is using bundled abseil-cpp instead of the system one. I'll try to investigate it more.

@afrhan-repo
Copy link
Author

Do you have previous version(deb package) of abseil-cpp?
I hope after downgrading to that version,the problem will solve.

@Biswa96
Copy link
Member

Biswa96 commented Aug 27, 2024

Do you have previous version(deb package) of abseil-cpp?

Those are removed automatically after a new version. Quickly, try to downgrade to 1.66.0 or 1.65.5. You have to downgrade both python-grpcio and libgrpc.

@licy183 licy183 removed the untriaged label Aug 30, 2024
@licy183
Copy link
Member

licy183 commented Aug 30, 2024

Related to llvm/llvm-project#102443.

In short, clang changed their mangling rules since clang-18, and the symbols exported by abseil-cpp happens to trigger this. Bumping abseil-cpp and their revdeps should resolve this.

@licy183
Copy link
Member

licy183 commented Aug 31, 2024

Please install all the debs in https://github.com/termux/termux-packages/actions/runs/10645181804?pr=21303 and test if it works. Thanks!

@afrhan-repo
Copy link
Author

Please install all the debs in https://github.com/termux/termux-packages/actions/runs/10645181804?pr=21303 and test if it works. Thanks!

It's now working 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants