termux-pacman / glibc-packages

Glibc packages for termux
MIT License
134 stars 19 forks source link

[Bug]: i think last glibc updates have broken pieces. #181

Closed dhuux closed 10 months ago

dhuux commented 10 months ago

Problem description

i don't know if it's my side or not but java can't be patched no more. i tried both glibc-runner and autopatchelf but no success. and here is the result of running./java or grun ./java:

bad system call

bash-glibc has also been broken for me for too long. this has been the result when ever i try to run it:

Assertion 'mntid >= 0' failed at src/basic/fd-util.c:951, function path_is_root_at(). Aborting.
Aborted

System information

termux-info:

Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.50.1
TERMUX_APP_PACKAGE_MANAGER=pacman
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/com.termux-HHNr_AuO9XfO1D0mJAVWww==/base.apk
TERMUX_APP__APK_RELEASE=GITHUB
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=21726
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c156,c260,c512,c768
TERMUX_APP__SE_INFO=untrusted:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app:s0:c156,c260,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=11180
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+6461df4
TERMUX_MAIN_PACKAGE_FORMAT=pacman
TERMUX_VERSION=0.118.0+6461df4
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# /data/data/com.termux/files/usr/etc/pacman.conf
[main]
Usage = All
Server = https://service.termux-pacman.dev/main/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/main/aarch64
[x11]
Usage = All
Server = https://service.termux-pacman.dev/x11/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/x11/aarch64
[root]
Usage = All
Server = https://service.termux-pacman.dev/root/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/root/aarch64
[tur]
Usage = All
Server = https://service.termux-pacman.dev/tur/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/tur/aarch64
[tur-continuous]
Usage = All
Server = https://service.termux-pacman.dev/tur-continuous/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/tur-continuous/aarch64
[tur-multilib]
Usage = All
Server = https://service.termux-pacman.dev/tur-multilib/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/tur-multilib/aarch64
[gpkg]
Usage = All
Server = https://service.termux-pacman.dev/gpkg/aarch64
Server = https://s3.amazonaws.com/termux-pacman.us/gpkg/aarch64
Updatable packages:
All packages up to date
termux-tools version:
1.40.4
Android version:
9
Kernel build information:
Linux localhost 4.4.111-22376662 #1 SMP PREEMPT Mon Apr 17 17:06:17 KST 2023 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A730F
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:14
Maxython commented 10 months ago

i don't know if it's my side or not but java can't be patched no more. bad system call.

What Java do you use and how?

bash has been broken for me for too long

I did not understand you. Do you mean that bash-glibc is not working for you? If yes, what version do you have installed?

Maxython commented 10 months ago

Can I ask you a personal question? Are you writing your message trying to independently translate from your native language into English? If yes, then I can understand you as a student since you are trying to write a text in English on your own. But you are writing a text to a person who has more experience in the English language and because of this there is a risk that he may not understand your text due to mistakes made in the text. I’m not criticizing you, I just want to tell you that if you are writing a text to some person and you have little experience writing text in English, then use a translator. Also, please do not skip the “System information” line; this line should contain the result of the termux-info command to understand in what environment you are running the commands.

dhuux commented 10 months ago

i use java together with gradle for practing android related stuff. and of course i'm talking about bash-glibc. why would i say glibc in thet tittle of the issue and then talk about bionic based bash here.

it's openjdk-21.0.1. i'm sure it was working before the last glibc updates. i have glibc 2.38-11on my system now. please test it.

i never download an specific version of any package. i'm on pacman based bootstrap and i always update my stuff with pacman -Syu then both bionic and glibc packages are updated, which means i always have the latest version of the packages from gpkg and termux repos on my system.

the only outdated glibc based tool i use is ldconfig from GNU libc 2.36 (and it still works pretty good) since ldconfig in the latest glibc have been broken and never got fixed.

if i want to donwgrade glibc or a glibc based package how do do that? i thought i couldn't do it really.

thanks.

dhuux commented 10 months ago

Can I ask you a personal question? Are you writing your message trying to independently translate from your native language into English?

no. i actually try to think in English and say what i want to say, it's just that my English vocab is not strong and that is why i can't express my self well. i know thinking in your language then translating it into another language never works so i don't do that.

i assumed bash is not working and java can't be patched anymore was enough for you to understand what i meant since this is a termux glibc packages issue.

my language is Somali and believe me, google translator is worse when it comes to translating my langauge into English and vice versa.

i could have been more clearer in my previous comment. sorry.

i have never seen anyone saying: "you were not clear enough" in my issue comments before though. people just understand. lol.

thank you for trying to understand and help a newbie my friend.

dhuux commented 10 months ago

Screenshot_20240110-064231_Termux

i usually use autopatchelf script for patching but this steps didn't work either as you can see here in the screenshot.

thank.

Maxython commented 10 months ago

it's openjdk-21.0.1. i'm sure it was working before the last glibc updates. i have glibc 2.38-11 on my system now. please test it.

I checked, Java and bash-glibc work for me. Try reinstalling glibc. If this does not correct the situation, then send the log file of the result of the strace command:

strace -f -o file.log ./jdk-21.0.1/bin/java --version

if i want to donwgrade glibc or a glibc based package how do do that? i thought i couldn't do it really.

The names of those packages that are based on the glibc library are prefixed with "glibc". Usually it comes at the end, for example: "bash-glibc", "gcc-glibc", "python-glibc", etc. But sometimes there are exceptions, for example with "glibc-runner". Here is a command that will show all glibc based packages from the gpkg repo:

pacman -Ss glibc

If you mean bootstrap based on glibc, then this can be done but without the support of a package manager (roughly speaking, without apt and without pacman) since in this case they need special configuration.

dhuux commented 10 months ago

i already reinstalled glibc but it didn't work. it was really some libraries that i replaced with libraries from debian arm to make some tools work. tools worked but java and bash got messed up. other programs were not affected though only java and bash. thank you brother for your help.

this is solved.

bootstrap based on glibc with a working pacman would be really sick though.

Maxython commented 10 months ago

some libraries that i replaced with libraries from debian arm to make some tools work. tools worked but java and bash got messed up

It's clear. No wonder they stopped working for you. Replacing/installing libraries from other Linux distributions is risky, as you can break your system.

What libraries did you replace, and also what tool did you run (ldconfig)?

bootstrap based on glibc with a working pacman would be really sick though.

What do you mean?