-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
-c flag errors after make + various odds and ends #24089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
annoying since it requires rebuild from scratch especially on device . ~~there is is still an error where control files are included at the end.~~ fixed now I just gave up and reset. I still think this should be automatic I will try to fix my fix for this . it should be easy to keep a marker instead of asking the builder to remember to switch a flag on and off these errors remain to be solved these files should not be there in the final packet. somehow the control files ended up in the data tar ball at the end of ffmpeg build -- update fixed! 20 09:10 ./ drwxr-xr-x 0/0 0 2025-0 3-20 09:10 ./DEBIAN/ -rw-r--r-- 0/0 199 2025-0 3-20 09:10 ./DEBIAN/control drwxr-xr-x 0/0 0 20 # skip Generating undefined symbols regex on device it seems to work anyway I don't remember exactly what it did seemed pointless on device that is already burdened enough with scanning the entire prefix folder because builds are not sanitized in a sand box instead of dumping all kinds of garbage directly onto the system folder including broken files like libtool is dumped prefix on device and then searched to find the files. I am just strongly against applying everything from off device on device it is a completely different situation than off device. I ask everyone to look at my :ondev (#ondev is there no tag for linking my branches??) branch again and consider the sand boxing idea lastly the elf cleaner kept nagging me over and over my default Debian gcloud has insufficient glibc++ version for it and there is a flag that supposed to disable it
@@ -179,7 +179,7 @@ termux_step_massage() { | |||
# Check so that package is not affected by | |||
# https://github.com/android/ndk/issues/1614, or | |||
# https://github.com/termux/termux-packages/issues/9944 | |||
if [[ "${TERMUX_PACKAGE_LIBRARY}" == "bionic" ]]; then | |||
if [[ "${TERMUX_PACKAGE_LIBRARY}" == "bionic" ]] && ! $TERMUX_ON_DEVICE_BUILD; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I need this because, I and licy183 need to build in $TERMUX_ON_DEVICE_BUILD=true
mode and then we copy and paste the .deb
from one device to another device. If undefined symbols are allowed to pass from Android 9 to Android 7, the program will crash.
- Some more explanation: [Discussion]: The problem in TUR on Device termux-user-repository/tur#43
@@ -51,10 +51,11 @@ termux_step_setup_variables() { | |||
TERMUX_BUILT_PACKAGES_DIRECTORY="$TERMUX_TOPDIR/.built-packages" | |||
TERMUX_NO_CLEAN="true" | |||
|
|||
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then | |||
# this imbecile message needs to be sileneced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, on-device building will not work at all when executing bash scripts with shebang /bin
or /usr/bin
.
@@ -88,7 +88,7 @@ termux_step_start_build() { | |||
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds." | |||
fi | |||
|
|||
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then | |||
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ] && ! $TERMUX_PKG_NO_ELF_CLEANER; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing elf-cleaner
will not take too much space. Is there any particular reason to skip it?
@@ -215,7 +215,7 @@ termux_setup_toolchain_27c() { | |||
sed -i "s/define __ANDROID_API__ __ANDROID_API_FUTURE__/define __ANDROID_API__ $TERMUX_PKG_API_LEVEL/" \ | |||
usr/include/android/api-level.h | |||
|
|||
$TERMUX_ELF_CLEANER --api-level=$TERMUX_PKG_API_LEVEL usr/lib/*/*/*.so | |||
$TERMUX_PKG_NO_ELF_CLEANER || $TERMUX_ELF_CLEANER --api-level=$TERMUX_PKG_API_LEVEL usr/lib/*/*/*.so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code path will not execute when on-device building as it is early-returned at
return |
This only affects non-on-device build.
@@ -107,7 +107,7 @@ termux_step_massage() { | |||
find ./${ADDING_PREFIX}share/man -mindepth 1 -maxdepth 1 -type d ! -name man\* | xargs -r rm -rf | |||
|
|||
# Compress man pages with gzip: | |||
find ./${ADDING_PREFIX}share/man -type f ! -iname \*.gz -print0 | xargs -r -0 gzip -9 -n | |||
find ./${ADDING_PREFIX}share/man -type f ! -iname \*.gz -print0 | xargs -r -0 gzip -9 -n || $TERMUX_CONTINUE_BUILD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give an example on how it will fail.
@@ -663,9 +667,11 @@ for ((i=0; i<${#PACKAGE_LIST[@]}; i++)); do | |||
termux_step_get_dependencies_python | |||
termux_step_patch_package | |||
termux_step_replace_guess_scripts | |||
fi | |||
|
|||
$TERMUX_CONTINUE_BUILD && echo try to not reset the build just set the version variables without touching any build files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
termux_step_pre_configure
should NOT get re-executed when continue-build is on. If you really really need it, use workaround below.
termux-packages/x11-packages/firefox/build.sh
Lines 102 to 105 in d9b8628
if [ "$TERMUX_CONTINUE_BUILD" == "true" ]; then | |
termux_step_pre_configure | |
cd $TERMUX_PKG_SRCDIR | |
fi |
@@ -708,6 +714,7 @@ for ((i=0; i<${#PACKAGE_LIST[@]}; i++)); do | |||
termux_add_package_to_built_packages_list "$TERMUX_PKG_NAME" | |||
termux_step_finish_build | |||
) 5< "$TERMUX_BUILD_LOCK_FILE" | |||
termux_step_post_finish_build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case termux_step_post_finish_build
will be executed in parent shell. Move it to termux_step_finish_build
invocation please.
Also, why exactly termux_step_post_finish_build
is needed? You can perform checks in termux_step_post_massage
step.
echo TERMUX_PKG_PACKAGEDIR=$TERMUX_PKG_PACKAGEDIR | ||
ls $TERMUX_PKG_PACKAGEDIR | ||
tar tf $TERMUX_PKG_PACKAGEDIR/data.* | ||
dpkg -c $TERMUX_OUTPUT_DIR/test* | grep /DEBIAN/control && termux_error_exit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check will not work with pacman packages.
Post the exact |
annoying since it requires rebuild from scratch especially on device .
there is is still an error where control files are included at the end.fixed nowI just gave up and reset. I still think this should be automatic I will
try to fix my fix for this . it should be easy to keep a marker instead
of asking the builder to remember to switch a flag on and off
these errors remain to be solved these files should not be there in the
final packet. somehow the control files ended up in the data tar ball at
the end of ffmpeg build -- update fixed!
20 09:10 ./
drwxr-xr-x 0/0 0 2025-0
3-20 09:10 ./DEBIAN/
-rw-r--r-- 0/0 199 2025-0
3-20 09:10 ./DEBIAN/control
drwxr-xr-x 0/0 0 20
skip Generating undefined symbols regex on device
it seems to work anyway I don't remember exactly what it did seemed
pointless on device that is already burdened enough with scanning the
entire prefix folder because builds are not sanitized in a sand box
instead of dumping all kinds of garbage directly onto the system folder
including broken files like libtool is dumped prefix on device and then
searched to find the files. I am just strongly against applying
everything from off device on device it is a completely different
situation than off device. I ask everyone to look at my :ondev (#ondev
is there no tag for linking my branches??) branch
again and consider the sand boxing idea
lastly the elf cleaner kept nagging me over and over my default Debian
gcloud has insufficient glibc++ version for it and there is a flag
that supposed to disable it