From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AE18E3858415 for ; Fri, 19 May 2023 12:30:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE18E3858415 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684499410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R8YwVIA43gZyRFjy2/U+Z/yMZ0OzQJE93dpCXpeQ1kg=; b=QnwTaNOJPVq1SWiNN3tt9GPLVfHCmoriQVufhUSss+FwWbfJKu74h/6Dsx6waJW1wHUkUQ 1temKJ0duVjpP27WdHAIJ3ZrkCSU/4mXoR6VjU+SmnTA1gWg9eULVAhb/VnxYj5Ow42Ir8 HDATeHdzYmFrkkNSo88LSjVhzMjoEUU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-553-RiFVYd6uPoqbUsPgxIuEFg-1; Fri, 19 May 2023 08:30:07 -0400 X-MC-Unique: RiFVYd6uPoqbUsPgxIuEFg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D83711C02D27; Fri, 19 May 2023 12:30:06 +0000 (UTC) Received: from oldenburg3.str.redhat.com (unknown [10.39.192.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34C8A7C2A; Fri, 19 May 2023 12:30:06 +0000 (UTC) From: Florian Weimer To: Sergey Bugaev via Libc-alpha Cc: bug-hurd@gnu.org, Sergey Bugaev Subject: Re: [RFC PATCH 0/2] On ldconfig and ld.so.cache References: <20230517185422.71084-1-bugaevc@gmail.com> Date: Fri, 19 May 2023 14:30:05 +0200 In-Reply-To: <20230517185422.71084-1-bugaevc@gmail.com> (Sergey Bugaev via Libc-alpha's message of "Wed, 17 May 2023 21:54:20 +0300") Message-ID: <87fs7sjygi.fsf@oldenburg3.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Sergey Bugaev via Libc-alpha: > Moreover, Debian GNU/Hurd, the primary Hurd-based distribution, has been > shipping ld.so.cache on Hurd as a downstream patch [1] (note that more > changes would be required for x86_64-gnu because of FLAG_X8664_LIB64). > They don't really have a choice, it seems: with their "multiarch" > filesystem layout, the shared libraries are to be located in > /lib/i386-gnu/, but that is not a path that ld.so searches for libraries > in! This is solved by use_ldconfig=3Dyes, and putting /lib/i386-gnu/ into > /etc/ld.so.conf.d/i386-gnu.conf, where it is then picked up by ldconfig, > which finds all the libraries and bakes their paths into the cache, where > ld.so then picks them up. > > [1]: https://salsa.debian.org/glibc-team/glibc/-/raw/sid/debian/patches/h= urd-i386/local-enable-ldconfig.diff > > This is also another thing that suprises me: how come ldconfig does read > ld.so.conf, but ld.so does not? It's not an "ldconfig.conf" after all... > How is one even supposed to configure library paths with use_ldconfig=3Dn= o? The cache isn't really a cache, it's required for correct operation. Debian hasn't upstreamed there multi-arch path layouts. We could implement multi-arch ldconfig in /etc/ld.so.cache, but with the paths that Debian currently uses, it's not easy because there's no automated way ldconfig can recognize the relevant subdirectories. There's no intermediate directly like =E2=80=9C=E2=80=A6/glibc-hwcaps/=E2=80=A6=E2=80= =9D that could serve as a marker. I suppose we could look for subdirectories containing libc.so.6 files and its variants as an approximation =E2=80=A6 Multi-arch /etc/ld.so.cache needs some new on-disk data structures. Thanks, Florian