From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6MGFKr20emDTjQAAgWs5BA (envelope-from ) for ; Sat, 17 Apr 2021 12:13:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cGUJJr20emDUMgAAbx9fmQ (envelope-from ) for ; Sat, 17 Apr 2021 10:13:17 +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 D16DF27B00 for ; Sat, 17 Apr 2021 12:13:16 +0200 (CEST) Received: from localhost ([::1]:44426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXhwx-0007c3-JS for larch@yhetil.org; Sat, 17 Apr 2021 06:13:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXhwk-0007aR-Qm for guix-patches@gnu.org; Sat, 17 Apr 2021 06:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXhwk-0006X1-JU for guix-patches@gnu.org; Sat, 17 Apr 2021 06:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXhwk-0000sq-EB for guix-patches@gnu.org; Sat, 17 Apr 2021 06:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47180] [PATCH] gnu: racket: Don't inject store paths into Racket files. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Apr 2021 10:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47180 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath Cc: jackhill@trilug.org, 47180@debbugs.gnu.org Received: via spool by 47180-submit@debbugs.gnu.org id=B47180.16186543573367 (code B ref 47180); Sat, 17 Apr 2021 10:13:02 +0000 Received: (at 47180) by debbugs.gnu.org; 17 Apr 2021 10:12:37 +0000 Received: from localhost ([127.0.0.1]:42323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXhwK-0000sF-RT for submit@debbugs.gnu.org; Sat, 17 Apr 2021 06:12:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXhwF-0000rx-PV for 47180@debbugs.gnu.org; Sat, 17 Apr 2021 06:12:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59604) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXhw9-00068V-Sm; Sat, 17 Apr 2021 06:12:26 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41150 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lXhw2-0007LQ-Uw; Sat, 17 Apr 2021 06:12:22 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210316025632.9767-1-philip@philipmcgrath.com> <87wnt9zwix.fsf@gnu.org> <877dl7psqc.fsf@gnu.org> <397f0533-1be0-aab8-d3e5-fd81d59ae1ce@philipmcgrath.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 28 Germinal an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 17 Apr 2021 12:12:13 +0200 In-Reply-To: <397f0533-1be0-aab8-d3e5-fd81d59ae1ce@philipmcgrath.com> (Philip McGrath's message of "Fri, 16 Apr 2021 16:16:04 -0400") Message-ID: <87bladz0ci.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618654397; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=2eZ7tsxclVBLaRfecgfdo1Cau2AXqubyUk1ruvzoS/k=; b=IwSKa1tBqwi0Lk8GA6NyO9sHVP020L47/GIQ6N7WvDZZA5p6tBCup4UVPO1EIKF4VQpFzO tzeDZBGaG/HCNmAR3nyAORVMiflHHGxAb6Dz/H2XRvUi7nqbbR8+sq/jy8UAur04Nc4czR tH9pSJK2IRyYDhlK+HoYHmG9FQDKiYgE0zkB8WXa1Bljhb/GBut4E7VYvBTCdOA0JtLpkK bdwB2NRMbF5fNZ1Nkaq9pV9lPW1eXAyq77KCaBoa3o5+UqYXe46JexM+ElyZ7FKP4BJHF6 O33LRpev6SGpHNLWz9bzcRbhrxTwOS6h8NMyJ5U3Ouqp9ILrkx9la2xyxjRf4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618654397; a=rsa-sha256; cv=none; b=akoelZ+0PdcRB4tZmZk1anmPSrFu2+W/KxtnXZ2sgSdzgl/rSnBBZ+nVh9CCff6dMJSGjx GcSIUL0SjaQwE8o0NdwzI0LdxFiYa+TbWbVWKcw1vtUSOJtCzhyOMd/wsmqPcLqJWunIH9 DBuYtC2S5LucMBE2UAkODzx9+sNONE9sVU8DycVruzfz9bt7J4U+lf2PleFtiFdrYGQSfX RnTPQjisR+VAMTgAx2ke3WCSL3IKTKzy/pg5rAv3alQWoJYXzwlXgmxt2iS3BJ5PFAJE1w Px4N9UQjmJVzvlSay5dguXJ/jy3T01Mqef7MnAYi6dmH+xaCSZv1TTVwG1aHWQ== ARC-Authentication-Results: i=1; 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-Migadu-Spam-Score: -1.44 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-Migadu-Queue-Id: D16DF27B00 X-Spam-Score: -1.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: NnlueEoVGUpv Hi, Philip McGrath skribis: > On 4/12/21 8:55 AM, Ludovic Court=C3=A8s wrote: >> Philip McGrath skribis: >>> Rather than using "config.rktd", an alternative approach would be to >>> set things up so that `dlopen` would find the foreign libraries, >>> perhaps via `LD_LIBRARY_PATH`. This has some intriguing possibilities: >>> I could imagine Guix providing an alternate `dlopen` implementation >>> that might be useful beyond Racket. >> What would that alternate dlopen do? It still has to know where to >> look >> for things, somehow. > > This was a very fuzzy thought with a lot of reliance on "somehow"=E2=80= =94I'm > not certain it would actually make sense or even be possible=E2=80=94but = what > I had in mind is that `dlopen`, together with the dynamic linker and > its various configuration and cache files, has some places it will > search for shared libraries, e.g. in "/lib" and "/usr/lib". If=20 > `gnu-build-system` could somehow communicate with those mechanisms, > then packages doing things like `dlopen("libm.so.6", RTLD_LAZY)` > wouldn't need to have their source code rewritten to include store > files: Guix would arrange for `dlopen` to find "libm.so.6" among the > package inputs. Then Guix would only need to know how to graft > whatever mechanism it used to configure things for `dlopen`, rather > than having to worry about all of the strange things compilers might > do with string literals. To me, the most practical way it can work is by explicitly replacing =E2=80=9Clibfoo.so=E2=80=9D with =E2=80=9C/gnu/store/=E2=80=A6/libfoo.so=E2= =80=9D in the source. We could change the =E2=80=98dlopen=E2=80=99 implementation altogether so t= hat it (say) looks for a meta-data file listing search paths, but that=E2=80=99s the kin= d of intrusive change I=E2=80=99d rather avoid. Also, there are cases where we actually want =E2=80=9Cdynamic binding=E2=80= =9D (search for the lib and load it *if* it=E2=80=99s available) rather than =E2=80=9Cs= tatic binding=E2=80=9D (hard-code the name of the library so it=E2=80=99s always = found when we dlopen it). This is the case for plugins and such. I guess we need to explore the problem space a bit further. :-) Thanks, Ludo=E2=80=99.