From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id D8F87385828D for ; Tue, 12 Jul 2022 13:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D8F87385828D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=heitbaum.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=heitbaum.com Received: by mail-lj1-x236.google.com with SMTP id c15so9862889ljr.0 for ; Tue, 12 Jul 2022 06:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heitbaum.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hnj7u4JflD1G35aakW3gYWPbDOZ/ZYWXsT3ElYiqy8I=; b=J+8FtZHlZzyVTJnmbn9xW0egfLGUUq8ktRsl5yyhfa5B6HDzxzHK2usfmuYfboWSPI hORBEHx9sob4/WjCvyZ+qpP+/9L30C/DFs5FB/TLBP+bqmOJSA5b/gcBEfUudfZeqZ0n TXm4RpZIGVZKI0q8ND1Jay6CRRTwX72C7uQBM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hnj7u4JflD1G35aakW3gYWPbDOZ/ZYWXsT3ElYiqy8I=; b=3+gWQebDTKER+RxfvY16WjJmZdw55ZpiUX/1ivKd3VvG8wXc3WCBSW/ycNn+q5Y9eo +NBhcAJaWnEUQZ+pJnnzDczuEoSiq4M++W4z1F8wjze7O6AgI++o2l5k7++berwba+Y2 EPpdi3sRavi/6Oia1nVyP/VNlQ1ViSzFxOFI5J9fvrJBU0kVDQzSj34rlzzq4pTz17kR 7jFZaAP/TwAQerJmpu+vYSV2163MbOfsWfQMsVhkgxVxtTefT9CqR8Lo9NGDIse0dIuh kd7BwmbLWnCX2wd3ZpzgYNTmCWStgBAD4I2flfTDlGB1Q7vRzQGfmdkIAfx2w8NGNCFI a9zA== X-Gm-Message-State: AJIora+wut7/ocJyQnzh8+kfGGnNtY6ZzM1ANfIOpwoU/xjBneczHIo/ lvuznjbKoFcJq83jt6AeN5jxlk9dq2S4PnWUAh1Yg2F3nibOMyz6 X-Google-Smtp-Source: AGRyM1vxBli5IIiYSRaZbcZMzplUisNyr0G8roQuJIzpXfgHwpnffyThHomp3QGfdQsPjPsPZpES8ORjsXUBHe5RNZM= X-Received: by 2002:a2e:8785:0:b0:25d:473b:b60f with SMTP id n5-20020a2e8785000000b0025d473bb60fmr13124419lji.354.1657631526340; Tue, 12 Jul 2022 06:12:06 -0700 (PDT) MIME-Version: 1.0 References: <20220624195919.435424-1-adhemerval.zanella@linaro.org> <20220624195919.435424-6-adhemerval.zanella@linaro.org> <0c64445d-a4f7-bb60-d165-e3c02d89549e@redhat.com> <6146A38B-2E47-46C1-BBFC-42646A8FF348@linaro.org> <20220710022804.GA9@4928bf7262b9> <03C5E291-37F6-4798-B50F-48C9DC49E3B7@linaro.org> In-Reply-To: From: Rudi Heitbaum Date: Tue, 12 Jul 2022 23:11:54 +1000 Message-ID: Subject: Re: [PATCH v7 5/5] linux: Add mount_setattr To: Adhemerval Zanella , libc-alpha@sourceware.org Cc: schwab@suse.de, carlos@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 13:12:15 -0000 Hi Adhemerval, I tracked down the build error with systemd being the HAVE_STRUCT_STATX was not being set in the meson.build - due to the conflict occurring with the inclusion of linux/fs.h. The fix was to drop linux/fs.h (the same as in gcc libsanitizer.) I'll raise an issue on the systemd GitHub. The following patch (whilst not tested on < glibc 2.36) allowed the compile to succeed.) --- a/meson.build 2022-07-12 12:20:25.366313151 +0000 +++ b/meson.build 2022-07-12 12:46:19.276121413 +0000 @@ -479,7 +479,6 @@ #include #include #include -#include ''' foreach decl : ['char16_t', --- a/src/shared/mount-util.c 2022-06-02 18:07:11.000000000 +0000 +++ b/src/shared/mount-util.c 2022-07-12 12:52:46.644787385 +0000 @@ -7,7 +7,6 @@ #include #include #include -#include #include "alloc-util.h" #include "chase-symlinks.h" --- a/src/core/namespace.c 2022-06-02 18:07:11.000000000 +0000 +++ b/src/core/namespace.c 2022-07-12 12:56:35.807502035 +0000 @@ -6,7 +6,6 @@ #include #include #include -#include #include "alloc-util.h" #include "base-filesystem.h" On Mon, 11 Jul 2022 at 23:13, Rudi Heitbaum wrote: > > Hi Adhemerval, > > linux-Add-fsconfig.patch broke the build, I reverted the others for a > clean revert. > Just adding linux-Add-fsconfig.patch back causes the systemd build to fai= l. > > Thanks > Rudi > > On Mon, 11 Jul 2022 at 22:51, Adhemerval Zanella > wrote: > > > > > > > > > On 9 Jul 2022, at 23:28, Rudi Heitbaum wrote: > > > > > > I am facing the same issue compiling gcc-12.1.0. but since > > > linux-Add-fsconfig.patch also facing the following error with > > > systemd-251.2. > > > > > > I was successfully able to compile systemd-251.2 by reverting: > > > - linux-Add-fsconfig.patch > > > - linux-Add-fspick.patch > > > - linux-Add-open_tree.patch > > > - linux-Add-tst-mount-to-check-for-Linux-new-mount-API.patch > > > - linux-Add-mount_setattr.patch > > > - stdlib-Implement-mbrtoc8-c8rtomb-and-the-char8_t-typ.patch > > > from 2a5b4f7a715921a232f67f6810268c6cd6aa0af2 > > > > Which patch exactly broke the build, because from the logs is hard to > > tell exactly (specially because it should not interfere with statx > > definition)? > > > > > > > > Executing (target): ninja > > > [100/868] Compiling C object src/basic/libbasic.a.p/chase-symlinks.c.= o > > > FAILED: src/basic/libbasic.a.p/chase-symlinks.c.o > > > /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64= -11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -Isrc/basic/libbas= ic.a.p -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -I= src/systemd -I../src/systemd -I. -I.. -I/var/media/DATA/home-rudi/LibreELEC= .tv/build.LibreELEC-Generic.x86_64-11.0-devel/toolchain/x86_64-libreelec-li= nux-gnu/sysroot/usr/include -fdiagnostics-color=3Dalways -D_FILE_OFFSET_BIT= S=3D64 -Wall -Winvalid-pch -Wextra -std=3Dgnu11 -O0 -Wno-format-signedness = -Wno-missing-field-initializers -Wno-unused-parameter -Wdate-time -Wendif-l= abels -Werror=3Dformat=3D2 -Werror=3Dimplicit-function-declaration -Werror= =3Dincompatible-pointer-types -Werror=3Dint-conversion -Werror=3Doverflow -= Werror=3Doverride-init -Werror=3Dreturn-type -Werror=3Dshift-count-overflow= -Werror=3Dshift-overflow=3D2 -Werror=3Dundef -Wfloat-equal -Wimplicit-fall= through=3D5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noret= urn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-dec= ls -Wshadow -Wstrict-aliasing=3D2 -Wstrict-prototypes -Wsuggest-attribute= =3Dnoreturn -Wunused-function -Wwrite-strings -Wno-unused-result -Werror=3D= missing-declarations -Werror=3Dmissing-prototypes -fdiagnostics-show-option= -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-stron= g -fvisibility=3Dhidden --param=3Dssp-buffer-size=3D4 -ffunction-sections -= fdata-sections -Werror=3Dshadow -include config.h -march=3Dx86-64-v3 -Wall = -pipe -O2 -fomit-frame-pointer -DNDEBUG -fno-schedule-insns -fno-schedule-i= nsns2 -Wno-format-truncation -fPIC -pthread -fvisibility=3Ddefault -MD -MQ = src/basic/libbasic.a.p/chase-symlinks.c.o -MF src/basic/libbasic.a.p/chase-= symlinks.c.o.d -o src/basic/libbasic.a.p/chase-symlinks.c.o -c ../src/basic= /chase-symlinks.c > > > In file included from ../src/basic/stat-util.h:13, > > > from ../src/basic/chase-symlinks.h:7, > > > from ../src/basic/chase-symlinks.c:6: > > > ../src/basic/missing_stat.h:39:8: error: redefinition of 'struct stat= x_timestamp' > > > 39 | struct statx_timestamp { > > > | ^~~~~~~~~~~~~~~ > > > In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.Li= breELEC-Generic.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysr= oot/usr/include/bits/statx.h:31, > > > from /var/media/DATA/home-rudi/LibreELEC.tv/build.Lib= reELEC-Generic.x86_64-11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysro= ot/usr/include/sys/stat.h:465, > > > from ../src/basic/stat-util.h:7: > > > /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64= -11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/linux/= stat.h:56:8: note: originally defined here > > > 56 | struct statx_timestamp { > > > | ^~~~~~~~~~~~~~~ > > > ../src/basic/missing_stat.h:45:8: error: redefinition of 'struct stat= x' > > > 45 | struct statx STATX_DEFINITION; > > > | ^~~~~ > > > /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64= -11.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/linux/= stat.h:99:8: note: originally defined here > > > 99 | struct statx { > > > | ^~~~~ > > > > > > Regards > > > Rudi > > > > > > On Wed, Jul 06, 2022 at 09:21:32AM -0300, Adhemerval Zanella wrote: > > >> > > >>> On 6 Jul 2022, at 06:25, Andreas Schwab wrote: > > >>> > > >>> This is causing a conflict with , breaking the build= of > > >>> gcc. > > >>> > > >>> In file included from /usr/include/linux/fs.h:19, > > >>> from ../../../../libsanitizer/sanitizer_common/sanit= izer_platform_limits_posix.cpp:76: > > >>> /usr/include/linux/mount.h:95:6: error: multiple definition of 'enu= m fsconfig_command' > > >>> 95 | enum fsconfig_command { > > >>> | ^~~~~~~~~~~~~~~~ > > >>> In file included from ../../../../libsanitizer/sanitizer_common/san= itizer_platform_limits_posix.cpp:63: > > >>> /usr/include/sys/mount.h:189:6: note: previous definition here > > >>> 189 | enum fsconfig_command > > >>> | ^~~~~~~~~~~~~~~~ > > >>> /usr/include/linux/mount.h:129:8: error: redefinition of 'struct mo= unt_attr' > > >>> 129 | struct mount_attr { > > >>> | ^~~~~~~~~~ > > >>> /usr/include/sys/mount.h:161:8: note: previous definition of 'struc= t mount_attr' > > >>> 161 | struct mount_attr > > >>> | ^~~~~~~~~~ > > >>> make[4]: *** [Makefile:617: sanitizer_platform_limits_posix.lo] Err= or 1 > > >> > > >> I am not sure how to handle it, glibc sys/mount.h should be a standa= lone > > >> header. Maybe check if _UAPI_LINUX_MOUNT_H is defined so to use the > > >> kernel definition? Or check the kernel version and __has_include and= use > > >> kernel version instead? > > >> > > >>> > > >>> -- > > >>> Andreas Schwab, SUSE Labs, schwab@suse.de > > >>> GPG Key fingerprint =3D 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0E= EA B9D7 > > >>> "And now for something completely different." > > >> > >