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: compilation error on Apple M1 Date: Sun, 25 Dec 2022 23:40:56 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002672fe05f0b64247" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13365"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Damien Mattei Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Dec 26 08:41:42 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 1p9i7B-0003Kk-TS for guile-devel@m.gmane-mx.org; Mon, 26 Dec 2022 08:41:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9i6k-0001f1-12; Mon, 26 Dec 2022 02:41:14 -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 1p9i6h-0001e8-Lk for guile-devel@gnu.org; Mon, 26 Dec 2022 02:41:11 -0500 Original-Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9i6f-0003db-Rk for guile-devel@gnu.org; Mon, 26 Dec 2022 02:41:11 -0500 Original-Received: by mail-vk1-xa29.google.com with SMTP id z23so4686879vkb.12 for ; Sun, 25 Dec 2022 23:41:09 -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=Z3aCd50Kbx6uIv5HFJLPqTkKgNHZ6k5OoilyiGeg+2U=; b=P1QydFvuKXaC3E4X6rx1iZlXP0jWrkJhlfW7QdqGuucnt+aEjxA2aYDraBJs54UCu/ 4s92zr+lusqlAx0i7gorb+IKYXkTp0gnhUGDHnvAKTaTX2yvv1FwP1Fe9+wOMUMuPfph vnr9J8igUQCWZ2PZ0VL+5WFBUxLE9a1VThIxw/7kSB70EEf/EuA/YlcypypgIY3Z1A4H RR27zGb4to25WXuxdfOrXbEArrp3A1tTocSWqYq1WL7NiZ8Ep1i5TRffk/dKNkKHAFrv mmj8xxzjA/DXabVT/jm3m/+eF0dfbE3o7G61BLGvmNT1QP7iimUyJckv42xo7HU5AOA9 jDYg== 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=Z3aCd50Kbx6uIv5HFJLPqTkKgNHZ6k5OoilyiGeg+2U=; b=t9WKZb2KkCzqPKPhmKNUMBig7ZG7tjI6P9LmqfaPwdXsasKqrg7FZ4Hk9S1SEske4+ VQIPumj2wiTgW0CPo67WIUciyx6DGvrOSTI5vI2crVxQF180yNxk9XcVrYl9IPV6Yufu 5ln3h86/85LNpiU0iOjOJIqRlRs88KiJjMOYl+uWTcW4hIaVfdMNgDyOwxry/IQDYM/S c5cfyD7W0zGDbXYul93iOxRzB5ajB0FSg3L2OqjQtVWv4EzkTdvPVT1ClZD4RyrsWaC+ VtEUPiKRzSHU3A5O+Edw+CC2VZWvwNDrPOLjEt8bddf/ZzWq4p3hmHYn/LAQ+RjjuuoR EMFQ== X-Gm-Message-State: AFqh2kp8o06A/N5f+3SMZ2QcSVvDWvYZoHJOZbu06XEdnjmMRFD50jnx 6Wos2EanrnqpIKy8x0gRrubnkWogVr6Q3zA4YdnaqBdqOxI= X-Google-Smtp-Source: AMrXdXukKO4fYmR3hZUNv9v1yreFo1NspKDo0FLXN/qzpeA1GeGUnWXUdXIdbzzoBrlyu3uQkMJhoFvn7T93dblJE54= X-Received: by 2002:a1f:d904:0:b0:3d5:413f:ecd0 with SMTP id q4-20020a1fd904000000b003d5413fecd0mr962773vkg.20.1672040468081; Sun, 25 Dec 2022 23:41:08 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::a29; envelope-from=aconchillo@gmail.com; helo=mail-vk1-xa29.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, HTML_MESSAGE=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.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:21530 Archived-At: --0000000000002672fe05f0b64247 Content-Type: text/plain; charset="UTF-8" Hi Damien, This looks like a linking issue probably related to how things are installed in your system, not with Guile itself. And the issue seems to be with libiconv. Usually that comes with macOS itself and is located in /usr/lib/libiconv.2.dylib. Building Guile on M1 is definitely possible and works. I would suggest using Homebrew which already has all Guile dependencies figured out. Actually, I just recently added the Apple Silicon chip fix that Colin mentions to Homebrew as well ( https://github.com/Homebrew/homebrew-core/pull/118698), because even if you solve the issue you are currently getting you are going to run into the next one (which is that you need to disable JIT which makes Guile very slow unless you apply that fix). Also, if you use Guile from Homebrew you will benefit from Guile Homebrew which has all these packages ready to be used: https://github.com/aconchillo/homebrew-guile/tree/master/Formula Some people dislike Homebrew very much and refuse to install it, so I totally understand if that's the case. Best, Aleix On Sun, Dec 25, 2022 at 3:33 PM Damien Mattei wrote: > hello, > > on Apple M1 i have this error: > > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: > note: expanded from macro '__deprecated_msg' > #define __deprecated_msg(_msg) > __attribute__((__deprecated__(_msg))) > ^ > 1 warning generated. > CC libguile_3.0_la-net_db.lo > CC libguile_3.0_la-socket.lo > CC libguile_3.0_la-regex-posix.lo > CCLD libguile-3.0.la > Undefined symbols for architecture arm64: > "_iconv", referenced from: > _mem_cd_iconveh_internal in libgnu.a(striconveh.o) > (maybe you meant: _str_iconveh, _mem_iconveh , > _scm_port_acquire_iconv_descriptors , _iconveh_open , _iconveh_close , > _mem_cd_iconveh , _str_cd_iconveh , _scm_port_release_iconv_descriptors ) > "_iconv_close", referenced from: > _iconveh_open in libgnu.a(striconveh.o) > _iconveh_close in libgnu.a(striconveh.o) > "_iconv_open", referenced from: > _iconveh_open in libgnu.a(striconveh.o) > ld: symbol(s) not found for architecture arm64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > make[3]: *** [libguile-3.0.la] Error 1 > make[2]: *** [all] Error 2 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > any idea about this arm64? > > regards, > Damien > --0000000000002672fe05f0b64247 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Damien,

This looks like a linki= ng issue probably related to how things are installed in your system, not w= ith Guile itself. And the issue seems to be with libiconv. Usually that com= es with macOS itself and is located in /usr/lib/libiconv.2.dylib.
<= br>
Building Guile on M1 is definitely possible and works. I would = suggest using Homebrew which already has all Guile dependencies figured out= . Actually, I just recently added the Apple Silicon chip fix that Colin men= tions to Homebrew as well (https://github.com/Homebrew/homebrew-core/pull/118698= ), because even if you solve the issue you are currently getting you are go= ing to run into the next one (which is that you need to disable JIT which m= akes Guile very slow unless you apply that fix).

Also,= if you use Guile from Homebrew you will benefit from Guile Homebrew which = has all these packages ready to be used: https://github.com/aconchillo/ho= mebrew-guile/tree/master/Formula

Some people disli= ke Homebrew very much and refuse to install it, so I totally understand if = that's the case.

Best,

Alei= x

On Sun, Dec 25, 2022 at 3:33 PM Damien Mattei <damien.mattei@gmail.com> = wrote:
hello,

on Apple M1 i have this error= :

/Applications/Xcode= .app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk= /usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecate= d_msg'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 #define __deprecated_msg(_msg) __= attribute__((__deprecated__(_msg)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 ^
1 warning generated.
=C2=A0 CC =C2=A0 =C2=A0 =C2=A0 libguile= _3.0_la-net_db.lo
=C2=A0 CC =C2=A0 =C2=A0 =C2=A0 libguile_3.0_la-socket.= lo
=C2=A0 CC =C2=A0 =C2=A0 =C2=A0 libguile_3.0_la-regex-posix.lo
=C2= =A0 CCLD =C2=A0 =C2=A0 libguile-3.0.la
Undefined symbols for architecture arm64:
=C2=A0= "_iconv", referenced from:
=C2=A0 =C2=A0 =C2=A0 _mem_cd_iconv= eh_internal in libgnu.a(striconveh.o)
=C2=A0 =C2=A0 =C2=A0(maybe you mea= nt: _str_iconveh, _mem_iconveh , _scm_port_acquire_iconv_descriptors , _ico= nveh_open , _iconveh_close , _mem_cd_iconveh , _str_cd_iconveh , _scm_port_= release_iconv_descriptors )
=C2=A0 "_iconv_close", referenced = from:
=C2=A0 =C2=A0 =C2=A0 _iconveh_open in libgnu.a(striconveh.o)
= =C2=A0 =C2=A0 =C2=A0 _iconveh_close in libgnu.a(striconveh.o)
=C2=A0 &qu= ot;_iconv_open", referenced from:
=C2=A0 =C2=A0 =C2=A0 _iconveh_ope= n in libgnu.a(striconveh.o)
ld: symbol(s) not found for architecture arm= 64
clang: error: linker command failed with exit code 1 (use -v to see i= nvocation)
make[3]: *** [libguile-3.0.la] Error 1
make[2]: *** [all] Error 2
make[1]= : *** [all-recursive] Error 1
make: *** [all] Error 2

any idea about this arm64?

regards,
Damien
--0000000000002672fe05f0b64247--