From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 10 Sep 2024 13:01:50 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1snyd4-0038Ae-2K for lore@lore.pengutronix.de; Tue, 10 Sep 2024 13:01:50 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1snyd3-0003mk-Rw; Tue, 10 Sep 2024 13:01:49 +0200 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1snycp-0003mC-4w; Tue, 10 Sep 2024 13:01:35 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2E07A1486493; Tue, 10 Sep 2024 13:01:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1725966094; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Gc5KmOv4zbF1zqd7AIkO1slaqYr6Y/7MddixmV+xg+o=; b=saau85bbiDUokemX0aVEeuqh0H+bnBRVmTUe31d15kUqAtnWZApoSaYORAfYKQbNWqF0S8 wJ3Qx2fvW90/e0vUpsAYmyL5Hr7o2LAPGKgH7IBreIxvM+F0ZdV1n1PXx1SW9yds5VfWHF kkD1LPCvDIz4yJckocMBAbDMfVu5MRwYJyj4/BqcN/KAABv4POxPmK+QdH52OxiiRKgail CGpwk9klAwAu+Nhi0erSBEt2q9JCbPiWEojDEdvn6ngvp1r6vIWQgIoJafOjspTJ4nh73B BbKs7LnVEQ7VORh+OaxHIaIW5PjPYk1mXESLDcFvAVLhXz4hRmka6gCdlTqhhg== Date: Tue, 10 Sep 2024 13:01:33 +0200 From: Alexander Dahl To: Michael Olbrich Message-ID: <20240910-skiing-ecologist-7192a4c5636d@thorsis.com> Mail-Followup-To: Michael Olbrich , util-linux@vger.kernel.org, ptxdist@pengutronix.de References: <13593969.uLZWGnKmhe@ada-pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] util-linux build error with meson and older glibc X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: util-linux@vger.kernel.org, ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hello, Am Tue, Sep 10, 2024 at 12:00:26PM +0200 schrieb Michael Olbrich: > On Tue, Sep 10, 2024 at 09:07:01AM +0200, Alexander Dahl wrote: > > Hello everyone, > >=20 > > building util-linux with ptxdist [1] here. After switching to meson > > build [2], compiling util-linux fails with OSELAS.Toolchain-2020.08.0 > > which contains gcc-10.2.1 and glibc-2.32. Building for architecture > > arm-v5te-linux-gnueabi here, console output below. > >=20 > > Autotools build was fine. Build with a more recent toolchain > > (OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful. > >=20 > > From looking at the linker options I suspect -lutil missing? > > According to manpage that's a BSD function present in glibc. > > I suspect a change in glibc 2.34 integrating libutil in core glibc, > > which makes it work with recent version 2.37. So this is probably a > > flaw in meson build not setting the necessary linker options for glibc > > up to 2.33? Could anyone point me how to fix this or does anyone by > > chance already have a patch for this? (Disclaimer: I have zero > > experience with meson.) >=20 >=20 > There is a -Dlibutil=3Ddisabled in rules/util-linux.make. Maybe try to > enable that? This did it. Sent a patch already: Link: https://lore.ptxdist.org/ptxdist/20240910105459.3468520-1-ada@thorsis= =2Ecom/T/#u Thanks and Greets Alex >=20 > Michael >=20 > > % p -v -j1 compile util-linux > > =20 > > -------------------------- > > target: util-linux.compile > > -------------------------- > > =20 > > ptxdist: executing: PATH=3D/home/adahl/Work/bsp/thorsis/ncl/tmp/pla= tform-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platfo= rm-ncl/sysroot-cross/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform= -ncl/sysroot-host/usr/lib/wrapper:/home/adahl/Work/bsp/thorsis/ncl/tmp/plat= form-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform= -ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/selected_to= olchain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/n= cl/tmp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/t= mp/platform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/= selected_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/ho= me/adahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games HTTPS_PROXY=3DP= TXDIST-UNALLOWED-DOWNLOAD HTTP_PROXY=3DPTXDIST-UNALLOWED-DOWNLOAD https_pro= xy=3DPTXDIST-UNALLOWED-DOWNLOAD http_proxy=3DPTXDIST-UNALLOWED-DOWNLOAD PKG= CONFIG_WHITELIST_HOST=3D'' PKGCONFIG_WHITELIST_TARGET=3D'' PKGCONFIG_WHITEL= IST_SRC=3D'util-linux' SYSROOT=3D'/home/adahl/Work/bsp/thorsis/ncl/tmp/plat= form-ncl/sysroot-target' V=3D1 VERBOSE=3D1 LC_ALL=3D'C.utf8' KBUILD_BUILD_T= IMESTAMP=3D2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=3Dptxdist KBUILD_BUI= LD_HOST=3Dptxdist ninja -C /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-n= cl/build-target/util-linux-2.40.2-build -v -j1=20 > > =20 > > ninja: Entering directory `/home/adahl/Work/bsp/thorsis/ncl/tmp/pla= tform-ncl/build-target/util-linux-2.40.2-build' > > [1/75] arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-s= ession.c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined = -Wl,--start-group lib/libcommon.a -lm -lrt -Wl,--end-group > > FAILED: test_pty=20 > > arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-session.= c.o test_pty.p/lib_monotonic.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--s= tart-group lib/libcommon.a -lm -lrt -Wl,--end-group > > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-g= libc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi= /10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: test_pty.p/lib_pty-sessi= on.c.o: in function `ul_pty_setup': > > platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.4= 0.2/lib/pty-session.c:198: undefined reference to `openpty' > > /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-g= libc-2.32-binutils-2.35-kernel-5.8-sanitized/lib/gcc/arm-v5te-linux-gnueabi= /10.2.1/../../../../arm-v5te-linux-gnueabi/bin/ld: platform-ncl/build-targe= t/util-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188: undef= ined reference to `openpty' > > collect2: error: ld returned 1 exit status > > ninja: build stopped: subcommand failed. > > make: *** [/usr/local/lib/ptxdist-2024.05.0/rules/post/ptxd_make_wo= rld_compile.make:20: /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/stat= e/util-linux.compile] Error 1 > >=20 > > Greets > > Alex > >=20 > > [1] https://www.ptxdist.org/ > > [2] https://git.pengutronix.de/cgit/ptxdist/commit/?id=3D18c9c0f89c4148= f3007b9fcc7833d99af60084dc > >=20 > >=20 >=20 > --=20 > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | >=20