termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
12.94k stars 2.98k forks source link

[Bug]: failed to build my own bootstrap-aarch64.zip #20835

Open RainPlayer opened 1 month ago

RainPlayer commented 1 month ago

Problem description

i want to build my own bootstrap-aarch64.zip, i have changed the line TERMUX_APP_PACKAGE="com.termux" in file properties.sh with my own package name(com.mytermux). then i execute the build-bootstraps.sh file. but finally has the below errors: [*] Adding termux bootstrap second stage files... realpath: ./scripts/build-bootstraps.sh: No such file or directory sed: can't read ./bootstrap/termux-bootstrap-second-stage.sh: No such file or directory help me pls, thanks!

What steps will reproduce the bug?

./scripts/run-docker.sh ./scripts/build-bootstraps.sh --architectures aarch64

What is the expected behavior?

No response

System information

ubuntu 22.04
agnostic-apollo commented 1 month ago

It needs to use a $TERMUX_SCRIPTDIR/scripts variable instead of $0 expansion (generate-bootstraps.sh doesn't have a main() function, so worked for it). Already noticed that locally and fixed it, and build-bootstraps.sh is also broken for other things (you can search), wait for fixes in next couple of days, work is on going.

https://github.com/termux/termux-packages/blob/31decf39b52bc44e9330301bec7fbc564158cdf4/scripts/build-bootstraps.sh#L204

RainPlayer commented 1 month ago

"$0"

Thank you first! i have changed it as you said: "$(dirname "$(realpath "$TERMUX_SCRIPTDIR/scripts")")/scripts/bootstrap/termux-bootstrap-second-stage.sh" and it works successfully. but thers is another question, when i put the bootstrap-aarch64.zip file in my app project which package name is "com.mytermux", the TermuxActivity shows that "/data/data/com.mytermux/files/usr/bin/login: 35 dpkg:Permission denied", the other command like "ls" shows the same error. i don't know why it happened, thanK you for your reply.

agnostic-apollo commented 1 month ago

If some commands are working are others are not (assuming you are using targetSdkVersion <= 28), then likely issue is mixed building of packages with com.termux and com.mytermux package names due to not running ./clean.sh before building for new package name.

RainPlayer commented 1 month ago

If some commands are working are others are not (assuming you are using targetSdkVersion <= 28), then likely issue is mixed building of packages with com.termux and com.mytermux package names due to not running ./clean.sh before building for new package name.

i am using targetSdkVersion > 28, all commands are not working.

agnostic-apollo commented 1 month ago

Well, that ain't gonna work.

You will either have to use native library solution with --android10 flag without a possibility to upgrade packages at runtime with apt.

RainPlayer commented 1 month ago

Well, that ain't gonna work.

You will either have to use native library solution with --android10 flag without a possibility to upgrade packages at runtime with apt.

Or use system linker solution being used by Termux on PlayStore.

Thank you for your reply. I got it. Have a nice day.