This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new 63a0c13c464 Add liburing dependency check for PAX storage
63a0c13c464 is described below

commit 63a0c13c46476380549bf2c9e22aa4f8f1d667f9
Author: Dianjin Wang <[email protected]>
AuthorDate: Thu Dec 4 14:11:20 2025 +0800

    Add liburing dependency check for PAX storage
    
    Add AC_CHECK_LIB check for liburing in the PAX dependency block
    to detect missing liburing-devel early during configure phase.
    
    PAX storage requires liburing for io_uring-based fast I/O. This
    check prevents unclear linker errors during compilation.
---
 configure    | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac |  4 ++++
 2 files changed, 53 insertions(+)

diff --git a/configure b/configure
index 26516737df6..49362c1f015 100755
--- a/configure
+++ b/configure
@@ -9463,6 +9463,55 @@ $as_echo "#define HAVE_ZSTD 1" >>confdefs.h
 
 fi
 
+  # Check liburing
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for io_uring_queue_init in 
-luring" >&5
+$as_echo_n "checking for io_uring_queue_init in -luring... " >&6; }
+if ${ac_cv_lib_uring_io_uring_queue_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-luring  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char io_uring_queue_init ();
+int
+main ()
+{
+return io_uring_queue_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_uring_io_uring_queue_init=yes
+else
+  ac_cv_lib_uring_io_uring_queue_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_lib_uring_io_uring_queue_init" >&5
+$as_echo "$ac_cv_lib_uring_io_uring_queue_init" >&6; }
+if test "x$ac_cv_lib_uring_io_uring_queue_init" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBURING 1
+_ACEOF
+
+  LIBS="-luring $LIBS"
+
+else
+  as_fn_error $? "library 'uring' is required for PAX support" "$LINENO" 5
+fi
+
+
   # Check cmake >= 3.11.0 using AX_COMPARE_VERSION
   # Extract the first word of "cmake", so it can be a program name with args.
 set dummy cmake; ac_word=$2
diff --git a/configure.ac b/configure.ac
index 1c8662f71b6..8bfdcedf7f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -972,6 +972,10 @@ if test "$enable_pax" = yes; then
     [AC_MSG_ERROR([libzstd >= 1.4.0 is required for PAX support])]
   )
 
+  # Check liburing
+  AC_CHECK_LIB(uring, io_uring_queue_init, [],
+               [AC_MSG_ERROR([library 'uring' is required for PAX support])])
+
   # Check cmake >= 3.11.0 using AX_COMPARE_VERSION
   AC_PATH_PROG([CMAKE], [cmake], [no])
   if test "$CMAKE" = "no"; then


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to