Skip to content

Commit

Permalink
Fix: Resolve build failures by unsetting LD_LIBRARY_PATH and using st…
Browse files Browse the repository at this point in the history
…dbuf (milkv-duo#133)

The build process was failing due to the current working directory being present in the LD_LIBRARY_PATH, which can lead to unpredictable behavior and errors. This commit addresses the issue in two ways:

1. Unsetting LD_LIBRARY_PATH:  Before invoking , the  environment variable is explicitly unset. This ensures that the build process uses system libraries from standard locations, preventing conflicts with potentially outdated or incorrect libraries in the current working directory.

2. Using stdbuf -oL with make: The original  command was replaced with . This forces line buffering of the output from , ensuring that build logs are displayed correctly and in a timely manner. This change addresses potential issues with buffering that could lead to incomplete or delayed log output.

These changes together resolve the build failures reported in milkv-duo#133 and improve the reliability and consistency of the build process.
  • Loading branch information
sc20ka committed Dec 9, 2024
1 parent 8e970aa commit 3286010
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions buildroot-2021.05/support/dependencies/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ if test $? != 0 ; then
fi

# Sanity check for CWD in LD_LIBRARY_PATH
unset LD_LIBRARY_PATH # dirty hack?
case ":${LD_LIBRARY_PATH:-unset}:" in
(*::*|*:.:*)
echo
echo "You seem to have the current working directory in your"
echo "LD_LIBRARY_PATH environment variable. This doesn't work."
echo $LD_LIBRARY_PATH
exit 1
;;
esac
Expand Down
3 changes: 2 additions & 1 deletion buildroot-2021.05/utils/brmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ main() {

start=${SECONDS}

( exec 2>&1; unbuffer make "${@}"; ) \
#( exec 2>&1; unbuffer make "${@}"; ) \
( exec 2>&1; stdbuf -oL make "${@}"; )
> >( while read line; do
printf "%(%Y-%m-%dT%H:%M:%S)T %s\n" -1 "${line}"
done \
Expand Down

0 comments on commit 3286010

Please sign in to comment.