From nobody Thu Nov 16 19:41:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SWVlH684Yz511kT; Thu, 16 Nov 2023 19:41:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SWVlH0FJfz3bk5; Thu, 16 Nov 2023 19:41:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3AGJf7wD025401; Thu, 16 Nov 2023 21:41:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3AGJf7wD025401 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3AGJf7wB025400; Thu, 16 Nov 2023 21:41:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 16 Nov 2023 21:41:06 +0200 From: Konstantin Belousov To: Jessica Clarke Cc: Dima Panov , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 99132daf6f70 - main - rc.d/ldconfig: Prepend rtld stdlib paths to ldconfig(32)_paths Message-ID: References: <202311132339.3ADNdZKF081019@gitrepo.freebsd.org> <7E6896FA-85A3-41DC-9ECA-1D12B78BDA2E@freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7E6896FA-85A3-41DC-9ECA-1D12B78BDA2E@freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4SWVlH0FJfz3bk5 On Thu, Nov 16, 2023 at 01:33:12PM +0000, Jessica Clarke wrote: > On 16 Nov 2023, at 12:44, Dima Panov wrote: > > > > Moin-moin! > > > > > > This cause some errors while running, at least on aarch64, host and poudriere jail > > > > > > # service ldconfig restart > > ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg /usr/local/lib/e2fsprogs /usr/local/lib/mysql /usr/local/lib/perl5/5.38/mach/CORE /usr/local/llvm16/lib > > ELF binary type "9" not known. > > eval: /libexec/ld-elf32.so.1: Exec format error > > 32-bit compatibility ldconfig path: /usr/lib32 > > Yeah this breaks if the kernel and/or hardware don’t support 32-bit > compat (not uncommon on modern Arm hardware). Interestingly, it seems to be impossible to detect that arm64 hardware does not support executing in aarch32 mode, except trying to run a binary. Am I missing something? Would it be better to not register 32bit elf brand at all if hardware is not capable? > > Also, parsing the human-readable output of ld-elf.so.1 -v to determine > the path seems wrong and fragile. Given the above problem I think this > should just be reverted, but if we instead want to press ahead with > something like this (with suitable handling of this case) then we > should really have ld-elf.so.1 produce machine-readable output (which > could just be the space-separated string) for use the rc script, not go > mangling -v’s output. But I really don’t see the issue with putting the > paths in the script... Would would you qualify as machine-readable output from ld-elf.so.1 -v? Are you against spaces in the item key names?