607491354f
Fix the following build failure when host root directory is /usr which
is raised since bump to version 2.2.0 in commit
caa32ac237
:
/usr/bin/install -c -m 644 syslog.lua '/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/target/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/usr/share/lua/5.3/logging'
libtool: install: /usr/bin/install -c .libs/lsyslog.so /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/target/usr/lib/lua/5.3/lsyslog.so
libtool: install: /usr/bin/install -c .libs/lsyslog.lai /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/target/usr/lib/lua/5.3/lsyslog.la
libtool: warning: remember to run 'libtool --finish /usr/lib/lua/5.3'
/usr/bin/make install-exec-hook
make[3]: Entering directory `/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/build/luasyslog-2.2.0'
rm -f /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/target/usr/lib/lua/5.3/lsyslog.la
make[3]: Leaving directory `/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/build/luasyslog-2.2.0'
make[2]: Leaving directory `/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/build/luasyslog-2.2.0'
make[1]: Leaving directory `/usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/build/luasyslog-2.2.0'
luasyslog: installs files in /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/target//usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1
This failure is raised because lua script directory is "found" and
"fixed" to
${prefix}/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/usr/share/lua/5.3
because of the following test in ax_lua.m4:
dnl Try to find a path with the prefix.
_AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
[ dnl Fix the prefix.
_ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
sed "s,^$_ax_strip_prefix,$LUA_PREFIX,"`
])
Fixes:
- http://autobuild.buildroot.org/results/09fa6dd9844d6d4694801ec59434dad7a56bf290
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
From aed16d13d881492e8558f9da21be2dffc4ab2c33 Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Sat, 4 Sep 2021 17:23:58 +0200
|
|
Subject: [PATCH] build/ax_lua.m4: fix cross-compilation
|
|
|
|
Don't try to "find" and "fix" the script and module directories when
|
|
cross-compiling as this will give unexpected results such as using
|
|
${prefix}/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/usr/share/lua/5.3
|
|
instead of
|
|
${prefix}/share/lua/5.3
|
|
if the host machine root directory is /usr
|
|
|
|
Fixes:
|
|
- http://autobuild.buildroot.org/results/09fa6dd9844d6d4694801ec59434dad7a56bf290
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
---
|
|
build/ax_lua.m4 | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/build/ax_lua.m4 b/build/ax_lua.m4
|
|
index 23ca774..7c25cfd 100644
|
|
--- a/build/ax_lua.m4
|
|
+++ b/build/ax_lua.m4
|
|
@@ -291,7 +291,7 @@ AC_DEFUN([AX_PROG_LUA],
|
|
|
|
dnl Try to find a path with the prefix.
|
|
_AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
|
|
- AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
|
|
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'],
|
|
[ dnl Fix the prefix.
|
|
_ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
|
|
ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
|
|
@@ -318,7 +318,7 @@ AC_DEFUN([AX_PROG_LUA],
|
|
dnl Try to find a path with the prefix.
|
|
_AX_LUA_FND_PRFX_PTH([$LUA],
|
|
[$ax_lua_exec_prefix], [package.cpathd])
|
|
- AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
|
|
+ AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'],
|
|
[ dnl Fix the prefix.
|
|
_ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
|
|
ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
|
|
--
|
|
2.32.0
|
|
|