From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 10 Sep 2024 09:07:39 +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 1snuyR-003551-12 for lore@lore.pengutronix.de; Tue, 10 Sep 2024 09:07:39 +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 1snuyQ-00082p-AF; Tue, 10 Sep 2024 09:07:38 +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 1snuxy-00082Q-DT for ptxdist@pengutronix.de; Tue, 10 Sep 2024 09:07:11 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1B36914812F6; Tue, 10 Sep 2024 09:07:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1725952029; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding; bh=+t7KdFRKdVPI6+h5XZ0lPr/DguRo5baJtLLPfKYHMtw=; b=Js9SfM2e8904kfMuiq3ceISa8YZVyLpDnSog02L9/GjzUbKL0oIuOWSmPNvZ341zdpd4iY NrQUuW3BEmjG7eVPagW99Ll9J/Jyla+1/SXV5orYaEiGLB27qG5N2P5Ensv2hdfY1+EfoX p05Xv2lENDIxHGpE3DBOiNXH4k3DBMrgk2S441Ivv6g/lUiaNQCrUb0r4kjrCc+bJx7t59 cyrXj1levSZgMM0e+8u8QUUqy3sdb5i3hW6pf+KXKToct23VW++ZsYA+F5CvB4U52qzPvz ZHKfz5RStLjd0eAbdvXSnlvPuMHcZaM+1sCVFynEV0w4YprNNdbnD7j45xxR5A== Date: Tue, 10 Sep 2024 09:07:01 +0200 From: Alexander Dahl To: util-linux@vger.kernel.org, ptxdist@pengutronix.de Message-ID: <13593969.uLZWGnKmhe@ada-pc> Mail-Followup-To: util-linux@vger.kernel.org, ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-KMail-Identity: 600738659 X-KMail-Transport: 2015100914 X-KMail-Templates: 123 X-KMail-Identity-Name: Alexander Dahl (thorsis, en) X-KMail-Transport-Name: thorsis.com X-Clacks-Overhead: GNU Terry Pratchett 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: [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 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 everyone, 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. Autotools build was fine. Build with a more recent toolchain (OSELAS.Toolchain-2023.07, gcc 13.2.1, glibc 2.37) is successful. =46rom 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.) % p -v -j1 compile util-linux =20 -------------------------- target: util-linux.compile -------------------------- =20 ptxdist: executing: PATH=3D/home/adahl/Work/bsp/thorsis/ncl/tmp/platfor= m-ncl/sysroot-cross/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/platform-n= cl/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/platform= -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_toolch= ain:/usr/local/lib/ptxdist-2024.05.0/bin:/home/adahl/Work/bsp/thorsis/ncl/t= mp/platform-ncl/sysroot-host/usr/bin:/home/adahl/Work/bsp/thorsis/ncl/tmp/p= latform-ncl/sysroot-host/usr/sbin:/home/adahl/Work/bsp/thorsis/ncl/tmp/sele= cted_toolchain:/usr/local/lib/ptxdist-2024.04.0/bin:/home/adahl/bin:/home/a= dahl/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/games HTTPS_PROXY=3DPTXDI= ST-UNALLOWED-DOWNLOAD HTTP_PROXY=3DPTXDIST-UNALLOWED-DOWNLOAD https_proxy= =3DPTXDIST-UNALLOWED-DOWNLOAD http_proxy=3DPTXDIST-UNALLOWED-DOWNLOAD PKGCO= NFIG_WHITELIST_HOST=3D'' PKGCONFIG_WHITELIST_TARGET=3D'' PKGCONFIG_WHITELIS= T_SRC=3D'util-linux' SYSROOT=3D'/home/adahl/Work/bsp/thorsis/ncl/tmp/platfo= rm-ncl/sysroot-target' V=3D1 VERBOSE=3D1 LC_ALL=3D'C.utf8' KBUILD_BUILD_TIM= ESTAMP=3D2020-08-01T00:00:00+00:00 KBUILD_BUILD_USER=3Dptxdist KBUILD_BUILD= _HOST=3Dptxdist ninja -C /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl= /build-target/util-linux-2.40.2-build -v -j1=20 =20 ninja: Entering directory `/home/adahl/Work/bsp/thorsis/ncl/tmp/platfor= m-ncl/build-target/util-linux-2.40.2-build' [1/75] arm-v5te-linux-gnueabi-gcc -o test_pty test_pty.p/lib_pty-sessi= on.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,--start= -group lib/libcommon.a -lm -lrt -Wl,--end-group /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc= -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-session.c= =2Eo: in function `ul_pty_setup': platform-ncl/build-target/util-linux-2.40.2-build/../util-linux-2.40.2/= lib/pty-session.c:198: undefined reference to `openpty' /opt/OSELAS.Toolchain-2020.08.0/arm-v5te-linux-gnueabi/gcc-10.2.1-glibc= -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-target/ut= il-linux-2.40.2-build/../util-linux-2.40.2/lib/pty-session.c:188: undefined= 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_world_= compile.make:20: /home/adahl/Work/bsp/thorsis/ncl/tmp/platform-ncl/state/ut= il-linux.compile] Error 1 Greets Alex [1] https://www.ptxdist.org/ [2] https://git.pengutronix.de/cgit/ptxdist/commit/?id=3D18c9c0f89c4148f300= 7b9fcc7833d99af60084dc