build: fix ldconfig executable error in python
authorDamien Mascord <tusker@tusker.org>
Mon, 1 Nov 2021 09:06:20 +0000 (20:06 +1100)
committerBaptiste Jonglez <git@bitsofnetworks.org>
Mon, 4 Jul 2022 08:08:08 +0000 (10:08 +0200)
The empty executable is causing problems with meson builds, due to the
error: OSError: [Errno 8] Exec format error: 'ldconfig'

This patch changes the empty ldconfig stub to symlink to /bin/true to
work around this issue.

Fixes: FS#4117
Fixes: 3bd31cc4d2ff ("tools/meson: update to 0.60.0")
Signed-off-by: Damien Mascord <tusker@tusker.org>
Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # Tested on Debian 11
Tested-By: Lucian Cristian <lucian.cristian@gmail.com>
Tested-By: Baptiste Jonglez <git@bitsofnetworks.org>
Cc: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 6a5b4228e30244b44a49f523dea66caf3fbe3307)
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
[backport to fix prereq check when moving from 22.03 branch to 21.02]

include/prereq-build.mk

index d28432f726acbfd9b11d5d630408f6cc16850554..d3593b02059c8e3cfa2deb8352ca2843243a8b8a 100644 (file)
@@ -196,5 +196,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash
 
 # Install ldconfig stub
 $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
-       touch $(STAGING_DIR_HOST)/bin/ldconfig && \
-       chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
+       $(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))