termux-user-repository / tur

A place for all types of Termux packages.
Other
362 stars 72 forks source link

[Bug]: The GCC-default installer bug #1109

Open 1q23lyc45 opened 2 days ago

1q23lyc45 commented 2 days ago

Problem description

All versions of gcc have expired, and cannot be installed. Except for GCC-14, it can be used.

Perhaps these old versions of gcc should use Android NDK r17c or this toolchain: https://github.com/termux-user-repository/ndk-toolchain-gcc-9

What steps will reproduce the bug?

.../apt/archives $ apt install gcc-default-9         Reading package lists... Done                        Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-bin binutils-libs gcc-9 libisl
  libmpc ndk-sysroot-gcc-compact
The following NEW packages will be installed:
  binutils binutils-bin binutils-libs gcc-9
  gcc-default-9 libisl libmpc
  ndk-sysroot-gcc-compact
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1360 B/36.5 MB of archives.
After this operation, 195 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://tur.kcubeterm.com tur-packages/tur aarch64 gcc-default-9 all 0.3-2 [1360 B]
Fetched 1360 B in 4s (368 B/s)
Selecting previously unselected package binutils-libs.
(Reading database ... 5202 files and directories currently installed.)
Preparing to unpack .../0-binutils-libs_2.42_aarch64.deb ...
Unpacking binutils-libs (2.42) ...
Selecting previously unselected package binutils-bin.
Preparing to unpack .../1-binutils-bin_2.42_aarch64.deb ...
Unpacking binutils-bin (2.42) ...
Selecting previously unselected package binutils.
Preparing to unpack .../2-binutils_2.42_aarch64.deb ...
Unpacking binutils (2.42) ...
Selecting previously unselected package libmpc.
Preparing to unpack .../3-libmpc_1.3.1_aarch64.deb ...
Unpacking libmpc (1.3.1) ...
Selecting previously unselected package libisl.
Preparing to unpack .../4-libisl_0.26_aarch64.deb ...
Unpacking libisl (0.26) ...
Selecting previously unselected package ndk-sysroot-gcc-compact.
Preparing to unpack .../5-ndk-sysroot-gcc-compact_26b-7_aarch64.deb ...
Unpacking ndk-sysroot-gcc-compact (26b-7) ...
Selecting previously unselected package gcc-9.
Preparing to unpack .../6-gcc-9_9.5.0-2_aarch64.deb ...
Unpacking gcc-9 (9.5.0-2) ...
Selecting previously unselected package gcc-default-9.
Preparing to unpack .../7-gcc-default-9_0.3-2_all.deb ...
Unpacking gcc-default-9 (0.3-2) ...
Setting up binutils-libs (2.42) ...
Setting up ndk-sysroot-gcc-compact (26b-7) ...
Setting up libisl (0.26) ...
Setting up libmpc (1.3.1) ...
Setting up binutils-bin (2.42) ...
Setting up binutils (2.42) ...
Setting up gcc-9 (9.5.0-2) ...

********
GCC 10 and older no longer receive upstream support or fixes for bugs.
Please switch to a newer GCC version or clang.
The support for GCC 10 and older will be dropped when Android NDK 27 ships.
********

Setting up gcc-default-9 (0.3-2) ...
/data/data/com.termux/files/usr/var/lib/dpkg/info/gcc-default-9.postinst: 8: pacman-conf: not found
dpkg: error processing package gcc-default-9 (--configure):
 installed gcc-default-9 package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 gcc-default-9
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)

What is the expected behavior?

Installed

System information

termux-info:

~ $ termux-info
Termux Variables:
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=3999
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/termux/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
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
11
Kernel build information:
Linux localhost 4.14.141 #1 SMP PREEMPT Fri Nov 31 18:15:23 CST 2023 aarch64 Android
Device manufacturer:
unknown
Device model:
Phh-Treble vanilla
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
1q23lyc45 commented 2 days ago

A temporary solution:

export TERMUX_MAIN_PACKAGE_FORMAT=debian && export TERMUX_APP_PACKAGE_MANAGER=apt && apt install gcc-default-9 

I think it may be related to the recent updates on Termux (guessed) 118.1 & 119.0