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

Failed to run g-ir-scanner #6970

Closed
leap0x7b opened this issue Jun 8, 2021 · 15 comments · Fixed by #8046
Closed

Failed to run g-ir-scanner #6970

leap0x7b opened this issue Jun 8, 2021 · 15 comments · Fixed by #8046

Comments

@leap0x7b
Copy link
Contributor

leap0x7b commented Jun 8, 2021

Problem description

g-ir-scanner states that there is no module named "girscanner._girscanner' found

Steps to reproduce

  1. Run g-ir-scanner

Expected behavior

It should work fine

Additional information

Application version:
0.113
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.org/apt/termux-main/ stable main
# game-repo (sources.list.d/game.list)
deb https://packages.termux.org/apt/termux-games games stable
# science-repo (sources.list.d/science.list)
deb https://packages.termux.org/apt/termux-science science stable
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.org/apt/termux-x11 x11 main
# unstable-repo (sources.list.d/unstable.list)
deb https://packages.termux.org/apt/termux-unstable unstable main
Updatable packages:
composer/stable 2.1.1 all [upgradable from: 2.1.0]
curl/stable 7.77.0-3 aarch64 [upgradable from: 7.77.0-2]
libcurl/stable 7.77.0-3 aarch64 [upgradable from: 7.77.0-2]
termux-tools/stable 0.124 all [upgradable from: 0.123-3]
Android version:
10
Kernel build information:
Linux localhost 4.9.190+ #2 SMP PREEMPT Mon Oct 19 13:04:42 CST 2020 aarch64 Android
Device manufacturer:
INFINIX MOBILITY LIMITED
Device model:
Infinix X680B

@thunder-coding
Copy link
Member

We don't have any package named g-ir-scanner.

If you did download the binary/tried to build the package, give some additional information about the package

@ghost
Copy link

ghost commented Jun 8, 2021

That's the part of gobject-introspection

@leap0x7b
Copy link
Contributor Author

leap0x7b commented Jun 8, 2021

We don't have any package named g-ir-scanner.

If you did download the binary/tried to build the package, give some additional information about the package

It's the part of gobject-introspection

@suhan-paradkar
Copy link
Contributor

I don't know why.. but I don't get that error...Screenshot_2021-06-08-18-50-41-39.jpg

@leap0x7b
Copy link
Contributor Author

Even when reinstalling gobject-introspection, it still doesn't work

@Yisus7u7
Copy link
Contributor

I can confirm the same error

Screenshot_20210922-133825

Now I understand why pygtk doesn't work.

@xtkoba
Copy link
Contributor

xtkoba commented Oct 7, 2021

I saw https://github.com/termux/termux-packages/actions/runs/1310039030 and noticed that the shared object for the module giscanner._giscanner is named

/data/data/com.termux/files/usr/lib/gobject-introspection/giscanner/_giscanner.cpython-38-x86_64-linux-gnu.so

which in fact targets python3.10 + aarch64.

So I wonder if the main issue can be worked around by renaming this file to

/data/data/com.termux/files/usr/lib/gobject-introspection/giscanner/_giscanner.cpython-310.so

or any other appropriate name with which the Python interpreter in use can find the file.

@ghost
Copy link

ghost commented Oct 7, 2021

x86_64 shouldn't have effect on loading of shared object. At least issues didn't happened in context of Python 3.8 / 3.9 and package borgbackup.

Most likely package just needs to be rebuilt.

@xtkoba
Copy link
Contributor

xtkoba commented Oct 7, 2021

The latest action for borgbackup (https://github.com/termux/termux-packages/actions/runs/1310038539) has shared objects named e.g.

chunker.cpython-310-x86_64-linux-gnu.so

thus the x86_64-linux-gnu part should be irrelevant. But it is odd to me that the so file built for python3.10 is annotated as cpython-38 and not cpython-310.

Anyway, by using the strace command it should be made clear whether the python interpreter is actually able to find the so file.

@xtkoba
Copy link
Contributor

xtkoba commented Oct 7, 2021

Ah, I cannot tell if it is actually built for python3.10. It does not seem to be linked against libpython3.10.so.1.0 (or any other shared library for different Python versions):

$ readelf -a _giscanner.cpython-38-x86_64-linux-gnu.so | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so]
 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

@stale
Copy link

stale bot commented Nov 21, 2021

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Issue won't be fixed. label Nov 21, 2021
@Grimler91 Grimler91 added not stale and removed wontfix Issue won't be fixed. labels Nov 22, 2021
@xtkoba
Copy link
Contributor

xtkoba commented Nov 22, 2021

Note that when a Python extension does not have libpython* as DT_NEEDED, then it may be affected by android/ndk#201.

@xtkoba

This comment has been minimized.

@xtkoba
Copy link
Contributor

xtkoba commented Nov 23, 2021

Nope, it may not work. borgbackup seems to work because the full name (e.g. chunker.cpython-310-x86_64-linux-gnu.so) is specified in loading scripts.

@xtkoba
Copy link
Contributor

xtkoba commented Nov 23, 2021

Renamed to giscanner/_giscanner.cpython-310.so. It should work.

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 a pull request may close this issue.

6 participants