From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id cCjONCo0wmU2HAAA62LTzQ:P1 (envelope-from ) for ; Tue, 06 Feb 2024 14:29:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cCjONCo0wmU2HAAA62LTzQ (envelope-from ) for ; Tue, 06 Feb 2024 14:29:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=o+cbG50e; dmarc=pass (policy=none) header.from=zancanaro.id.au; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707226154; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=/WDOgOfxHIUcdqJKLJc+1gdIfzOVUu6eQcqJTaWrH24=; b=WZRTcuzmIKq0U1ytUmUeBqQaxYLwKoTAHH8hvEiSb4DE5jAa/xoQLXKL1TrtFh3mXdrrAk Nnzi9Ixy9mYY5st1tUJjGbCi6yiUN4j+LTQ+XERp1UQYqTT8Ubsv0yGLwO4KHGdgxQGzqC UeegMfthTGMhLNrxY1Sq6aXZtThE6WbDeU1NuxO5kK44n59pm0xkp+Ix6tEQZjkZteOG+G a/gS27NnBPsfZkMaoAMwi/q9/t1/e4I+WynbUsgDdCiV6WktaFF9yVXu2FuEygQNbB04/i n1XkRqr3a8vn2kE17iHnooAisRP5UB65A+NcEJW+YJzgwaVeAGccP4N4LLM0gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=zancanaro.id.au header.s=k1 header.b=o+cbG50e; dmarc=pass (policy=none) header.from=zancanaro.id.au; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707226154; a=rsa-sha256; cv=none; b=Seks6sIfjQTRj7HLYZ5Rx3yAbpVUiAbFlvgx9JNwQ9zBOvO05Rv/2gox9la6DqOEJ+virj FDKMyIap1aWb2Eb4wren/W9xuZ0ZN3yf/IGByjbOzBEazymO95PFUy1cacvjW/Z7asWUAw YWi4d4Ecr3YRf2xA1vallIuxwZL88kZtsuPao3AYrukMvXk7S/jDZeOQnaZCv4lqOn+MpQ S9YOJxXIMb/R76PboxSC6UshQ6A5BkDbaTVWDqaNhTayZwpY7cOEs73DxBLS4DxNAG6VHK hyUOyctBdXgNuHjedySuGhEfNY1VpSHUSaSguGqSDdNSwR9pzf3lzonx04HT7Q== 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 8C4A3118AD for ; Tue, 6 Feb 2024 14:29:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXLVD-0008Qm-Bk; Tue, 06 Feb 2024 08:28:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXLVA-0008QC-5J for help-guix@gnu.org; Tue, 06 Feb 2024 08:28:40 -0500 Received: from voltorb.zancanaro.id.au ([45.77.50.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXLV6-00086v-WE for help-guix@gnu.org; Tue, 06 Feb 2024 08:28:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=k1; bh=/WDOgOfxHIUcdqJ KLJc+1gdIfzOVUu6eQcqJTaWrH24=; h=date:references:in-reply-to:subject: cc:to:from; d=zancanaro.id.au; b=o+cbG50eTGCLNWyWAQQxnsB30MNjMxFYwEYFk Ztu7vW4gB7ACILNsrICqUdYlACgJpfbAZX8U/rUuUGP0+Hb2S7Q5mNp0s9Xm6Slq3jXXoL ymuOpfQQCSuStR5YAT2Eedv/j9Y3LabNlusmONPwdE0UNCCeuQFe8X34nn6nTJHQ= Received: by voltorb.zancanaro.id.au (OpenSMTPD) with ESMTPSA id 1a0191f3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 6 Feb 2024 13:28:30 +0000 (UTC) From: Carlo Zancanaro To: Marek =?utf-8?Q?Pa=C5=9Bnikowski?= Cc: help-guix@gnu.org Subject: Re: How do I use wrap-ruby-program to make curl findable in a Ruby package? In-Reply-To: <4857152.LvFx2qVVIh@akashi> ("Marek =?utf-8?Q?Pa=C5=9Bnikowsk?= =?utf-8?Q?i=22's?= message of "Tue, 06 Feb 2024 13:42:43 +0100") References: <38010331.XM6RcZxFsP@akashi> <8965685.VV5PYv0bhD@akashi> <87fry5iy1n.fsf@zancanaro.id.au> <4857152.LvFx2qVVIh@akashi> Date: Wed, 07 Feb 2024 00:28:32 +1100 Message-ID: <87wmrhhgcf.fsf@zancanaro.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=45.77.50.64; envelope-from=carlo@zancanaro.id.au; helo=voltorb.zancanaro.id.au X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.17 X-Spam-Score: -9.17 X-Migadu-Queue-Id: 8C4A3118AD X-Migadu-Scanner: mx12.migadu.com X-TUID: MT9DgvMwpICb Hi Marek, On Tue, Feb 06 2024, Marek Pa=C5=9Bnikowski wrote: > 06.02.2024 13:20:52 CET Carlo Zancanaro: >> I'm glad you got something working. Using wrap-program like this will >> likely work, but with the downside that LD_LIBRARY_PATH will also be >> inherited by any child processes. This might be fine for ruby-nano-bots, >> but this has caused me serious compatibility problems in the past. > > If my logic is correct, this should be mitigated somewhat by placing the > needed library path at the end of the $LD_LIBRARY_PATH ? Which is why I o= pted > for the ~suffix~ argument in the ~wrap-program~ . The problems I have had in the past was when spawning another program, which doesn't want LD_LIBRARY_PATH set at all. Doing so caused completely incorrect library versions to be loaded for child processes, because the environment variable was inherited by all child processes. I ended up having to modify the places where those child processes were spawned to clear LD_LIBRARY_PATH before spawning. >> Usually, I prefer to store a reference to the precise library in the >> store, rather than setting LD_LIBRARY_PATH. I'm not really sure how to >> do that in your case, because I'm not familiar with ruby-nano-bots or >> any of its dependencies. > > I believe this exact behaviour is achieved by ~(search-input-file inputs = "lib/ > libcurl.so")~ . When I first attempted to build the ~wrap-program~ call I= had=20 > a nesting error which explicitly showed that "/gnu/store/hash-curl/lib" i= s of=20 > unexpected type. Am I wrong? No, sorry. You are using a precise store reference in LD_LIBRARY_PATH, that's fine. I was more saying as an alternative to LD_LIBRARY_PATH, it's nicer to patch the program itself to load a specific library. That is, patch ruby-nano-bots (or its relevant dependency) during the Guix build so it's dlopening the specific library in the store. Carlo