Skip to content

Conversation

@john-peterson
Copy link

if anyone is not tired of bionic already here are some
errors -fno-exceptions should have removed the first ones.

I am going to work on a stand alone glibc repo instead and try to make
my default shell GNU I have just about had it with this maybe someone
can encourage me to explain why we need bionic at all I never use th
graphics card or system drivers anyway . or hardly ever

pip install curl_cffi for bionic is missing this lib because no one no
same person could build it in bionic

termux - building curl-impersonate for arch aarch64...
[1/1] Linking C executable src/curl
FAILED: src/curl
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_begin_catch
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: std::terminate()
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __gxx_personality_v0
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_rethrow
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_end_catch
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: void std::__ndk1::__sort<std::__ndk1::__less<unsigned short, unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, std::__ndk1::__less<unsigned short, unsigned short>&)
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: operator delete(void*)
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: vtable for __cxxabiv1::__class_type_info
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: vtable for __cxxabiv1::__si_class_type_info
>>> referenced by lib/libcurl.so
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

…e .not ready yet.

 if anyone is not tired of bionic already here are some
errors -fno-exceptions should have removed the first ones.

I am going to work on a stand alone glibc repo instead and try to make
my default shell GNU I have just about had it with this maybe someone
can encourage me to explain why we need bionic at all I never use th
graphics card or system drivers anyway . or hardly ever

pip install curl_cffi for bionic is missing this lib because no one no
same person could build it in bionic

~~~sh

termux - building curl-impersonate for arch aarch64...
[1/1] Linking C executable src/curl
FAILED: src/curl
ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_begin_catch
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: std::terminate()
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __gxx_personality_v0
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_rethrow
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: __cxa_end_catch
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: void std::__ndk1::__sort<std::__ndk1::__less<unsigned short, unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, std::__ndk1::__less<unsigned short, unsigned short>&)
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: operator delete(void*)
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: vtable for __cxxabiv1::__class_type_info
>>> referenced by lib/libcurl.so

ld.lld: error: undefined reference due to --no-allow-shlib-undefined: vtable for __cxxabiv1::__si_class_type_info
>>> referenced by lib/libcurl.so
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
@robertkirkman
Copy link
Member

boringssl

there is a boringssl already existing at /system/lib64/libcrypto.so. what is this one needed for?

pip install curl_cffi

it works for me on-device, what was wrong with it for you?

~ $ pip install curl_cffi 
Collecting curl_cffi
  Downloading curl_cffi-0.10.0.tar.gz (144 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.12.0 in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from curl_cffi) (1.17.1)
Requirement already satisfied: certifi>=2024.2.2 in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from curl_cffi) (2025.4.26)
Requirement already satisfied: pycparser in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from cffi>=1.12.0->curl_cffi) (2.22)
Building wheels for collected packages: curl_cffi
  Building wheel for curl_cffi (pyproject.toml) ... done
  Created wheel for curl_cffi: filename=curl_cffi-0.10.0-cp39-abi3-linux_aarch64.whl size=104077 sha256=4b4d899a6345007cace6ebf346347d354b9d2401076b7418f6baced4de837a9d
  Stored in directory: /data/data/com.termux/files/home/.cache/pip/wheels/a8/f7/0b/6f2c8a2d88b02901f32c808521bc31230061d70d21821b1c87
Successfully built curl_cffi
Installing collected packages: curl_cffi
Successfully installed curl_cffi-0.10.0

@robertkirkman
Copy link
Member

robertkirkman commented May 12, 2025

maybe someone can encourage me to explain why we need bionic at all

it is, I think, because glibc-prefix is a large dependency that can require a lot of downloading and a large amount of space. for me the $PREFIX/glibc folder is 700 MB.

try to make my default shell GNU

actually, you are right, that goal is kind of difficult without messing stuff up and part of the reason is because Termux App sets $TERMUX_PREFIX/bin/login or $PREFIX/bin/bash or $PREFIX/bin/zsh as the initial launch shell for Activities here

https://github.com/termux/termux-app/blob/21c0d51fb6c9b27c386aceb0de67b99a97d1eeb8/termux-shared/src/main/java/com/termux/shared/shell/TermuxSession.java#L83

so it would be necessary to delete/edit $PREFIX/bin/login to achieve what you want.

and I tried some messing with ~/.termux/shell, but it does not work well for glibc-runner, some weird side effects happened so I am not sure how to do that.

@robertkirkman
Copy link
Member

After the date of my last message, I have learned that pure glibc-packages bootstrap termux.apk is possible and has been invented previously by someone as a proof of concept. If you still want one, you can let me know and I could put you in contact with the person who has tested that.

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 this pull request may close these issues.

2 participants