From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: lloda Newsgroups: gmane.lisp.guile.bugs Subject: bug#60971: build failure of v3.0.9rc1 on mac os 12.6 Date: Fri, 20 Jan 2023 20:16:15 +0100 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5000"; mail-complaints-to="usenet@ciao.gmane.io" To: 60971@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri Jan 20 20:17:38 2023 Return-path: 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 ) id 1pIwtN-0001AC-5T for guile-bugs@m.gmane-mx.org; Fri, 20 Jan 2023 20:17:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIwt2-0006jT-Gr; Fri, 20 Jan 2023 14:17:16 -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 1pIwsp-0006iS-0M for bug-guile@gnu.org; Fri, 20 Jan 2023 14:17: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 ) id 1pIwso-0002Kh-F9 for bug-guile@gnu.org; Fri, 20 Jan 2023 14:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pIwsn-0005uq-VP for bug-guile@gnu.org; Fri, 20 Jan 2023 14:17:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: lloda Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 20 Jan 2023 19:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60971 X-GNU-PR-Package: guile X-Debbugs-Original-To: "bug-guile@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.167424218722695 (code B ref -1); Fri, 20 Jan 2023 19:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Jan 2023 19:16:27 +0000 Original-Received: from localhost ([127.0.0.1]:47122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIwsF-0005ty-0Y for submit@debbugs.gnu.org; Fri, 20 Jan 2023 14:16:27 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:42230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pIwsC-0005tp-JO for submit@debbugs.gnu.org; Fri, 20 Jan 2023 14:16:25 -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 1pIwsC-0006eN-9q for bug-guile@gnu.org; Fri, 20 Jan 2023 14:16:24 -0500 Original-Received: from mta-07-4.privateemail.com ([68.65.122.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIwsA-00025O-Es for bug-guile@gnu.org; Fri, 20 Jan 2023 14:16:24 -0500 Original-Received: from mta-07.privateemail.com (localhost [127.0.0.1]) by mta-07.privateemail.com (Postfix) with ESMTP id 7BB8318000B0 for ; Fri, 20 Jan 2023 14:16:18 -0500 (EST) Original-Received: from [192.168.1.105] (unknown [51.154.167.214]) by mta-07.privateemail.com (Postfix) with ESMTPA id 1A9E418000A6 for ; Fri, 20 Jan 2023 14:16:17 -0500 (EST) X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=68.65.122.27; envelope-from=lloda@sarc.name; helo=MTA-07-4.privateemail.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:10530 Archived-At: Hello, v3.0.9rc1 fails on mac os 12.6.2 & gcc 12.2 or clang 14, same error in = either case. gcc's error is: ------------------------------------ CC libguile_3.0_la-posix.lo In file included from ../../../src/guile4/libguile/posix.c:82: ../../../src/guile4/libguile/posix.c:109:9: error: lvalue required as = unary '&' operand 109 | verify (WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D 127); | ^~~~~~~~~~~ ../../../src/guile4/lib/verify.h:213:57: note: in definition of macro = '_GL_VERIFY' 213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, = DIAGNOSTIC) | ^ ../../../src/guile4/libguile/posix.c:109:1: note: in expansion of macro = 'verify' 109 | verify (WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D 127); | ^~~~~~ ../../../src/guile4/libguile/posix.c:109:9: error: expression in static = assertion is not an integer 109 | verify (WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D 127); | ^~~~~~~~~~~ ../../../src/guile4/lib/verify.h:213:57: note: in definition of macro = '_GL_VERIFY' 213 | # define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, = DIAGNOSTIC) | ^ ../../../src/guile4/libguile/posix.c:109:1: note: in expansion of macro = 'verify' 109 | verify (WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D 127); | ^~~~~~ ------------------------------------ The problematic section in libguile/posix.c ... #if HAVE_SYS_WAIT_H # include #endif #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) =3D=3D 0) #endif #ifndef W_EXITCODE /* Macro for constructing a status value. Found in glibc. */ # ifdef _WIN32 /* see Gnulib's posix-w32.h */ # define W_EXITCODE(ret, sig) (ret) # else # define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) # endif #endif verify (WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D 127); ... adding -o .libs/libguile_3.0_la-posix.i -E to the build line shows line = 109 as _Static_assert ( (((*(int *)&((( 127 ) << 8 | ( 0 )))) >> 8) & = 0x000000ff) =3D=3D 127, "verify (" "WEXITSTATUS (W_EXITCODE (127, 0)) =3D=3D= 127" ")"); ^ forcing redefinition of WEXITSTATUS shows the previous definition at = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel= oper/SDKs/MacOSX.sdk/usr/include/sys/wait.h ... #if defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE) #define _W_INT(i) (i) #else #define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */ = <------------- problem #define WCOREFLAG 0200 #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ /* These macros are permited, as they are in the implementation = namespace */ #define _WSTATUS(x) (_W_INT(x) & 0177) #define _WSTOPPED 0177 /* _WSTATUS if process is = stopped */ /* * [XSI] The header shall define the following macros for * analysis of process status values */ #if __DARWIN_UNIX03 #define WEXITSTATUS(x) ((_W_INT(x) >> 8) & 0x000000ff) #else /* !__DARWIN_UNIX03 */ #define WEXITSTATUS(x) (_W_INT(x) >> 8) #endif /* !__DARWIN_UNIX03 */ /* 0x13 =3D=3D SIGCONT */ #define WSTOPSIG(x) (_W_INT(x) >> 8) #define WIFCONTINUED(x) (_WSTATUS(x) =3D=3D _WSTOPPED && WSTOPSIG(x) =3D=3D= 0x13) #define WIFSTOPPED(x) (_WSTATUS(x) =3D=3D _WSTOPPED && WSTOPSIG(x) !=3D = 0x13) #define WIFEXITED(x) (_WSTATUS(x) =3D=3D 0) #define WIFSIGNALED(x) (_WSTATUS(x) !=3D _WSTOPPED && _WSTATUS(x) !=3D = 0) #define WTERMSIG(x) (_WSTATUS(x)) #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) #define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) #define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) #endif /* (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ ... so that's the problem, but I'm not sure what the solution is. The way = it's written, W_EXITCODE() is always going to give up a number... Thanks Daniel