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: Mon, 26 Dec 2022 12:13:05 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d6393405f0b9389b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37703"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Dec 26 12:13:55 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 1p9lQY-0009cT-9t for guile-devel@m.gmane-mx.org; Mon, 26 Dec 2022 12:13:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9lQ3-0008IJ-Kh; Mon, 26 Dec 2022 06:13:23 -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 1p9lQ2-0008I6-5w for guile-devel@gnu.org; Mon, 26 Dec 2022 06:13:22 -0500 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9lPz-00060D-K5 for guile-devel@gnu.org; Mon, 26 Dec 2022 06:13:21 -0500 Original-Received: by mail-ej1-x631.google.com with SMTP id u9so25648261ejo.0 for ; Mon, 26 Dec 2022 03:13:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=UKox1cqNDZfDAIqKSIaPEzJc2t3k5pEF5PPj0dvkE/o=; b=nq07XJ84mwcvjaPQQ+c3TRQZii8K/jRURhVGJXq4a91/04sB+sQceFjKAYVc845M0v dCKHurfXOLSh7LjCoXHyhiystIZxPBePBjpQrxwtHyvM2r5FWxmKcod3Zd9BKk5/hlRF Qbbi+4elXRNpV3wdYbHrLXFXwpAiqol1omWFskB5dZXMNzOIzqs+2xw2syJoYYE68bHG z8lK08tK5PAYg4l7wyPMPSe8SPFdmBMFpXW1CACQKC2b0Mqh3Q1GD1Yub2wh1cavigy6 G5PJJmaXtiMY2dUNUrJck5A7RkWvuOOI5yXjJu4ZksYc8efD0RJwnYg5OKJ5aZ8P485t uDEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=UKox1cqNDZfDAIqKSIaPEzJc2t3k5pEF5PPj0dvkE/o=; b=yyrsLdmXeh9x77wAqqLL7TguaNFgYS9H7FOdBcH2cYL3PSPDmtGG3ytbxIPdn5uAvz vxp+9oPm8JD5iSX7YHJgdb/fnNJ3PHAlReJ3Igx+z5CN+7loCOcEGkE3hLjlXuGDzMPg JSmYsulKuL3x6/SWdVVEYVbE3Dsf0vRfJldzS+s8m52/1cr+DjM9tn3Q+5p9qCljInWe tJY9U69H8T5H/FbCZkTtIATJ3d35DCsW71ZM6pvU96deSpZ6lmaFMNs8XLRqiz2ZQeWq fLACbxY6Yo46s4klPB6Q9euJ/M4VkyvNz+JYtp+gyktbmFhSpCt/aMbcfZ4Dl4hPJYIl NAKA== X-Gm-Message-State: AFqh2kpV4nPmxr29xeRKKJPE4xy0j7IHWnWUnp9jCoRI4bdSoYpYuE4i 6/So6td0OFi3zdWFuqIxUQ1cEoOvr5NIIyVWC27wgIF/Gx6ytA== X-Google-Smtp-Source: AMrXdXu1VmdWczgPMApwQibQjKNSWknYjSF23bA6IvkJ25H3d0QFVAGHN+v5NQr065aOdz611mGlqobJYXANfxgR5Zo= X-Received: by 2002:a17:906:9518:b0:814:2bd6:2f91 with SMTP id u24-20020a170906951800b008142bd62f91mr1666142ejx.395.1672053196730; Mon, 26 Dec 2022 03:13:16 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=damien.mattei@gmail.com; helo=mail-ej1-x631.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:21531 Archived-At: --000000000000d6393405f0b9389b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Alex and Colin, i was thinking also at the beginning of an M1 incompatibility but it seems that my system was just missing some libraries: libiconv (and before gc (garbage collector) ,libunistring,...) i first use homebrew but each time i use it , it is useless for compiling,and i had also to install the libs from source (i suppose the homeberew lib version do not include headers for dev or something else or put them in non standart locations...) i cloned the guile at git clone https://git.savannah.gnu.org/git/guile.git and compile with ./configure --enable-mini-gmp (because i often have problem to install correctly GMP for any program,not only guile) and then it missed makeinfo, so i installed texinfo with homebrew this time and then i continue the 'make' and it worked to compile but now i have an error at install i do not understand: /usr/bin/install -c -m 644 weak-set.h weak-table.h weak-vector.h '/usr/local/include/guile/3.0/libguile' .././build-aux/install-sh -c -d '/usr/local/include/guile/3.0/libguile' /usr/bin/install -c -m 644 version.h scmconfig.h '/usr/local/include/guile/3.0/libguile' /Applications/Xcode.app/Contents/Developer/usr/bin/make install-data-hook /usr/bin/install -c -m 644 libguile-3.0-gdb.scm /usr/local/lib/libguile-3.0.a-gdb.scm sed: -e: No such file or directory make[5]: *** [install-data-hook] Error 1 make[4]: *** [install-data-am] Error 2 make[3]: *** [install-am] Error 2 make[2]: *** [install] Error 2 make[1]: *** [install-recursive] Error 1 make: *** [install] Error 2 note: i still have to disable JIT as alex mention it, i will do it at last. In fact i was using guile 3.0.7. since many years from homebrew but at some point i needed libguile.h for testing interaction from guile and C and the opposite like in the examples of the site: https://www.gnu.org/software/guile/manual/html_node/C-Extensions.html Damien On Mon, Dec 26, 2022 at 8:41 AM Aleix Conchillo Flaqu=C3=A9 wrote: > 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 b= e > 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 t= he > next one (which is that you need to disable JIT which makes Guile very sl= ow > 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/Dev= eloper/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 >> > --000000000000d6393405f0b9389b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Alex and Colin,

i was thinking also at the beginning of an M1 incompatibilit= y but it seems that my system was just missing some libraries:

libiconv (and before gc (garbage coll= ector) ,libunistring,...)

i first use homebrew but each time i use it , it is useless for compiling,= and i had also to install the libs from source (i suppose the homeberew lib= version do not include headers for dev or something else or put them in no= n standart locations...)

i cloned the guile at
git clone https://git.savannah.gnu.org/git/guile.git
<= /pre>
and compile with

./configu= re --enable-mini-gmp (because i often have problem to install correctly GMP= for any program,not only guile)

and then it missed makeinfo, so i installed texinfo with hom=
ebrew this time
and th=
en i continue the 'make' and it worked to compile but now i have
 an error at install i d=
o not understand:

/usr/bin/install -c -m 644 weak-set.h weak-table.h= weak-vector.h '/usr/local/include/guile/3.0/libguile'
=C2=A0../= ./build-aux/install-sh -c -d '/usr/local/include/guile/3.0/libguile'= ;
=C2=A0/usr/bin/install -c -m 644 version.h scmconfig.h '/usr/local= /include/guile/3.0/libguile'
/Applications/Xcode.app/Contents/Develo= per/usr/bin/make =C2=A0install-data-hook
=C2=A0/usr/bin/install -c -m 64= 4 libguile-3.0-gdb.scm /usr/local/lib/libguile-3.0.a-gdb.scm
sed: -e:= No such file or directory
make[5]: *** [install-data-hook] Error 1
m= ake[4]: *** [install-data-am] Error 2
make[3]: *** [install-am] Error 2<= br>make[2]: *** [install] Error 2
make[1]: *** [install-recursive] Error= 1
make: *** [install] Error 2

note: i still have to disable JIT as alex mention it, i wil=
l do it at last.

<= /font>
In fact i was using guile =
3.0.7. since many years from homebrew but at some point i needed
=
 libguile.h for testing interact=
ion from guile and C and the opposite like in the examples 
of the site:
https://www.gn= u.org/software/guile/manual/html_node/C-Extensions.html
<= br>
Damien

On Mon, Dec 26, 2022 at 8:41 AM Aleix Conchillo Flaqu=C3=A9 <= ;aconchillo@gmail.com> wrote= :
Hi Damien,

This looks like a linking issue pr= obably related to how things are installed in your system, not with Guile i= tself. And the issue seems to be with libiconv. Usually that comes with mac= OS 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 dependen= cies figured out. Actually, I just recently added the Apple Silicon chip fi= x that Colin mentions to Homebrew as well (https://github.com/Home= brew/homebrew-core/pull/118698), because even if you solve the issue yo= u are currently getting you are going to run into the next one (which is th= at you need to disable JIT which makes Guile very slow unless you apply tha= t fix).

Also, if you use Gu= ile from Homebrew you will benefit from Guile Homebrew which has all these = packages ready to be used: https://github.com/aconchill= o/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 <damien.mattei@gmail.c= om> wrote:
hello,

on Apple M1 i ha= ve this error:

/Applications/Xcode.app/Contents/Developer/Platforms/M= acOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: no= te: expanded from macro '__deprecated_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 fr= om:
=C2=A0 =C2=A0 =C2=A0 _mem_cd_iconveh_internal in libgnu.a(striconveh= .o)
=C2=A0 =C2=A0 =C2=A0(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 )
=C2= =A0 "_iconv_close", referenced from:
=C2=A0 =C2=A0 =C2=A0 _ico= nveh_open in libgnu.a(striconveh.o)
=C2=A0 =C2=A0 =C2=A0 _iconveh_close = in libgnu.a(striconveh.o)
=C2=A0 "_iconv_open", referenced fro= m:
=C2=A0 =C2=A0 =C2=A0 _iconveh_open in libgnu.a(striconveh.o)
ld: s= ymbol(s) not found for architecture arm64
clang: error: linker command f= ailed with exit code 1 (use -v to see invocation)
make[3]: *** [libguile-3.0.la] Error 1<= br>make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
ma= ke: *** [all] Error 2

any idea about this arm64?

regards,
Damien
--000000000000d6393405f0b9389b--