From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 04 Feb 2022 09:11:34 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nFtgr-005MLl-WF for lore@lore.pengutronix.de; Fri, 04 Feb 2022 09:11:34 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nFtgq-0000Aj-Vu; Fri, 04 Feb 2022 09:11:32 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFtfu-0000AI-1W; Fri, 04 Feb 2022 09:10:34 +0100 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nFtft-00ERaO-9J; Fri, 04 Feb 2022 09:10:32 +0100 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nFtfr-00H7ER-Gi; Fri, 04 Feb 2022 09:10:31 +0100 Date: Fri, 4 Feb 2022 09:10:31 +0100 From: Michael Olbrich To: Christian Melki Message-ID: Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20211015081333.GC2239952@pengutronix.de> <20211015142523.GL2239952@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] FYI glibc-2.34. 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: ptxdist@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Tue, Feb 01, 2022 at 02:27:00PM +0100, Christian Melki wrote: > With a large pinch of salt... I think there are several parts to this new > glibc behavior. > = > 1. A couple of libraries are now integrated. There is no need to ask for > linking with -lpthread, -ldl, -lutil, -lanl. But old binaries might have > them as DT_NEEDED. So glibc provides them as .so files anyway. Right, I heard about that. > 2. If you want to run older (< 2.34) binaries, you're going to have to > install the provided files anyway (braindead). That's called binary compatibility :-) > 3. Afaiu there is no real way of agnostically trying to determine the > provided runtime file name (not linktime file name which is what gcc > -print-file-name does) abi soname from something simple as a name.so > softlink, whatever that may be. Atleast not anymore. This creates issues > with finding and installing toolchain bits in ptxdist. The mess in install_copy_toolchain.sh is something I always tried to touch as little as possible because it's supposed to work with as many toolchains as possible. It's somewhere on my todo list to rewrite this and it looks like it's time to do that for glibc-2.34. > 4. -print-file-name is a linktime dependency. Not a runtime one. Ptxdist > intermixed those, as it was traditionally not an issue. So what do you get for -print-file-name=3Dlibpthread.so? The path to libc.s= o? I don't have a glibc-2.34 to test this. It looks like I need to do some refactoring here. But I need a glibc-2.34 toolchain first to test it. So it probably won't happen any time soon. Michael > /Christian > = > On 2/1/22 11:01 AM, Christian Melki wrote: > > Hi. > > = > > I need to revisit the glibc-2.34 naming changes. > > Afaiu, no changes has been made regarding this topic. > > So, 2022.01 is still not glibc-2.34 compatible? > > = > > glibc.make seems to get to libpthread. Ie, it completes these: > > = > > ifdef PTXCONF_GLIBC_LD > > =A0=A0=A0=A0=A0=A0=A0 @$(call install_copy_toolchain_dl, glibc) > > endif > > = > > ifdef PTXCONF_GLIBC_C > > =A0=A0=A0=A0=A0=A0=A0 @$(call install_copy_toolchain_lib, glibc, libc.= so.6) > > endif > > = > > ... > > = > > So it finds ld-linux-x86-64.so.2 and libc.so.6, files without any > > softlinks. > > = > > but: > > = > > ifdef PTXCONF_GLIBC_PTHREAD > > =A0=A0=A0=A0=A0=A0=A0 @$(call install_copy_toolchain_lib, glibc, libpt= hread.so) > > endif > > = > > fails, because it's named: > > sysroot/lib64/libpthread.so.0 without any other softlinks. > > = > > ... > > lib - x-tools/x86_64-secplatform-linux-gnu/x86_64-secplatform-lin= ux-gnu/sysroot/lib64/ld-linux-x86-64.so.2 > > = > > lib - /x-tools/x86_64-secplatform-linux-gnu/x86_64-secplatform-li= nux-gnu/sysroot/lib64/libc.so.6 > > = > > install_copy_toolchain_lib: libpthread.so not found > > make: *** [/lib/ptxdist-2022.01.0/rules/glibc.make:38: > > bin/platform-secplatform-x86_64/state/glibc.targetinstall] Error 1 > > = > > = > > = > > On 10/15/21 4:25 PM, Michael Olbrich wrote: > > > Hi, > > > = > > > On Fri, Oct 15, 2021 at 10:25:45AM +0200, Christian Melki wrote: > > > > I did rollback my new toolchain to 2.33 and I didn't keep the > > > > 2.34 one. :\. > > > > I think it was rather simple, it didn't find the library and I > > > > didn't dig > > > > much deeper. I'm not in dire need of 2.34, it was just a > > > > maintenance bump. > > > > = > > > > Maybe something to do with the platform PTXCONF_GLIBC_VERSION? > > > > = > > > > "Specify the glibc version this BSP shall be built with. This > > > > information is > > > > used to guess the toolchain path if you use "ptxdist toolchain" > > > > without an > > > > argument, and to install the glibc into the target file" > > > > = > > > > I can redo the toolchain. Do you have any suggestions? > > > = > > > My guess is, that the heuristics in scripts/install_copy_toolchain.sh > > > cannot handle the changes in 2.34, but I'm not sure. > > > = > > > Michael > > > = > > > > = > > > > Regards, > > > > Christian > > > > = > > > > On 10/15/21 10:13 AM, Michael Olbrich wrote: > > > > > On Mon, Oct 11, 2021 at 01:08:01PM +0200, Christian Melki wrote: > > > > > > Quote from changelog: > > > > > > = > > > > > > * Previously, glibc installed its various shared objects > > > > > > under versioned > > > > > > =A0=A0=A0 file names such as libc-2.33.so.=A0 The ABI sonames > > > > > > (e.g., libc.so.6) > > > > > > =A0=A0=A0 were provided as symbolic links.=A0 Starting with > > > > > > glibc 2.34, the shared > > > > > > =A0=A0=A0 objects are installed under their ABI sonames directl= y, without > > > > > > =A0=A0=A0 symbolic links.=A0 This increases compatibility with = distribution > > > > > > =A0=A0=A0 package managers that delete removed files late durin= g the package > > > > > > =A0=A0=A0 upgrade or downgrade process. > > > > > > = > > > > > > Seems like glibc decided to be a trainwreck from one > > > > > > version to another with > > > > > > no apparent mean of restoring old behavior for a > > > > > > smoother transition period? > > > > > > Ptxdist glibc installation fails with this naming > > > > > > scheme. If anyone knows > > > > > > any better here, please enlighten me. > > > > > = > > > > > Right, so PTXdist first tries to find the specified file, > > > > > e.g. libc.so.6, > > > > > and should then follow symlinks and deal with ld.so scripts. > > > > > I'm not sure > > > > > why that fails but it should be possible to fix it to handle > > > > > new and old > > > > > glibc versions. > > > > > What's the error that you get? > > > > > = > > > > > Michael > > > > > = > > > > > > (glibc-2.33 sysroot) > > > > > > ls -Gga ~/x-tools/x86_64-secplatform-linux-gnu/x86_64-secplatfo= rm-linux-gnu/sysroot/lib64 > > > > > > = > > > > > > total 58684 > > > > > > dr-xr-xr-x 2=A0=A0=A0=A0 4096 okt 11 10:31 . > > > > > > dr-xr-xr-x 8=A0=A0=A0=A0 4096 okt 11 10:31 .. > > > > > > -r-xr-xr-x 1=A0 1111208 okt 11 10:31 ld-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 10 okt 11 10:31 ld-linux-x86-64.= so.2 -> ld-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 65912 okt 11 10:31 libanl-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 14 okt 11 10:31 libanl.so.1 -> l= ibanl-2.33.so > > > > > > -r--r--r-- 1=A0=A0 312428 okt 11 10:31 libatomic.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 10:31 libatomic.so -> = libatomic.so.1.2.0 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 10:31 libatomic.so.1 -> > > > > > > libatomic.so.1.2.0 > > > > > > -r-xr-xr-x 1=A0=A0 109680 okt 11 10:31 libatomic.so.1.2.0 > > > > > > -r-xr-xr-x 1=A0=A0=A0 31672 okt 11 10:31 libBrokenLocale-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 23 okt 11 10:31 libBrokenLocale.= so.1 -> > > > > > > libBrokenLocale-2.33.so > > > > > > -r-xr-xr-x 1 11319128 okt 11 10:31 libc-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 129808 okt 11 10:31 libcrypt-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 16 okt 11 10:31 libcrypt.so.1 ->= libcrypt-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 12 okt 11 10:31 libc.so.6 -> lib= c-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 135648 okt 11 10:31 libdl-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 13 okt 11 10:31 libdl.so.2 -> li= bdl-2.33.so > > > > > > -r--r--r-- 1=A0=A0=A0=A0=A0 132 okt 11 10:31 libgcc_s.so > > > > > > -r--r--r-- 1=A0=A0 401048 okt 11 10:31 libgcc_s.so.1 > > > > > > -r--r--r-- 1=A0 1202376 okt 11 10:31 libitm.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 10:31 libitm.so -> lib= itm.so.1.0.0 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 10:31 libitm.so.1 -> l= ibitm.so.1.0.0 > > > > > > -r-xr-xr-x 1=A0=A0 774416 okt 11 10:31 libitm.so.1.0.0 > > > > > > -r--r--r-- 1=A0=A0=A0=A0=A0 162 okt 11 10:31 libitm.spec > > > > > > -r-xr-xr-x 1=A0 4455824 okt 11 10:31 libm-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 52016 okt 11 10:31 libmemusage.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 12 okt 11 10:31 libm.so.6 -> lib= m-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 549816 okt 11 10:31 libmvec-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 10:31 libmvec.so.1 -> = libmvec-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 510080 okt 11 10:31 libnsl-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 14 okt 11 10:31 libnsl.so.1 -> l= ibnsl-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 163800 okt 11 10:31 libnss_compat-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 21 okt 11 10:31 libnss_compat.so= .2 -> > > > > > > libnss_compat-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 144840 okt 11 10:31 libnss_db-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 17 okt 11 10:31 libnss_db.so.2 -= > libnss_db-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 91024 okt 11 10:31 libnss_dns-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 10:31 libnss_dns.so.2 = -> > > > > > > libnss_dns-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 233784 okt 11 10:31 libnss_files-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 20 okt 11 10:31 libnss_files.so.= 2 -> > > > > > > libnss_files-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 81408 okt 11 10:31 libnss_hesiod-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 21 okt 11 10:31 libnss_hesiod.so= .2 -> > > > > > > libnss_hesiod-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 22896 okt 11 10:31 libpcprofile.so > > > > > > -r-xr-xr-x 1=A0 1148240 okt 11 10:31 libpthread-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 10:31 libpthread.so.0 = -> > > > > > > libpthread-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 356952 okt 11 10:31 libresolv-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 17 okt 11 10:31 libresolv.so.2 -= > libresolv-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0 203832 okt 11 10:31 librt-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 13 okt 11 10:31 librt.so.1 -> li= brt-2.33.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 69136 okt 11 10:31 libSegFault.so > > > > > > -r--r--r-- 1 19645422 okt 11 10:31 libstdc++.a > > > > > > -r--r--r-- 1=A0 3393060 okt 11 10:31 libstdc++fs.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 19 okt 11 10:31 libstdc++.so -> = libstdc++.so.6.0.29 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 19 okt 11 10:31 libstdc++.so.6 -> > > > > > > libstdc++.so.6.0.29 > > > > > > -r-xr-xr-x 1 12057360 okt 11 10:31 libstdc++.so.6.0.29 > > > > > > -r--r--r-- 1=A0=A0=A0=A0 2513 okt 11 10:31 libstdc++.so.6.0.29-= gdb.py > > > > > > -r--r--r-- 1=A0=A0 928248 okt 11 10:31 libsupc++.a > > > > > > -r-xr-xr-x 1=A0=A0 268792 okt 11 10:31 libthread_db-1.0.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 19 okt 11 10:31 libthread_db.so.= 1 -> > > > > > > libthread_db-1.0.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 36944 okt 11 10:31 libutil-2.33.so > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 10:31 libutil.so.1 -> = libutil-2.33.so > > > > > > = > > > > > > (glibc-2.34 sysroot): > > > > > > $ ls -Gga ~/x-tools/x86_64-secplatform-linux-gnu/x86_64-secplat= form-linux-gnu/sysroot/lib64 > > > > > > = > > > > > > total 57276 > > > > > > dr-xr-xr-x 2=A0=A0=A0=A0 4096 okt 11 12:37 . > > > > > > dr-xr-xr-x 8=A0=A0=A0=A0 4096 okt 11 12:35 .. > > > > > > -r-xr-xr-x 1=A0 1223232 okt 11 12:35 ld-linux-x86-64.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 20144 okt 11 12:35 libanl.so.1 > > > > > > -r--r--r-- 1=A0=A0 312428 okt 11 12:37 libatomic.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 12:37 libatomic.so -> = libatomic.so.1.2.0 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 18 okt 11 12:37 libatomic.so.1 -> > > > > > > libatomic.so.1.2.0 > > > > > > -r-xr-xr-x 1=A0=A0 109680 okt 11 12:37 libatomic.so.1.2.0 > > > > > > -r-xr-xr-x 1=A0=A0=A0 31696 okt 11 12:35 libBrokenLocale.so.1 > > > > > > -r-xr-xr-x 1=A0=A0 185680 okt 11 12:35 libc_malloc_debug.so.0 > > > > > > -r-xr-xr-x 1=A0=A0 129656 okt 11 12:35 libcrypt.so.1 > > > > > > -r-xr-xr-x 1 12496192 okt 11 12:35 libc.so.6 > > > > > > -r-xr-xr-x 1=A0=A0=A0 21496 okt 11 12:35 libdl.so.2 > > > > > > -r--r--r-- 1=A0=A0=A0=A0=A0 132 okt 11 12:37 libgcc_s.so > > > > > > -r--r--r-- 1=A0=A0 401096 okt 11 12:37 libgcc_s.so.1 > > > > > > -r--r--r-- 1=A0 1202416 okt 11 12:37 libitm.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 12:37 libitm.so -> lib= itm.so.1.0.0 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 15 okt 11 12:37 libitm.so.1 -> l= ibitm.so.1.0.0 > > > > > > -r-xr-xr-x 1=A0=A0 774408 okt 11 12:37 libitm.so.1.0.0 > > > > > > -r--r--r-- 1=A0=A0=A0=A0=A0 162 okt 11 12:37 libitm.spec > > > > > > -r-xr-xr-x 1=A0=A0=A0 52048 okt 11 12:35 libmemusage.so > > > > > > -r-xr-xr-x 1=A0 3366704 okt 11 12:35 libm.so.6 > > > > > > -r-xr-xr-x 1=A0=A0 582480 okt 11 12:35 libmvec.so.1 > > > > > > -r-xr-xr-x 1=A0=A0 512040 okt 11 12:35 libnsl.so.1 > > > > > > -r-xr-xr-x 1=A0=A0 171968 okt 11 12:35 libnss_compat.so.2 > > > > > > -r-xr-xr-x 1=A0=A0 155232 okt 11 12:35 libnss_db.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 19312 okt 11 12:35 libnss_dns.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 19312 okt 11 12:35 libnss_files.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 81416 okt 11 12:35 libnss_hesiod.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 22920 okt 11 12:35 libpcprofile.so > > > > > > -r-xr-xr-x 1=A0=A0=A0 21200 okt 11 12:35 libpthread.so.0 > > > > > > -r-xr-xr-x 1=A0=A0 252296 okt 11 12:35 libresolv.so.2 > > > > > > -r-xr-xr-x 1=A0=A0=A0 26624 okt 11 12:35 librt.so.1 > > > > > > -r-xr-xr-x 1=A0=A0=A0 69720 okt 11 12:35 libSegFault.so > > > > > > -r--r--r-- 1 19645502 okt 11 12:37 libstdc++.a > > > > > > -r--r--r-- 1=A0 3393124 okt 11 12:37 libstdc++fs.a > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 19 okt 11 12:37 libstdc++.so -> = libstdc++.so.6.0.29 > > > > > > lrwxrwxrwx 1=A0=A0=A0=A0=A0=A0 19 okt 11 12:37 libstdc++.so.6 -> > > > > > > libstdc++.so.6.0.29 > > > > > > -r-xr-xr-x 1 12057664 okt 11 12:37 libstdc++.so.6.0.29 > > > > > > -r--r--r-- 1=A0=A0=A0=A0 2513 okt 11 12:37 libstdc++.so.6.0.29-= gdb.py > > > > > > -r--r--r-- 1=A0=A0 928248 okt 11 12:37 libsupc++.a > > > > > > -r-xr-xr-x 1=A0=A0 268904 okt 11 12:35 libthread_db.so.1 > > > > > > -r-xr-xr-x 1=A0=A0=A0 20152 okt 11 12:35 libutil.so.1 > > > > > > = > > > > > > _______________________________________________ > > > > > > ptxdist mailing list > > > > > > ptxdist@pengutronix.de > > > > > > To unsubscribe, send a mail with subject "unsubscribe" > > > > > > to ptxdist-request@pengutronix.de > > > > > > = > > > > > = > > > > = > > > > _______________________________________________ > > > > ptxdist mailing list > > > > ptxdist@pengutronix.de > > > > To unsubscribe, send a mail with subject "unsubscribe" to > > > > ptxdist-request@pengutronix.de > > > > = > > > = > > = > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > > To unsubscribe, send a mail with subject "unsubscribe" to > > ptxdist-request@pengutronix.de > = > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request= @pengutronix.de -- = 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 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@p= engutronix.de