From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.devel Subject: Re: compilation error on Apple M1 Date: Tue, 27 Dec 2022 00:35:36 +0100 Message-ID: References: <2a517d79541e8c54b889639b3290b0eefd7dc22b@webmail> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000577b5905f0c39833" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18690"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: dsmich@roadrunner.com Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Dec 27 00:36:19 2022 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 1p9x0z-0004e6-SC for guile-devel@m.gmane-mx.org; Tue, 27 Dec 2022 00:36:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9x0d-0003mb-8E; Mon, 26 Dec 2022 18:35:55 -0500 Original-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 1p9x0b-0003m8-31 for guile-devel@gnu.org; Mon, 26 Dec 2022 18:35:53 -0500 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9x0Y-0003oL-Tq for guile-devel@gnu.org; Mon, 26 Dec 2022 18:35:52 -0500 Original-Received: by mail-ej1-x62f.google.com with SMTP id fc4so28524439ejc.12 for ; Mon, 26 Dec 2022 15:35:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3292YKbegUReABMotIAEY1pLi8EbIjip8hybuTT0UOA=; b=AX6kdjEZ7qc73T2aWSf//iAQuV/RYWyWnolZ2jRef3VSw/B+kay0w+eEXnnn5+YHmK 6ZzzopYIjkBPiQ0Qr8LeTiUywx7ie+qsOWxGCMmYHgvYfSKwkAxcVZMUqJ9Vox4wRtO0 Z0ny20KzwbVT3MD7OIorpyPM6c5li193boPf67Y+beFCh0JquCTozZwcVoZYS3zG6UoX 9SsMs4mI+hJhQDPPrhQnbs+OCoXLqzDCTKHKcj6P1PTomvarc9YF3PQk0d1DzvX79j61 qPHX+MNG2pJKE7pQ0WjH7oH5vkz/XXhrvywSGDb3XvQt7RwqkrwJhe7+JP+nOHdL0n8T rd2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3292YKbegUReABMotIAEY1pLi8EbIjip8hybuTT0UOA=; b=HkH3mf6FldncvD7vJTNDuDn5wqYIDjo9jAGF4Nlk5u+x05NY+oYnlf09j7l4CeCF4t YXL7o3CcjS/qZYRl3RrDGzrmp1LXBVQVL6Qj3tRQVjpGtDdVX548U00cht6dY2abHyfg 3UmRyA9pP5xGJVuxg0ivO82Bx2EJWEb7Z3uL6mGvIDbM9xwkr2N9vattqjQujJfz5FvS Nak+3o1XQ5VlxVI8WQJMcMaFogD77zWLQsYIMKTqw3kxHRdr9gkv2SMm5EcO8A9I37H+ swlRpXZIZUWagwgpFjgu+ViCvSdM3elhR/sqrNlYKeH2OJuYndyuN7Od7jIkeoHT7UTT X4Pg== X-Gm-Message-State: AFqh2kri+aTUAr/Svtn4okXAtdvuq7Qhnffd93UKpp7Nt/EhjGw6wEOy 0TuZQPoE6KVLX9hJ+0rGw7fZ/2vqTgIRUh/MKK0= X-Google-Smtp-Source: AMrXdXv4+fDoK/72GSmrnRRlJe2ek0vWJ6cdUYIptTj9sP03uJBm/GmQoGM8he3NOZWsS1cvGcTdUrfFiwpCf7PEJI8= X-Received: by 2002:a17:907:d489:b0:7c0:dd4e:3499 with SMTP id vj9-20020a170907d48900b007c0dd4e3499mr2268384ejc.545.1672097748711; Mon, 26 Dec 2022 15:35:48 -0800 (PST) In-Reply-To: <2a517d79541e8c54b889639b3290b0eefd7dc22b@webmail> Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=damien.mattei@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=0.363 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21534 Archived-At: --000000000000577b5905f0c39833 Content-Type: text/plain; charset="UTF-8" those last years i installed guile on at least 3 mac system,without problem with read line readline installed by homebrew ,the homebrew version seems to use gnu readline: https://formulae.brew.sh/formula/readline https://tiswww.case.edu/php/chet/readline/rltop.html simply by adding that: (use-modules (ice-9 readline)) (activate-readline) so i surprised of this problem, but again with homebrew it is perhaps better to install from the source too, i will try tomorrow... i succeed in making work the first part of this : https://www.gnu.org/software/guile/manual/html_node/C-Extensions.html with a few modifications: gcc `pkg-config --cflags guile-3.0` -shared -o libbessel.so -fPIC -lguile-3.0 bessel.c instead of: gcc -shared -o libbessel.so -fPIC bessel.c perhaps updating the doc Regards, Damien On Mon, Dec 26, 2022 at 10:46 PM wrote: > Well, Apple also has a readline implementation that is similar but not > quite the same as gnu readline. You might need to install that along with > maybe telling ./configure to use the gnu version. > > Just a guess.. > > Actually, Guile looks for some specific symbols that the Apple lib doesn't > provide, but Guile doesn't actually use those symbols. At one time (well > over 10 years ago) I got Guile to work fine with the Apple readline by > removing those specific ./configure checks. > > But you are probably better off by installing gnu readline. > > -Dale > > > ----------------------------------------- > From: "Damien Mattei" > To: dsmich@roadrunner.com > Cc: > Sent: Monday December 26 2022 9:31:47AM > Subject: Re: compilation error on Apple M1 > > hello Dale, > > yes i had to install gsed (gnu sed): > brew install gsed > > now it is almost ok > but i do not understand anymore how to make work readline and this strange > error: > > scheme@(guile-user)> (use-modules (ice-9 readline)) > While compiling expression: > In procedure dlopen: file "guile-readline.dylib", message > "dlopen(guile-readline.dylib, 0x0005): tried: 'guile-readline.dylib' (no > such file), '/System/Volumes/Preboot/Cryptexes/OSguile-readline.dylib' (no > such file), '/usr/lib/guile-readline.dylib' (no such file, not in dyld > cache), 'guile-readline.dylib' (no such file), > '/usr/local/lib/guile-readline.dylib' (no such file), > '/usr/lib/guile-readline.dylib' (no such file, not in dyld cache)" > scheme@(guile-user)> > the second try made no error: > scheme@(guile-user)> (use-modules (ice-9 readline)) > scheme@(guile-user) > but it does not work the usual way: > scheme@(guile-user)> (activate-readline) > ;;; :3:1: warning: possibly unbound variable `activate-readline' > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > Unbound variable: activate-readline > > Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. > scheme@(guile-user) [1]> > > > https://www.gnu.org/software/guile/manual/html_node/Loading-Readline-Support.html > but it is so long time since my initial config of readline for guile that > perheaps i miss a step. > > Regards, > Damien > > On Mon, Dec 26, 2022 at 2:19 PM wrote: > >> >> >> ----------------------------------------- >> From: "Damien Mattei" >> To: "guile-devel" >> Cc: >> Sent: Monday December 26 2022 6:13:42AM >> Subject: Re: compilation error on Apple M1 >> >> >> > sed: -e: No such file or directory >> >> The bsd sed is different than gnu sed. There was a few patches sent out >> a while ago (by RhodiumToad?) that improved building on *bsd. >> >> I wonder if those will help? >> >> -Dale >> >> >> >> --000000000000577b5905f0c39833 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
those last years i installed guile on at least 3 mac system,w= ithout problem with read line
readline installed by homebrew ,the homebrew version s= eems to use gnu readline:
simply by adding that:=
(use-modules (= ice-9 readline))
(activate-readline)
so i surprised of this problem,
but again with homebrew it is= perhaps better to install from the source too, i will try tomorrow...

i succeed in making work the = first part of this :
with a few mo= difications:
gc= c `pkg-config --cflags guile-3.0` -shared -o libbessel.so -fPIC =C2=A0-lgui= le-3.0 bessel.c

inste= ad of:
gcc -shared -o libbessel.so -fPIC bessel.c

perhaps updating the doc=
Reg=
ards,
Damien



On Mon, Dec 26, 2022 at 10:46 PM <dsmich@roadrunner.com> wrote:
Well, Apple also has a readline imp= lementation that is similar but not quite the same as gnu readline.=C2=A0 Y= ou might need to install that along with maybe telling ./configure to use t= he gnu version.

Just a guess..

Actually, Guile looks for some= specific symbols that the Apple lib doesn't provide, but Guile doesn&#= 39;t actually use those symbols.=C2=A0 At one time (well over 10 years ago)= I got Guile to work fine with the Apple readline by removing those specifi= c ./configure checks.

But you are probably better off by installing = gnu readline.

-Dale


-----------------------= ------------------

From: "Damien Mattei"
To: dsmich@roadrunner.com<= /a>
Cc:
Sent: Monday December 26 2022 9:31:47AM
Subject: Re: comp= ilation error on Apple M1

hello Dale,

yes i had to install gsed (gnu sed):
brew install gsed

now it is almost ok
but i do not understand anymore how to make work readline and this strange error:

scheme@(guile-user)> (use-modules (ice-9 readline))
While compiling expression:
In procedure dlopen: file "guile-readline.dylib", message "dlopen(guile-readline.dylib, 0x0005): tried: 'guile-readline.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSguile-readline.dylib' (no such file), '/usr/lib/guile-readline.dylib' (no such file, not in dyld cache), 'guile-readline.dylib' (no such file), '/usr/local/lib/guile-readline.dylib' (no such file), '/usr/lib/guile-readline.dylib' (no such file, not in dyld cache)"
scheme@(guile-user)>
the second try made no error:
scheme@(guile-user)> (use-modules (ice-9 readline))
scheme@(guile-user)
but it does not work the usual way:
scheme@(guile-user)> (activate-readline)
;;; <stdin>:3:1: warning: possibly unbound variable `activate-readline'
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: activate-readline

Entering a new prompt.=C2=A0 Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
but it is so long time since my initial config of readline for guile that perheaps i miss a step.

Regards,
Damien

On Mon, Dec 26, 2022 at 2:19 PM <dsmich@roadrunner.com> wrote:


-----------------------------------------

From: "Damien Mattei"
To: "guile-devel"
Cc:
Sent: Monday December 26 2022 6:13:42AM
Subject: Re: compilation error on Apple M1


> sed: -e: No such file or directory

The bsd sed is different than gnu sed.=C2=A0 There was a few patches sent out a while ago (by RhodiumToad?) that improved building on *bsd.

I wonder if those will help?

=C2=A0 -Dale



--000000000000577b5905f0c39833--