From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] foreign-library: fix darwin detection Date: Wed, 1 Sep 2021 22:38:04 -0700 Message-ID: References: <20210902052755.9898-1-aconchillo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15685"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Sep 02 07:38:59 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mLfRD-0003xX-1z for guile-devel@m.gmane-mx.org; Thu, 02 Sep 2021 07:38:59 +0200 Original-Received: from localhost ([::1]:37080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLfRB-0007Ym-LU for guile-devel@m.gmane-mx.org; Thu, 02 Sep 2021 01:38:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLfQb-0007Ye-8Y for guile-devel@gnu.org; Thu, 02 Sep 2021 01:38:22 -0400 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:39510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mLfQX-0004xo-JC for guile-devel@gnu.org; Thu, 02 Sep 2021 01:38:20 -0400 Original-Received: by mail-pl1-x62f.google.com with SMTP id m17so476048plc.6 for ; Wed, 01 Sep 2021 22:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=D7dmARlNZO1rFMJzpNnuMbEXnzmOqGNjsNdoFO4EteE=; b=PVY0qSCw7B8xQYqYlAQyPO8nJyQxUZb5khPGa9jLgRKCowqtKxKNbFERmGLn95ayBY W2CnFguKzk1r0a+spWyOVFzWBJ4xV7PFBttFJ0lsOTIxamgmrwg9zX4CE3dGaqPsGGF2 YRGKje12USk1TrrDR/VOkYBVKRUz8ulGisHCYlMG7mA4jBd3wXFdIemetv5fY5aPMsDy gAa4CgY66/XSIqg8GqXRgKFadtBLjTBWJ63TFgc4RzSeHqAyiD+aPI7jZhiMtyhy5/zX KGj4xr0rKYAr2VMqOMV7JD5tPQfTWerxTleq65JwP5Me7rwu9KDUHZhnyRQrU5Hzw/fy JR8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=D7dmARlNZO1rFMJzpNnuMbEXnzmOqGNjsNdoFO4EteE=; b=nW3tfvI080N7BNggC4dt5NqgUUQUxbxmDyf0BIoMAFj4Se9lJepNR6X4iYTpCSxM+6 T9G6nEfjA7ZNUNqwzOMXCbeXqvjtJ1EUQ4Gepn95gCxH0UnuyYaXjs3EEyUVCs3Z/snO O1FjfvvE2Mal+hlfQk2AXFhPpeYJDp3iK1ngq0hmXm5VsSqDNDAFMmH6U1lswR3y4Ob9 8y3rFMyDEH45Z7xNWF6luqkKt3N0YkfdXEMgxZ7To44R811L8hHVL0lMcIhKQ8s9my7+ iGnVZpcNcKu7sbw13FT7wAaFOSyRRQzksro8RMV+ZJC2pqS4BZSG8eH2FoklvWMsI+rh yqUA== X-Gm-Message-State: AOAM530N1JhFcAz6lsblSsp9fsu2ZplR9dN9mHIjrox6acHYybiWaUKk +JRWG8pRi5JePOyfAf8bmKQ/GgedCyRWj8a48q9XOzTz7dB/Kg== X-Google-Smtp-Source: ABdhPJyjk9DhihAJcexUppE489I350CX0RRqlqQEDBecI5hjVE6dtm4wXDwzVAQhn8ly4GL31ZBBHQxA3BTkTpNorOQ= X-Received: by 2002:a17:902:9009:b0:12d:8de4:bc2d with SMTP id a9-20020a170902900900b0012d8de4bc2dmr1373758plp.44.1630561095443; Wed, 01 Sep 2021 22:38:15 -0700 (PDT) In-Reply-To: <20210902052755.9898-1-aconchillo@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=aconchillo@gmail.com; helo=mail-pl1-x62f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20833 Archived-At: Without this change dynamic libraries in macOS are not loaded properly. This has happened since 3.0.6. scheme@(guile-user)> %host-type $1 =3D "x86_64-apple-darwin20.5.0" -------------------------------- scheme@(guile-user)> (use-modules (git)) While compiling expression: In procedure git_libgit2_init: Function not implemented -------------------------------- scheme@(guile-user)> (use-modules (system foreign)) scheme@(guile-user)> (dynamic-link "/usr/local/lib/libgit2") ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure load-foreign-library: file: "/usr/local/lib/libgit2", message: "file not found" Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> -------------------------------- After this fix: scheme@(guile-user)> (use-modules (system foreign)) scheme@(guile-user)> (dynamic-link "/usr/local/lib/libgit2") $2 =3D #< filename: "/usr/local/lib/libgit2" handle: #> On Wed, Sep 1, 2021 at 10:28 PM Aleix Conchillo Flaqu=C3=A9 wrote: > > * module/system/foreign-library.scm (system-library-extensions): fix > darwin host detection. darwin host types have "-darwin" but not > "-darwin-". > --- > module/system/foreign-library.scm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/module/system/foreign-library.scm b/module/system/foreign-li= brary.scm > index d53e293ef..dc426385f 100644 > --- a/module/system/foreign-library.scm > +++ b/module/system/foreign-library.scm > @@ -48,7 +48,7 @@ > > (define system-library-extensions > (cond > - ((string-contains %host-type "-darwin-") > + ((string-contains %host-type "-darwin") > '(".bundle" ".so" ".dylib")) > ((or (string-contains %host-type "cygwin") > (string-contains %host-type "mingw") > -- > 2.33.0 >