From 848f1e6bb311d85ff1acd8b468f3df00c793b028 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 11 Nov 2022 18:56:33 +0000 Subject: [PATCH] fuse-7z-ng: fix build against modern glibc Wthout the change configure fails as: checking for pthread_yield in -lpthread... no configure: error: pthread library not found. fuze-7z-ng does not use pthread itself. Let's just drop the check. --- pkgs/tools/filesystems/fuse-7z-ng/default.nix | 5 +++++ pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch diff --git a/pkgs/tools/filesystems/fuse-7z-ng/default.nix b/pkgs/tools/filesystems/fuse-7z-ng/default.nix index 3efca6553a22..d400891a2054 100644 --- a/pkgs/tools/filesystems/fuse-7z-ng/default.nix +++ b/pkgs/tools/filesystems/fuse-7z-ng/default.nix @@ -10,6 +10,11 @@ stdenv.mkDerivation rec { rev = "eb5efb1f304c2b7bc2e0389ba06c9bf2ac4b932c"; sha256 = "17v1gcmg5q661b047zxjar735i4d3508dimw1x3z1pk4d1zjhp3x"; }; + patches = [ + # Drop unused pthread library. pthread_yield() + # fails the configure. + ./no-pthread.patch + ]; nativeBuildInputs = [ pkg-config makeWrapper autoconf automake ]; buildInputs = [ fuse ]; diff --git a/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch b/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch new file mode 100644 index 000000000000..193090defebc --- /dev/null +++ b/pkgs/tools/filesystems/fuse-7z-ng/no-pthread.patch @@ -0,0 +1,11 @@ +pthread_yield() is not used by fuse-7z-ng, fails configure. +--- a/configure.ac ++++ b/configure.ac +@@ -25,7 +25,6 @@ AC_CHECK_HEADERS([fcntl.h stddef.h string.h unistd.h dlfcn.h dirent.h]) + AC_CHECK_FUNCS([memset memmove]) + AC_CHECK_FUNCS([sqrt]) + +-AC_CHECK_LIB([pthread], [pthread_yield],,AC_MSG_ERROR([pthread library not found.])) + AC_CHECK_LIB([dl], [dlclose]) + + PKG_CHECK_MODULES([fuse], [fuse >= 2.8])