From patchwork Mon Sep 19 21:02:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1679733 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=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4MWcZB24y6z1ypS for ; Tue, 20 Sep 2022 07:02:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E507460A6D; Mon, 19 Sep 2022 21:02:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E507460A6D 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 pePTM0Uumqfm; Mon, 19 Sep 2022 21:02:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id D743C60899; Mon, 19 Sep 2022 21:02:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D743C60899 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 31CCF1BF2B8 for ; Mon, 19 Sep 2022 21:02:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1AB5060899 for ; Mon, 19 Sep 2022 21:02:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1AB5060899 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 d-iQjzaFrr7k for ; Mon, 19 Sep 2022 21:02:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3C058607F0 Received: from smtpcmd01-sp1.aruba.it (smtpcmd01-sp1.aruba.it [62.149.158.218]) by smtp3.osuosl.org (Postfix) with ESMTP id 3C058607F0 for ; Mon, 19 Sep 2022 21:02:14 +0000 (UTC) Received: from localhost.localdomain ([146.241.95.233]) by Aruba Outgoing Smtp with ESMTPSA id aNu7oh8LEsT4eaNu7osgfi; Mon, 19 Sep 2022 23:02:11 +0200 From: Giulio Benetti To: buildroot@buildroot.org Date: Mon, 19 Sep 2022 23:02:10 +0200 Message-Id: <20220919210210.953105-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <30d676b5-f3c6-9d16-70cb-a77541c7ab3d@benettiengineering.com> References: <30d676b5-f3c6-9d16-70cb-a77541c7ab3d@benettiengineering.com> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfBWxP4bvEOqx4nY5fI6sGwH/uzWCVkPMnWc9VLFVoALP6QHQyFfPGn6kJOKFNff9G2+L2SBZZxYwAOj7U0oiA0j0Xu9zsX6oHys9xa4TYv0Gpx0ropkV nr7n86g/dgua1qvELxlzAcgRKIrC9nLH2CfTZKbyLcZvN3Z7XfA+KC3K0Gr6RlLld3Gd63OBizEoklF/GxT6hsnp+lICj6lCuoSPb8RZVpv9mcMV4wTGrjAS grEtYh9rDVBPQxVV0tcTbhow0W3Q8Ps2wBDDxCKlKSXdz6hU2eQgbbMfBB9hrcO/msQakvYilvinojpj08LIUg== X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1663621331; bh=A0ANQh0L/BA2y0q2FbyTp/W1aVv7ZR62LuPb5ZDkLq4=; h=From:To:Subject:Date:MIME-Version:Content-Type; b=enYIDcpfu67J0IKvbBlTeEb3KmUcp+24nHKbwF17cVOsQoxDunj2/rAGlOtlBhfTv RIMyPKIeh/znOqH6LBV11gnLp9WcqwLrEZnemEAZmWwLEa07hNl52UEGk/MZv9E7TX oucYq9rY1jIi9rsnHRh+Mqqf9hRkrUdecp7rBovHPi1rwJUaLQJKpmIOdFXkbrCFfX RQGlM8+56R4TrUAE0PyEmxUe7HTe0N8Uhtb7OuAfjubbdaVWXalsu7O4sfUbk3+suV 1zgr6VRCd9IEXei3YdLEwPcyV4qn8/MTaPURwbFF2+TSpWFhsswLE2F81qCqn4A0ty W5T1GvUILNuZQ== 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=enYIDcpf Subject: [Buildroot] [PATCH v2] 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); ``` 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: 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. Patch is pending upstream: https://github.com/libfuse/libfuse/pull/698 Signed-off-by: Giulio Benetti --- V1->V2: * fixed patch by not relying on HAVE_SYMVER_ATTRIBUTE since this is mandatory to fix the bug. It's something that can improve symver usage in case uclibc is used as libc. --- .../0001-Fix-build-failure-with-uclibc.patch | 89 +++++++++++++++++++ package/libfuse3/libfuse3.hash | 2 +- package/libfuse3/libfuse3.mk | 2 +- 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 package/libfuse3/0001-Fix-build-failure-with-uclibc.patch diff --git a/package/libfuse3/0001-Fix-build-failure-with-uclibc.patch b/package/libfuse3/0001-Fix-build-failure-with-uclibc.patch new file mode 100644 index 0000000000..53aef804ba --- /dev/null +++ b/package/libfuse3/0001-Fix-build-failure-with-uclibc.patch @@ -0,0 +1,89 @@ +From d2face15092e87450dc93201d5622451e73e0928 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 +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 move all the checks of FUSE_USE_VERSION to helper.c +file from fuse_lowlevel.h exposing only fuse_parse_cmdline(). + +Signed-off-by: Giulio Benetti +--- + include/fuse_lowlevel.h | 12 ------------ + lib/helper.c | 7 +++++-- + 2 files changed, 5 insertions(+), 14 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..c610920 100644 +--- a/lib/helper.c ++++ b/lib/helper.c +@@ -258,11 +258,14 @@ int fuse_parse_cmdline_30(struct fuse_args *args, + 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