From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 08 Jan 2024 13:16:00 +0100 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 1rMoXw-008n6o-0N for lore@lore.pengutronix.de; Mon, 08 Jan 2024 13:16:00 +0100 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 1rMoXv-0006kc-TW; Mon, 08 Jan 2024 13:15:59 +0100 Received: from mout.kundenserver.de ([212.227.126.135]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rMoXV-0006jz-MA for ptxdist@pengutronix.de; Mon, 08 Jan 2024 13:15:34 +0100 Received: from Laptop-RR ([87.143.15.26]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MWRi7-1rfhtv2riF-00XvYe for ; Mon, 08 Jan 2024 13:15:32 +0100 Date: Mon, 8 Jan 2024 13:14:57 +0100 From: ruggero To: ptxdist@pengutronix.de Message-ID: <20240108131457.604dc6c4@Laptop-RR> Organization: AtB Biomag X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/Ppy5ftRmJ_xQZzfl8i59wUj" X-Provags-ID: V03:K1:/FYUt6IkfkzyP/xaNFpTTiII6Zv98OZOBWGm/54mRvxH1zYc6lU 1g3vuHbn7dA24uKFGir1g7S5H6RmUSdqp/0QTzpozyDNRtoK1rvTqWRffmqk2v2fcQfDVat CUPFI+Ji1wkz6DbW1bokwhBj/eZFhDRaojUnJEq1pgml4n6nTHHLUofkZelqD24JxtxjgZF j/Yltd5sbGX/Zk22F7N1w== UI-OutboundReport: notjunk:1;M01:P0:z+x4BFA+4W0=;ZUDvfx04lX6Sr14EVXI7lWP3tHx lmwjewM00OvcLK5qAmQh1KrG3LZCPDsSxphlVPA0WSpMz+kiUm1gP/qOusW6MRoS62gkx/x8D aSOZAS+QvVWjp7+Xwrgza3nR7P5XneLSfiyCnczoUuTiKjklIBH86hs48+6yy1d4PdoD4bdSy b4JLF/3kF+IuP38iic14YoVuT/kqwChDfea4l6Z9KWZu0cTnny0wl++dzfGS7DOhEg1ROm/UF lf/6YnHI3yAU38yUh3/NSvNaERUrX+1jI00IUqzEuScCxAxg7p1DfihNYj5ywTy7d4XQ4Q2kR ddEaNYyMHFOk2PB4FKusl6RlMBS7HBIAjeVDogCjY4UE+fClfHcLBvxKX80mE/hdd00ZWcYY1 R3aAOaCEV0G8tczURVGPnnRZudeuu5HZjtgWsOq8SjdVjaWos5kJVQqiLfgyz28JMBLPA/cmV Iria2kxxaWTf5r5kxFuXIBeyWXI8IaqN78rwiAOH9nXY7aRZjlwlLAXG85lPOVK5NZ4gbDonF /hmFU2dk6KN8ik5wPoxxoRztRT8HlsnztIC1VzxkMWIXXskMpikPWyOkJSCnjV6SYg2iGGlBJ 4r27xYj6m7D5vuCCvdoyJFibCbsTFLVtZfOfFcCGDV+nAPM/3knHDFs1N4VlNnm9ClU7bJI+6 s6nu73VVg0+7dtZJwPtwpC9sC/33Ip3Q+6lF8HRskvFSMuy8EpOOjSaNUyTstjkp6tQpHxAro ypoG3/9G7LMimr7stsJEjWvm4kTvJ0usitoaaxgMxSWYeO4mLZLYClzGTQ7H2o3N2/q1HDcsg 5HyFLmZwbIFemzMpVpKfR/Xct0tbKps8k0uaONC0PVXonoglLDajWRcKTFMCx9V1nX0YaguQE eskJeBPnys0mczw== 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=-1.7 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] Difficulties to compile package utils-linux while upgrading from PTXDIST-2023.09.0 to PTXDIST-2023.19.0. 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 --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello everybody, my BSP still uses an old version of linux / libC, that does not provide all modern features. Compiling utils-linux with PTXDIST-2023.09.0 was painless. Upgrading to PTXDIST-2023.11.0 caused several compilation errors. Both PTXDIST release uses the same version of utils-linux (2.39.2) the only difference being the build system. PTXDIST-2023.09.0 uses autotools, while PTXDIST-2023.11.0 uses meson. Here a list of the problems: My linux do not provide . This causes an error while compiling blkzone. My linux do not provide . This causes an error compiling blkpr. My linux do not provide . This causes an error compiling lsfd. My linux do not provide the symbol SIOCGSKNS in linux/sockios.h. This causes an error while compiling test_mkfds. In the autotool version, all these programs were disabled. This seems to be not possible with meson. My libC provides the symbol openpty in the libutils module. The PTXDIST-2023.09.0 makefile util-linux.make explicitly enables libutils, the PTXDIST-2023.11.0 explicitly disables them. I was able to find a solution to all the problems. Attached are my patches. In meson.build I disabled build of blkzone if linux/blkzoned.h does not exists, lsfd if linux/pr.h is missing, etc. In the makefile util-linux.make I just changed libutils form disabled to enabled. Maybe one can consider to use a parameter instead. I'm not sure if this is the best way to do, since it is my first experience with meson. It would be nice if somebody can check them, and maybe include them in the future versions of ptxdist. Ruggero --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-meson-dont-build-blkzone-if-blkzoned.h-is-not-available.patch Some versions of Linux don't provide linux/blkzoned.h. In this case, attempting to build blkzone produces an error. Suppress building of blkzone. Index: util-linux-2.39.2/meson.build =================================================================== --- util-linux-2.39.2.orig/meson.build +++ util-linux-2.39.2/meson.build @@ -1477,16 +1477,19 @@ exes += exe manadocs += ['sys-utils/blkdiscard.8.adoc'] bashcompletions += ['blkdiscard'] -exe = executable( - 'blkzone', - blkzone_sources, - include_directories : includes, - link_with : [lib_common], - install_dir : sbindir, - install : true) -exes += exe -manadocs += ['sys-utils/blkzone.8.adoc'] -bashcompletions += ['blkzone'] +have = cc.has_header('linux/blkzoned.h') +if have + exe = executable( + 'blkzone', + blkzone_sources, + include_directories : includes, + link_with : [lib_common], + install_dir : sbindir, + install : true) + exes += exe + manadocs += ['sys-utils/blkzone.8.adoc'] + bashcompletions += ['blkzone'] +endif exe = executable( 'blkpr', --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0003-meson-dont-build-blkpr-if-pr.h-is-not-available.patch Some versions of Linux don't provide linux/pr.h. In this case, attempting to build blkpr produces an error. Suppress building of blkpr. Index: util-linux-2.39.2/meson.build =================================================================== --- util-linux-2.39.2.orig/meson.build +++ util-linux-2.39.2/meson.build @@ -1491,15 +1491,18 @@ if have bashcompletions += ['blkzone'] endif -exe = executable( - 'blkpr', - blkpr_sources, - include_directories : includes, - link_with : [lib_common], - install_dir : sbindir, - install : true) -exes += exe -manadocs += ['sys-utils/blkpr.8.adoc'] +have = cc.has_header('linux/pr.h') +if have + exe = executable( + 'blkpr', + blkpr_sources, + include_directories : includes, + link_with : [lib_common], + install_dir : sbindir, + install : true) + exes += exe + manadocs += ['sys-utils/blkpr.8.adoc'] +endif exe = executable( 'ldattach', --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0004-meson-dont-build-lsfd-if-kcmp.h-is-not-available.patch Some versions of Linux don't provide linux/kcmp.h. In this case, attempting to build lsfd produces an error. Suppress building of lsfd. Index: util-linux-2.39.2/meson.build =================================================================== --- util-linux-2.39.2.orig/meson.build +++ util-linux-2.39.2/meson.build @@ -2595,17 +2595,20 @@ if not is_disabler(exe) bashcompletions += ['lsblk'] endif -exe = executable( - 'lsfd', - lsfd_sources, - include_directories : includes, - link_with : [lib_common, - lib_smartcols], - install_dir : usrbin_exec_dir, - install : true) -if not is_disabler(exe) - exes += exe - manadocs += ['misc-utils/lsfd.1.adoc'] +have = cc.has_header('linux/kcmp.h') +if have + exe = executable( + 'lsfd', + lsfd_sources, + include_directories : includes, + link_with : [lib_common, + lib_smartcols], + install_dir : usrbin_exec_dir, + install : true) + if not is_disabler(exe) + exes += exe + manadocs += ['misc-utils/lsfd.1.adoc'] + endif endif exe = executable( --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0005-meson-dont-build-mkfds-if-SIOCGSKNS-is-not-available.patch Some old version of Linux don't provide the SIOCGSKNS ioctl in linux/sockios.h. In this case, attempting to build test_mkfds produces an error. Suppress building of test_mkfds. Index: util-linux-2.39.2/meson.build =================================================================== --- util-linux-2.39.2.orig/meson.build +++ util-linux-2.39.2/meson.build @@ -3288,11 +3288,14 @@ exe = executable( exes += exe if LINUX - exe = executable( - 'test_mkfds', - 'tests/helpers/test_mkfds.c', - include_directories : includes) - exes += exe + have = cc.has_header_symbol('linux/sockios.h', 'SIOCGSKNS') + if have + exe = executable( + 'test_mkfds', + 'tests/helpers/test_mkfds.c', + include_directories : includes) + exes += exe + endif endif exe = executable( --MP_/Ppy5ftRmJ_xQZzfl8i59wUj Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=util-linux.make.patch --- /usr/local/lib/ptxdist-2023.11.0/rules/util-linux.make 2023-10-30 11:15:25.000000000 +0100 +++ util-linux.make 2024-01-07 18:24:56.336248170 +0100 @@ -127,7 +127,7 @@ -Dlibpcre2-posix=disabled \ -Dlibuser=disabled \ -Dlibutempter=disabled \ - -Dlibutil=disabled \ + -Dlibutil=enabled \ -Dmagic=disabled \ -Dncurses=$(call ptx/endis, UTIL_LINUX_USES_NCURSES)d \ -Dncursesw=$(call ptx/endis, PTXCONF_UTIL_LINUX_USES_NCURSESW)d \ --MP_/Ppy5ftRmJ_xQZzfl8i59wUj--