From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda <lloda@sarc.name> Newsgroups: gmane.lisp.guile.bugs Subject: bug#60234: Build failure on mac os 12.6 / gcc 12.2 Date: Fri, 20 Jan 2023 10:38:18 +0100 Message-ID: <DABCF605-96BB-413F-BFC2-9129279CDB7C@sarc.name> References: <5404ACA9-05C6-4349-9736-3185914D8A0F@sarc.name> <87k01h8tqd.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_D17C3DD7-422A-45C2-BAC7-7DB0E34072C0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60234@debbugs.gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org> Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Jan 20 10:39:35 2023 Return-path: <bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org> Envelope-to: guile-bugs@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 <bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org>) id 1pInry-0000UU-95 for guile-bugs@m.gmane-mx.org; Fri, 20 Jan 2023 10:39:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <bug-guile-bounces@gnu.org>) id 1pInre-0003vL-3Y; Fri, 20 Jan 2023 04:39: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 <Debian-debbugs@debbugs.gnu.org>) id 1pInrU-0003uj-Ay for bug-guile@gnu.org; Fri, 20 Jan 2023 04:39:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pInrS-0001n3-K4 for bug-guile@gnu.org; Fri, 20 Jan 2023 04:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pInrS-0008IC-1d for bug-guile@gnu.org; Fri, 20 Jan 2023 04:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: lloda <lloda@sarc.name> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 20 Jan 2023 09:39:02 +0000 Resent-Message-ID: <handler.60234.B60234.167420751231834@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60234 X-GNU-PR-Package: guile Original-Received: via spool by 60234-submit@debbugs.gnu.org id=B60234.167420751231834 (code B ref 60234); Fri, 20 Jan 2023 09:39:02 +0000 Original-Received: (at 60234) by debbugs.gnu.org; 20 Jan 2023 09:38:32 +0000 Original-Received: from localhost ([127.0.0.1]:45604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pInqx-0008HN-Iz for submit@debbugs.gnu.org; Fri, 20 Jan 2023 04:38:32 -0500 Original-Received: from mta-07-4.privateemail.com ([68.65.122.27]:31657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <lloda@sarc.name>) id 1pInqu-0008H6-OE for 60234@debbugs.gnu.org; Fri, 20 Jan 2023 04:38:30 -0500 Original-Received: from mta-07.privateemail.com (localhost [127.0.0.1]) by mta-07.privateemail.com (Postfix) with ESMTP id 32A3D18000AD; Fri, 20 Jan 2023 04:38:22 -0500 (EST) Original-Received: from [192.168.1.105] (unknown [51.154.167.214]) by mta-07.privateemail.com (Postfix) with ESMTPA id 4DCA418000A6; Fri, 20 Jan 2023 04:38:20 -0500 (EST) In-Reply-To: <87k01h8tqd.fsf@gnu.org> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <bug-guile.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guile>, <mailto:bug-guile-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/bug-guile> List-Post: <mailto:bug-guile@gnu.org> List-Help: <mailto:bug-guile-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guile>, <mailto:bug-guile-request@gnu.org?subject=subscribe> Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10529 Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.bugs/10529> --Apple-Mail=_D17C3DD7-422A-45C2-BAC7-7DB0E34072C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 18 Jan 2023, at 23:16, Ludovic Court=C3=A8s <ludo@gnu.org = <mailto:ludo@gnu.org>> wrote: >=20 > Hi Daniel, >=20 > lloda <lloda@sarc.name <mailto:lloda@sarc.name>> skribis: >=20 >> .../libguile/threads.h:194:43: error: 'scm_i_current_thread' is = defined with tls model global-dynamic >> 194 | SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread; >> | ^ >> .../libguile/threads.c:357:30: note: previously defined here as = local-dynamic >> 357 | SCM_THREAD_LOCAL scm_thread *scm_i_current_thread =3D NULL; >>=20 >> Simply repeating SCM_INTERNAL in the .c fixes it... >=20 > The problem is that =E2=80=98SCM_INTERNAL=E2=80=99 is synonymous with = =E2=80=98extern=E2=80=99, which > makes no sense for a definition (threads.c:357), so rightfully GCC > GNU/Linux rightfully complains: >=20 > --8<---------------cut here---------------start------------->8--- > CC libguile_3.0_la-threads.lo > threads.c:358:43: warning: 'scm_i_current_thread' initialized and = declared 'extern' > 358 | SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread =3D= NULL; > | ^~~~~~~~~~~~~~~~~~~~ > --8<---------------cut here---------------end--------------->8--- >=20 > It=E2=80=99s just a warning, but still not looking good. Hi, Agreed, I had the same warning on mac os. Looked like the least bad = choice... > Is there something else at play, such as a =E2=80=98-ftls-model=E2=80=99= flag being > passed to GCC somehow (info =E2=80=9C(gcc) Code Gen Options")? >=20 > If not, should we have: >=20 > #define SCM_THREAD_LOCAL \ > __thread __attribute__ ((__tls_model__ ("global-dynamic"))) >=20 > instead (info "(gcc) Common Variable Attributes")? >=20 > Would that work with Clang? >=20 > Ludo=E2=80=99. I don't seem to have any such flags. The attribute does fix the issue on mac os with gcc 12. I hadn't tried clang before, but I did now, and clang 14 works fine with = or without the attribute. So the fix would only be for gcc. Thanks Daniel= --Apple-Mail=_D17C3DD7-422A-45C2-BAC7-7DB0E34072C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D""><br style=3D"caret-color: rgb(0, 0, 0); = color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D""><blockquote type=3D"cite" style=3D"font-family: = UbuntuMono-Regular;" class=3D"">On 18 Jan 2023, at 23:16, Ludovic = Court=C3=A8s <<a href=3D"mailto:ludo@gnu.org" = class=3D"">ludo@gnu.org</a>> wrote:<br class=3D""><br class=3D"">Hi = Daniel,<br class=3D""><br class=3D"">lloda <<a = href=3D"mailto:lloda@sarc.name" class=3D"">lloda@sarc.name</a>> = skribis:<br class=3D""><br class=3D""><blockquote type=3D"cite" = class=3D"">.../libguile/threads.h:194:43: error: 'scm_i_current_thread' = is defined with tls model global-dynamic<br class=3D"">194 | = SCM_INTERNAL SCM_THREAD_LOCAL scm_thread *scm_i_current_thread;<br = class=3D""> | = &n= bsp; &nbs= p; = ^<br = class=3D"">.../libguile/threads.c:357:30: note: previously defined here = as local-dynamic<br class=3D"">357 | SCM_THREAD_LOCAL scm_thread = *scm_i_current_thread =3D NULL;<br class=3D""><br class=3D"">Simply = repeating SCM_INTERNAL in the .c fixes it...<br = class=3D""></blockquote><br class=3D"">The problem is that = =E2=80=98SCM_INTERNAL=E2=80=99 is synonymous with =E2=80=98extern=E2=80=99= , which<br class=3D"">makes no sense for a definition (threads.c:357), = so rightfully GCC<br class=3D"">GNU/Linux rightfully complains:<br = class=3D""><br class=3D"">--8<---------------cut = here---------------start------------->8---<br class=3D"">CC = libguile_3.0_la-threads.lo<br = class=3D"">threads.c:358:43: warning: 'scm_i_current_thread' initialized = and declared 'extern'<br class=3D"">358 | SCM_INTERNAL SCM_THREAD_LOCAL = scm_thread *scm_i_current_thread =3D NULL;<br = class=3D""> | = &n= bsp; &nbs= p; = ^~~~~~~~~~~~~~~~~~~~<br = class=3D"">--8<---------------cut = here---------------end--------------->8---<br class=3D""><br = class=3D"">It=E2=80=99s just a warning, but still not looking good.<br = class=3D""></blockquote><br style=3D"caret-color: rgb(0, 0, 0); color: = rgb(0, 0, 0); font-family: UbuntuMono-Regular;" class=3D""><span = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D"">Hi,</span><br style=3D"caret-color: = rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D""><br style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); = font-family: UbuntuMono-Regular;" class=3D""><span style=3D"caret-color: = rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D"">Agreed, I had the same warning on mac os. Looked like the = least bad choice...</span><br style=3D"caret-color: rgb(0, 0, 0); color: = rgb(0, 0, 0); font-family: UbuntuMono-Regular;" class=3D""><br = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D""><blockquote type=3D"cite" = style=3D"font-family: UbuntuMono-Regular;" class=3D"">Is there something = else at play, such as a =E2=80=98-ftls-model=E2=80=99 flag being<br = class=3D"">passed to GCC somehow (info =E2=80=9C(gcc) Code Gen = Options")?<br class=3D""><br class=3D"">If not, should we have:<br = class=3D""><br class=3D"">#define SCM_THREAD_LOCAL \<br = class=3D""> __thread __attribute__ ((__tls_model__ = ("global-dynamic")))<br class=3D""><br class=3D"">instead (info "(gcc) = Common Variable Attributes")?<br class=3D""><br class=3D"">Would that = work with Clang?<br class=3D""><br class=3D"">Ludo=E2=80=99.<br = class=3D""></blockquote><br style=3D"caret-color: rgb(0, 0, 0); color: = rgb(0, 0, 0); font-family: UbuntuMono-Regular;" class=3D""><span = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D"">I don't seem to have any such = flags.</span><br style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, = 0); font-family: UbuntuMono-Regular;" class=3D""><br style=3D"caret-color:= rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D""><span style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, = 0); font-family: UbuntuMono-Regular;" class=3D"">The attribute does fix = the issue on mac os with gcc 12.</span><br style=3D"caret-color: rgb(0, = 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D""><br style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); = font-family: UbuntuMono-Regular;" class=3D""><span style=3D"caret-color: = rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D"">I hadn't tried clang before, but I did now, and clang 14 = works fine with or without the attribute. So the fix would only be for = gcc.</span><br style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); = font-family: UbuntuMono-Regular;" class=3D""><br style=3D"caret-color: = rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" = class=3D""><span style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, = 0); font-family: UbuntuMono-Regular;" class=3D"">Thanks</span><br = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D""><br style=3D"caret-color: rgb(0, 0, 0); = color: rgb(0, 0, 0); font-family: UbuntuMono-Regular;" class=3D""><span = style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: = UbuntuMono-Regular;" class=3D""> Daniel</span></body></html>= --Apple-Mail=_D17C3DD7-422A-45C2-BAC7-7DB0E34072C0--