package/fio: fix build with nfs
PATCH 1/1 package/fio: fix build with nfs
Buildroot commit 215133c0fc2819f059fbb35071ab2e0987f5107d bumped the package from 3.38 to 3.41. This bump includes upstream commit
https://github.com/axboe/fio/commit/171e18146a3ea26491b087a29c6ee7b0ad21e719
which added gnutls as dependency to the pkg-config call for libnfs libs.
This causes a configure warning
Package gnutls was not found in the pkg-config search path. Perhaps you should add the directory containing `gnutls.pc' to the PKG_CONFIG_PATH environment variable Package 'gnutls' not found
and build errors like
nfs.c:(.text+0x75): undefined reference to `nfs_close'
when gnutls is not available.
Gnutls is in fact only needed for libnfs >= 6.0.0 and not for the libnfs version 5.0.3 currently used by buildroot. This patch adds an upstream commit that adds a version check for libnfs to the configure script:
https://github.com/axboe/fio/commit/ceadd9251f0b2ad707ddef2cdd42f91573172bbe
Fixes:
https://autobuild.buildroot.net/results/41d/41db210797fc5f036246063a9e3634b27158b3c8/
--- ...tionally-add-gnutls-for-libnfs-6.0.0.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 package/fio/0002-configure-conditionally-add-gnutls-for-libnfs-6.0.0.patch
package/fio/0002-configure-conditionally-add-gnutls-for-libnfs-6.0.0.patch new file +60 -0
@@ -0,0 +1,60 @@ +From ceadd9251f0b2ad707ddef2cdd42f91573172bbe Mon Sep 17 00:00:00 2001 +From: Luis Chamberlain <[email protected]> +Date: Wed, 23 Jul 2025 19:42:22 -0700 +Subject: [PATCH] configure: conditionally add gnutls for libnfs >= 6.0.0 + +gnutls is required newwer version of libnfs, and so we need to check +for this. libnfs version 6.0.0 and later added TLS support. Earlier versions +like 5.0.x do not require gnutls. + +Add a version check in the configure script to detect the libnfs version +and only add gnutls as a dependency when libnfs >= 6.0.0 is detected. + +For systems with older libnfs versions, the build will work without +requiring gnutls. For systems with libnfs 6.0.0+, gnutls will be +properly detected and linked. + +Generated-by: Claude AI +Reviewed-by: Vincent Fu <[email protected]> +Signed-off-by: Luis Chamberlain <[email protected]> + +Upstream: https://github.com/axboe/fio/commit/ceadd9251f0b2ad707ddef2cdd42f91573172bbe + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + configure | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 13450118..64e58b65 100755 +--- a/configure ++++ b/configure +@@ -2348,8 +2348,23 @@ print_config "DAOS File System (dfs) Engine" "$dfs" + if test "$libnfs" != "no" ; then + if $(pkg-config libnfs > /dev/null 2>&1); then + libnfs="yes" +- libnfs_cflags=$(pkg-config --cflags libnfs gnutls) +- libnfs_libs=$(pkg-config --libs libnfs gnutls) ++ libnfs_cflags=$(pkg-config --cflags libnfs) ++ libnfs_libs=$(pkg-config --libs libnfs) ++ ++ # libnfs >= 6.0.0 requires gnutls for TLS support ++ libnfs_version=$(pkg-config --modversion libnfs 2>/dev/null) ++ if test -n "$libnfs_version" ; then ++ libnfs_major=$(echo $libnfs_version | cut -d. -f1) ++ if test "$libnfs_major" -ge 6 ; then ++ if $(pkg-config gnutls > /dev/null 2>&1); then ++ libnfs_cflags="$libnfs_cflags $(pkg-config --cflags gnutls)" ++ libnfs_libs="$libnfs_libs $(pkg-config --libs gnutls)" ++ else ++ feature_not_found "gnutls" "gnutls (required for libnfs >= 6.0.0)" ++ libnfs="no" ++ fi ++ fi ++ fi + else + if test "$libnfs" = "yes" ; then + feature_not_found "libnfs" "libnfs" +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot