diff --git a/package/icu/icu.mk b/package/icu/icu.mk index 2c04c3c775..c5d0c3eefb 100644 --- a/package/icu/icu.mk +++ b/package/icu/icu.mk @@ -50,6 +50,17 @@ HOST_ICU_CONF_OPTS = \ ICU_SUBDIR = source HOST_ICU_SUBDIR = source +# ICU build scripting adds paths to LD_LIBRARY_PATH using +# LD_LIBRARY_PATH="custom-path:${LD_LIBRARY_PATH}" +# which, if LD_LIBRARY_PATH was empty, causes the last search directory +# to be the working directory, causing the build to try to load target +# libraries, possibly crashing the build due to ABI mismatches. +# Workaround by ensuring LD_LIBRARY_PATH is never empty. +# https://unicode-org.atlassian.net/browse/ICU-21417 +ifeq ($(LD_LIBRARY_PATH),) +ICU_MAKE_ENV += LD_LIBRARY_PATH=/dev/null +endif + ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH)) ifneq ($(ICU_CUSTOM_DATA_PATH),)