From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kCrdA5Qlwl/UIwAA0tVLHw (envelope-from ) for ; Sat, 28 Nov 2020 10:25:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IJQzO5Mlwl9LPAAAbx9fmQ (envelope-from ) for ; Sat, 28 Nov 2020 10:25:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ADD30940253 for ; Sat, 28 Nov 2020 10:25:23 +0000 (UTC) Received: from localhost ([::1]:35120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kixPu-0002uA-Md for larch@yhetil.org; Sat, 28 Nov 2020 05:25:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kixPb-0002WZ-Qa for guix-patches@gnu.org; Sat, 28 Nov 2020 05:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kixPb-0002eI-J9 for guix-patches@gnu.org; Sat, 28 Nov 2020 05:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kixPb-0006tj-Fh for guix-patches@gnu.org; Sat, 28 Nov 2020 05:25:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44899] [PATCH v2 0/4] Using 'ld.so.cache' to speed up application startup Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Nov 2020 10:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44899 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44899@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44899-submit@debbugs.gnu.org id=B44899.160655909326461 (code B ref 44899); Sat, 28 Nov 2020 10:25:03 +0000 Received: (at 44899) by debbugs.gnu.org; 28 Nov 2020 10:24:53 +0000 Received: from localhost ([127.0.0.1]:46986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kixPN-0006sV-Bl for submit@debbugs.gnu.org; Sat, 28 Nov 2020 05:24:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kixPE-0006rN-QP for 44899@debbugs.gnu.org; Sat, 28 Nov 2020 05:24:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42759) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kixP7-0002Sv-VL; Sat, 28 Nov 2020 05:24:33 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49898 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kixP7-0000YV-G6; Sat, 28 Nov 2020 05:24:33 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 28 Nov 2020 11:24:04 +0100 Message-Id: <20201128102409.3157-1-ludo@gnu.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201127083302.2578-1-ludo@gnu.org> References: <20201127083302.2578-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.77 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-TUID: K+bQrxrHT1PW Hi! This new version addresses the shortcomings I mentioned earlier and other issues reported on IRC: • ld.so no longer uses “../etc/ld.so.cache”. Instead, it (1) ensures $ORIGIN is in the store, (2) extracts the store file name, and (3) appends “/etc/ld.so.cache”. IOW, the ‘ld.so.cache’ is always resolved relative to the store directory $ORIGIN belongs to, not relative to $ORIGIN itself. Thinking about it, it’s a direct translation of the ld.so.cache model from FHS to the functional model where a system-wide /etc/ld.so.cache makes no sense. • ‘make-dynamic-linker-cache’ now creates an ‘ld.so.conf’ that contains all the dependencies, recursively, as would be returned by ‘ldd’. The new ‘file-needed/recursive’ procedure returns the list of shared objects depended on like ‘ldd’. • ‘make-dynamic-linker-cache’ creates ‘ld.so.conf’ in $TMPDIR rather than hard-code /tmp, so as to be friendlier to ‘--disable-chroot’ builds (as is currently used on GNU/Hurd). I’m rather happy and confident with that version. :-) Feedback welcome! Ludo’. Ludovic Courtès (4): gremlin: Fix typo in docstring. gremlin: Add 'file-needed/recursive'. gnu: glibc: Load 'etc/ld.so.cache' in $ORIGIN's store item when available. build-system/gnu: Add 'make-dynamic-linker-cache' phase. gnu/local.mk | 1 + gnu/packages/base.scm | 16 +-- gnu/packages/patches/glibc-dl-cache.patch | 140 ++++++++++++++++++++++ guix/build-system/gnu.scm | 4 + guix/build/gnu-build-system.scm | 68 +++++++++++ guix/build/gremlin.scm | 43 ++++++- tests/gremlin.scm | 36 ++++++ 7 files changed, 297 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/glibc-dl-cache.patch -- 2.29.2