Open
Description
Bug report
Bug description:
Environment:
- Device: Unrooted Android
- Container: proot-chroot
- Distribution: Debian 12
- Tool: pyenv
Steps and Issues Encountered:
-
Install Dependencies:
apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev libc6-dev libffi-dev
- All dependencies installed without issues.
-
Configure and Compile libtinfo:
- Downloaded source for
libtinfo
viaapt-get source libtinfo-dev
. - Recompiled with
-fPIC
flag using:cd ncurses-6.4 make clean CFLAGS="-fPIC" ./configure --host=aarch64-linux-gnu --prefix=/usr --with-shared --with-termlib make make install
- Successfully compiled
libtinfo
.
- Downloaded source for
-
Configure and Compile Python 3.13.0:
- Downloaded Python 3.13.0 source:
wget https://www.python.org/ftp/python/3.13.0/Python-3.13.0.tgz tar -xzf Python-3.13.0.tgz cd Python-3.13.0
- In a
build
directory, ran the configuration script with optimizations:../configure --enable-optimizations --prefix=$HOME/.pyenv/versions/3.13.0
- Modified
Makefile
to remove-Werror
and fiximplicit-function-declaration
:sed -i 's/-Werror//g' Makefile sed -i 's/ =implicit-function-declaration/ /g' Makefile
- Attempted to compile:
make make install
- Compilation failed with
libtinfo
linkage errors.
- Downloaded Python 3.13.0 source:
-
Revisit
libtinfo
:- Ensured all steps for
libtinfo
recompile were correctly followed. - Reattempted Python build multiple times with no success.
- Ensured all steps for
-
Considered Alternative Approaches:
- Considered excluding
libtinfo
with./configure --without-curses
, but concerned about compromised functionality. - Explored Docker, but ruled out due to root privileges requirement.
- Tried to find a pre-compiled binary for aarch64 from s reputable source, without success.
- Considered excluding
Current Status:
- Compilation repeatedly fails with dangerous relocation errors when linking
libtinfo
. - Seeking guidance or solutions from community or developers experienced with Python on ARM architecture, particularly Android environments.
Termux Info
(base) root@localhost:~ # termux-info
Termux Variables:
unsupported
Packages CPU architecture:
arm64
Subscribed repositories:
# sources.list
deb https://mirrors.middlendian.com/termux/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
# sources.list.d/ivam3-termux-packages.list
deb [trusted=yes arch=all] https://ivam3.github.io/termux-packages stable extras
# sources.list.d/x11.list
deb https://mirrors.middlendian.com/termux/termux-x11 x11 main
# sources.list.d/tur.list
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# sources.list.d/root.list
deb https://mirrors.middlendian.com/termux/termux-root root stable
# sources.list.d/rendiix.list
deb https://rendiix.github.io android-tools termux
Updatable packages:
Running as root. Cannot check package updates.
termux-tools version:
1.43.6
Android version:
14
Kernel build information:
Linux localhost 6.2.1-PRoot-Distro #1 SMP PREEMPT Thu Jul 11 02:48:07 UTC 2024 aarch64 GNU/Linux
Device manufacturer:
samsung
Device model:
SM-X910
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=
Installed termux plugins:
com.termux.widget versionCode:13
com.termux.x11 versionCode:14
com.termux.api versionCode:51
com.termux.window versionCode:15
com.termux.styling versionCode:1000
Logs:
TBP
CPython versions tested on:
3.13
Operating systems tested on:
Linux