-
-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/bin/env bash | ||
# shellcheck disable=SC1117 | ||
|
||
# Setting the TMPDIR variable | ||
|
@@ -370,6 +370,10 @@ source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_create_pacman_package.sh" | |
# shellcheck source=scripts/build/termux_step_finish_build.sh | ||
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_finish_build.sh" | ||
|
||
termux_step_post_finish_build() { | ||
return | ||
} | ||
|
||
################################################################################ | ||
|
||
# shellcheck source=scripts/properties.sh | ||
|
@@ -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 | ||
cd "$TERMUX_PKG_SRCDIR" | ||
termux_step_pre_configure | ||
fi | ||
|
||
# Even on continued build we might need to setup paths | ||
# to tools so need to run part of configure step | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. In this case Also, why exactly |
||
done | ||
|
||
# Removing a file to store a list of compiled packages | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
TERMUX_PKG_DESCRIPTION="empty test packet for build system " | ||
TERMUX_PKG_VERSION=0 | ||
TERMUX_PKG_LICENSE="WTFPL" | ||
TERMUX_PKG_NO_ELF_CLEANER=true | ||
|
||
termux_step_pre_configure() { | ||
# echo $TERMUX_PREFIX | ||
# echo $TERMUX_PREFIX_CLASSICAL | ||
echo TERMUX_TOPDIR=$TERMUX_TOPDIR | ||
# exit | ||
# $TERMUX_ON_DEVICE_BUILD && test TERMUX_PREFIX = TERMUX_PREFIX_CLASSICAL && echo unsafe prefix detected && exit | ||
echo pwd= | ||
pwd | ||
# touch a | ||
# touch configure.in | ||
# exit | ||
test=123 | ||
$TERMUX_CONTINUE_BUILD || termux_error_exit I failed redo with -c | ||
} | ||
|
||
termux_step_post_make_install() { | ||
test $test = 123 || echo test != 123 | ||
pwd | ||
mkdir -p $TERMUX_PREFIX | ||
# cp $TERMUX_PKG_SRCDIR/* $TERMUX_PREFIX/ | ||
# install -Dm700 -t $TERMUX_PREFIX/ $TERMUX_PKG_SRCDIR/a | ||
# cat $TERMUX_PKG_SRCDIR/configure.in | ||
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/usr | ||
touch $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/usr/a | ||
} | ||
|
||
termux_step_extract_into_massagedir() { | ||
$TERMUX_ON_DEVICE_BUILD && echo skip prefix folder scan on device to save the memory chip | ||
} | ||
|
||
# termux_step_post_massage() { | ||
termux_step_post_finish_build() { | ||
echo | ||
echo -e '\e[1m post massage \e[0m' | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. The check will not work with pacman packages. |
||
echo done | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Please give an example on how it will fail. |
||
|
||
# Update man page symlinks, e.g. unzstd.1 -> zstd.1: | ||
while IFS= read -r -d '' file; do | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, I need this because, I and licy183 need to build in
|
||
echo "INFO: READELF=${READELF} ... $(command -v ${READELF})" | ||
export pattern_file_undef=$(mktemp) | ||
echo "INFO: Generating undefined symbols regex to ${pattern_file_undef}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ] && ! $TERMUX_FORCE_BUILD; then | ||
# On-device builds without termux-exec are unsupported. | ||
if ! grep -q "${TERMUX_PREFIX}/lib/libtermux-exec.so" <<< "${LD_PRELOAD-x}"; then | ||
termux_error_exit "On-device builds without termux-exec are not supported." | ||
termux_error_exit "On-device builds without termux-exec are not supported. use -f to ignore " | ||
fi | ||
fi | ||
else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Installing |
||
if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then | ||
case "$TERMUX_APP_PACKAGE_MANAGER" in | ||
"apt") apt install -y termux-elf-cleaner;; | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -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 commentThe 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
This only affects non-on-device build. |
||||
for dir in usr/lib/*; do | ||||
# This seem to be needed when building rust | ||||
# packages | ||||
|
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