From patchwork Tue Sep 13 23:26:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1677563 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MS03q2Jqnz1yp0 for ; Wed, 14 Sep 2022 09:27:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 800D740383; Tue, 13 Sep 2022 23:26:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 800D740383 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NRIsmuiD-MsG; Tue, 13 Sep 2022 23:26:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 50C824036A; Tue, 13 Sep 2022 23:26:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 50C824036A X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 781F91BF312 for ; Tue, 13 Sep 2022 23:26:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4E63A60B0A for ; Tue, 13 Sep 2022 23:26:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4E63A60B0A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yhAPpvWij9Aj for ; Tue, 13 Sep 2022 23:26:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 442C1607E3 Received: from smtpdh16-2.aruba.it (smtpdh16-2.aruba.it [62.149.155.101]) by smtp3.osuosl.org (Postfix) with ESMTP id 442C1607E3 for ; Tue, 13 Sep 2022 23:26:43 +0000 (UTC) Received: from localhost.localdomain ([146.241.22.4]) by Aruba Outgoing Smtp with ESMTPSA id YFIeobC8XWuL0YFIfoGI8Z; Wed, 14 Sep 2022 01:26:41 +0200 From: Giulio Benetti To: buildroot@buildroot.org Date: Wed, 14 Sep 2022 01:26:39 +0200 Message-Id: <20220913232639.432368-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4xfOtnsr7lC2E+jdkbnW+8DmmyKKXnsox5PODjcfaRht6g7Mg661TZdTNUnmJbe7+DskwboaDpquj9keSd8GYeqi9XsLJQFZr+Zu6QoE0geIpw9qIxWVHK ZMB6CyVfopgG10TKnbnOr5UPcENkBQaR6TPsDeSudhC4qb3cCDRVZ4jdEYxQ7YXbJ5P5Ahp4uCZp4Ir+aNifJJoFn/ywzgnk3gbn6Q6ZZYEJVVUbaaITIPt7 C/x1z4iBrllXJ3S8Zd+Tplh3V470VexCmKn9jaoCGAS+GcMQBV3H6ZzGzU/a1kj7DFgF5MI63+ysTXR+kuNxTg== X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1663111601; bh=Lu882L0BbknJBhYHzFZ5cejUvyQi2sLRpZaq/GOdTTw=; h=From:To:Subject:Date:MIME-Version:Content-Type; b=DiP8Sg0Az3Cg2s7VQmwhmi8XeWBrZQRbvkXTrEZrhKl6YnlouwnQOzi1OUI3URMsd nEqPfx6FJc/7Hg8nCy4crJRS6OixDvLaR+m8v7IKE/zBWGh/2w8qoSiQ8G3L9WnOTy Tfz6HFjVQLAlVlrIhqRHjPZuCWWTzsESAkTRhUKxg4sg2L5tSGe45HgU2Sp/dEg74M Oz+dPes0bCSuo36+rCIf6mdUY+Sk4M4e+6r/pgkb55r8Lx5+rAK9PyC6bEDz0oicEC ocrbYIWMU7J9aC5kbWJdkdQJQ0dsS3hCi6vWqUDBv8LVlxNmBaHbHrQzWITcIRMJK9 5IuQxuYu8RpVw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=DiP8Sg0A Subject: [Buildroot] [PATCH] package/libfuse3: bump to version 3.12.0 X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Giulio Benetti , Asaf Kahlon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This new version needs a patch to deal with a build failure when SYMVER is not available. As described in the patch itself there is a #define in low_level.h header that is included in helper.c; that defines twice the same function because: in low_level.h: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts); #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts) ``` While in helper.c: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } int fuse_parse_cmdline(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } ``` and: #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts) makes helper.c expands to: ``` int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } int fuse_parse_cmdline_312(struct fuse_args *args, struct fuse_cmdline_opts *opts) { .... } ``` though fuse_parse_cmdline_312() defined twice. To fix this patch moves all the checking for FUSE_MAKE_VERSION into helper.c and doesn't redirect fuse_parse_cmdline() using #define in low_level.h. While doing this patch also uses HAVE_SYMVER_ATTRIBUTE instead of checking against __UCLIBC__ and __APPLE__. This because __UCLIBC__ can support SYMVER and in this case we would end up to have a double definition of fuse_parse_cmdline() instead. Patch is pending upstream: https://github.com/libfuse/libfuse/pull/698 Signed-off-by: Giulio Benetti --- ...e-with-uclibc-using-HAVE_SYMVER_ATTR.patch | 101 ++++++++++++++++++ package/libfuse3/libfuse3.hash | 2 +- package/libfuse3/libfuse3.mk | 2 +- 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 package/libfuse3/0001-Fix-build-failure-with-uclibc-using-HAVE_SYMVER_ATTR.patch diff --git a/package/libfuse3/0001-Fix-build-failure-with-uclibc-using-HAVE_SYMVER_ATTR.patch b/package/libfuse3/0001-Fix-build-failure-with-uclibc-using-HAVE_SYMVER_ATTR.patch new file mode 100644 index 0000000000..4886a54ca4 --- /dev/null +++ b/package/libfuse3/0001-Fix-build-failure-with-uclibc-using-HAVE_SYMVER_ATTR.patch @@ -0,0 +1,101 @@ +From f4e9e90660837576a3d772eca479485c55db3e91 Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Thu, 8 Sep 2022 23:37:19 +0200 +Subject: [PATCH] Fix build failure with uclibc using HAVE_SYMVER_ATTRIBUTE + macro and moving handling to helper.c file +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building with uclibc leads to failure: +``` +FAILED: lib/libfuse3.so.3.12.0.p/helper.c.o. +/home/giuliobenetti/git/upstream/test-libfuse3/bootlin-armv5-uclibc/host/bin/arm-linux-gcc -Ilib/libf +In file included from ../lib/fuse_i.h:10, + from ../lib/helper.c:14: +../include/fuse_lowlevel.h:1921:40: error: redefinition of ‘fuse_parse_cmdline_312’ + 1921 | #define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts) + | ^~~~~~~~~~~~~~~~~~~~~~ +../lib/helper.c:258:5: note: in expansion of macro ‘fuse_parse_cmdline’ + 258 | int fuse_parse_cmdline(struct fuse_args *args, + | ^~~~~~~~~~~~~~~~~~ +../lib/helper.c:208:5: note: previous definition of ‘fuse_parse_cmdline_312’ was here + 208 | int fuse_parse_cmdline_312(struct fuse_args *args, +``` +This happens because uclibc, depending on version, can support symver, so +if symver is supported and uclibc is used function fuse_parse_cmdline_312() +will be defined twice: +1. the function itself with symver +2. fuse_parse_cmdline() as the #define of fuse_parse_cmdline_312() and its +prototype +This leads to have the redefinition of ‘fuse_parse_cmdline_312’. + +To solve this let's check against HAVE_SYMVER_ATTRIBUTE instead of +__UCLIBC__ and __APPLE__ and move all the checks of FUSE_USE_VERSION to +helper.c file instead of fuse_lowlevel.h with #define fuse_parse_cmdline +that defines fuse_parse_cmdline_312() twice in helper.c leading to the +error above. + +Signed-off-by: Giulio Benetti +--- +Pending upstream: +https://github.com/libfuse/libfuse/pull/698 +--- + include/fuse_lowlevel.h | 12 ------------ + lib/helper.c | 9 ++++++--- + 2 files changed, 6 insertions(+), 15 deletions(-) + +diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h +index 53f0fcf..3e43efc 100644 +--- a/include/fuse_lowlevel.h ++++ b/include/fuse_lowlevel.h +@@ -1907,20 +1907,8 @@ struct fuse_cmdline_opts { + * @param opts output argument for parsed options + * @return 0 on success, -1 on failure + */ +-#if (!defined(__UCLIBC__) && !defined(__APPLE__)) + int fuse_parse_cmdline(struct fuse_args *args, + struct fuse_cmdline_opts *opts); +-#else +-#if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12) +-int fuse_parse_cmdline_30(struct fuse_args *args, +- struct fuse_cmdline_opts *opts); +-#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_30(args, opts) +-#else +-int fuse_parse_cmdline_312(struct fuse_args *args, +- struct fuse_cmdline_opts *opts); +-#define fuse_parse_cmdline(args, opts) fuse_parse_cmdline_312(args, opts) +-#endif +-#endif + + /** + * Create a low level session. +diff --git a/lib/helper.c b/lib/helper.c +index 84013b9..7f10ae4 100644 +--- a/lib/helper.c ++++ b/lib/helper.c +@@ -254,15 +254,18 @@ int fuse_parse_cmdline_30(struct fuse_args *args, + /** + * Compatibility ABI symbol for systems that do not support version symboling + */ +-#if (defined(__UCLIBC__) || defined(__APPLE__)) ++#if (!defined(HAVE_SYMVER_ATTRIBUTE)) + int fuse_parse_cmdline(struct fuse_args *args, + struct fuse_cmdline_opts *opts) + { +- return fuse_parse_cmdline_30(args, out_opts); ++#if FUSE_USE_VERSION < FUSE_MAKE_VERSION(3, 12) ++ return fuse_parse_cmdline_30(args, opts); ++#else ++ return fuse_parse_cmdline_312(args, opts); ++#endif + } + #endif + +- + int fuse_daemonize(int foreground) + { + if (!foreground) { +-- +2.34.1 + diff --git a/package/libfuse3/libfuse3.hash b/package/libfuse3/libfuse3.hash index 2fb5f329e3..bd77e77b75 100644 --- a/package/libfuse3/libfuse3.hash +++ b/package/libfuse3/libfuse3.hash @@ -1,3 +1,3 @@ # Locally calculated sha256 checksums -sha256 25a00226d2d449c15b2f08467d6d5ebbb2a428260c4ab773721c32adbc6da072 libfuse3-3.11.0.tar.gz +sha256 df6cc8807c4fd36b6b0ebef2b738dad6d19a9c7c085ccc3775063688d0bfcc0b libfuse3-3.12.0.tar.gz sha256 b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad LICENSE diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk index b3e3176708..8913f00af4 100644 --- a/package/libfuse3/libfuse3.mk +++ b/package/libfuse3/libfuse3.mk @@ -4,7 +4,7 @@ # ################################################################################ -LIBFUSE3_VERSION = 3.11.0 +LIBFUSE3_VERSION = 3.12.0 LIBFUSE3_SITE = $(call github,libfuse,libfuse,fuse-$(LIBFUSE3_VERSION)) LIBFUSE3_LICENSE = LGPL-2.1 LIBFUSE3_LICENSE_FILES = LICENSE