[Buildroot] [PATCH 1/1] package/bluez5_utils: fix AC_CHECK_FILE error
t123yh.xyz at gmail.com
t123yh.xyz at gmail.com
Mon Jul 10 13:57:52 UTC 2023
From: Yunhao Tian <t123yh.xyz at gmail.com>
Commit [1] in bluez5 introuduces AC_CHECK_FILE against ell library,
which produces the following error when configuring:
checking for ./ell/ell.h... configure: error: cannot check for file
existence when cross compiling
As this check is not critical in our use case, this patch removes the
relevant lines in configure.ac and configure to prevent errors.
[1]:
https://github.com/bluez/bluez/commit/1106b28be85ac9586d1758839226e163e9030ee2
Signed-off-by: Yunhao Tian <t123yh.xyz at gmail.com>
---
.../0001-remove-ell-ac-check-file.patch | 86 +++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 package/bluez5_utils/0001-remove-ell-ac-check-file.patch
diff --git a/package/bluez5_utils/0001-remove-ell-ac-check-file.patch b/package/bluez5_utils/0001-remove-ell-ac-check-file.patch
new file mode 100644
index 0000000000..32831cf923
--- /dev/null
+++ b/package/bluez5_utils/0001-remove-ell-ac-check-file.patch
@@ -0,0 +1,86 @@
+From 56de22f93ed738aab11c5e75d26259462ea13faa Mon Sep 17 00:00:00 2001
+From: Yunhao Tian <t123yh.xyz at gmail.com>
+Date: Mon, 10 Jul 2023 21:46:28 +0800
+Subject: [PATCH 1/1] configure: remove check ell path
+
+This breaks configure when cross-compiling, so remove it
+
+Signed-off-by: Yunhao Tian <t123yh.xyz at gmail.com>
+Upstream: N/A not fixed yet
+
+diff -ur bbb/configure bluez5_utils-5.68/configure
+--- bbb/configure 2023-07-10 21:33:33.829161104 +0800
++++ bluez5_utils-5.68/configure 2023-07-10 21:33:47.961142717 +0800
+@@ -15959,57 +15959,6 @@
+
+
+ fi
+-if (test "${enable_external_ell}" != "yes"); then
+- as_ac_File=`printf "%s\n" "ac_cv_file_${srcdir}/ell/ell.h" | $as_tr_sh`
+-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/ell/ell.h" >&5
+-printf %s "checking for ${srcdir}/ell/ell.h... " >&6; }
+-if eval test \${$as_ac_File+y}
+-then :
+- printf %s "(cached) " >&6
+-else $as_nop
+- test "$cross_compiling" = yes &&
+- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+-if test -r "${srcdir}/ell/ell.h"; then
+- eval "$as_ac_File=yes"
+-else
+- eval "$as_ac_File=no"
+-fi
+-fi
+-eval ac_res=\$$as_ac_File
+- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+-printf "%s\n" "$ac_res" >&6; }
+-if eval test \"x\$"$as_ac_File"\" = x"yes"
+-then :
+- dummy=yes
+-else $as_nop
+- as_ac_File=`printf "%s\n" "ac_cv_file_${srcdir}/../ell/ell/ell.h" | $as_tr_sh`
+-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/../ell/ell/ell.h" >&5
+-printf %s "checking for ${srcdir}/../ell/ell/ell.h... " >&6; }
+-if eval test \${$as_ac_File+y}
+-then :
+- printf %s "(cached) " >&6
+-else $as_nop
+- test "$cross_compiling" = yes &&
+- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+-if test -r "${srcdir}/../ell/ell/ell.h"; then
+- eval "$as_ac_File=yes"
+-else
+- eval "$as_ac_File=no"
+-fi
+-fi
+-eval ac_res=\$$as_ac_File
+- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+-printf "%s\n" "$ac_res" >&6; }
+-if eval test \"x\$"$as_ac_File"\" = x"yes"
+-then :
+- dummy=yes
+-else $as_nop
+- as_fn_error $? "ELL source is required or use --enable-external-ell" "$LINENO" 5
+-fi
+-
+-fi
+-
+-fi
+ if test "${enable_external_ell}" = "yes" ||
+ (test "${enable_btpclient}" != "yes" &&
+ test "${enable_mesh}" != "yes"); then
+diff -ur bbb/configure.ac bluez5_utils-5.68/configure.ac
+--- bbb/configure.ac 2023-07-10 21:33:33.829161104 +0800
++++ bluez5_utils-5.68/configure.ac 2023-07-10 21:33:55.465132962 +0800
+@@ -297,11 +297,6 @@
+ AC_SUBST(ELL_CFLAGS)
+ AC_SUBST(ELL_LIBS)
+ fi
+-if (test "${enable_external_ell}" != "yes"); then
+- AC_CHECK_FILE(${srcdir}/ell/ell.h, dummy=yes,
+- AC_CHECK_FILE(${srcdir}/../ell/ell/ell.h, dummy=yes,
+- AC_MSG_ERROR(ELL source is required or use --enable-external-ell)))
+-fi
+ AM_CONDITIONAL(EXTERNAL_ELL, test "${enable_external_ell}" = "yes" ||
+ (test "${enable_btpclient}" != "yes" &&
+ test "${enable_mesh}" != "yes"))
--
2.30.2
More information about the buildroot
mailing list