GNU bug report logs -
#60971
build failure of v3.0.9rc1 on mac os 12.6
Previous Next
Reported by: lloda <lloda <at> sarc.name>
Date: Fri, 20 Jan 2023 19:17:01 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60971 in the body.
You can then email your comments to 60971 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#60971
; Package
guile
.
(Fri, 20 Jan 2023 19:17:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
lloda <lloda <at> sarc.name>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Fri, 20 Jan 2023 19:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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)) == 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)) == 127);
| ^~~~~~
../../../src/guile4/libguile/posix.c:109:9: error: expression in static assertion is not an integer
109 | verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 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)) == 127);
| ^~~~~~
------------------------------------
The problematic section in libguile/posix.c
...
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) == 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)) == 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) == 127, "verify (" "WEXITSTATUS (W_EXITCODE (127, 0)) == 127" ")");
^
forcing redefinition of WEXITSTATUS shows the previous definition at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 <sys/wait.h> 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 == SIGCONT */
#define WSTOPSIG(x) (_W_INT(x) >> 8)
#define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13)
#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13)
#define WIFEXITED(x) (_WSTATUS(x) == 0)
#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 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
Information forwarded
to
bug-guile <at> gnu.org
:
bug#60971
; Package
guile
.
(Mon, 23 Jan 2023 10:49:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 60971 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Greg Troxel <gdt <at> lexort.com> skribis:
> lloda <lloda <at> sarc.name> writes:
>
>> This looks like https://debbugs.gnu.org/60971 <https://debbugs.gnu.org/60971> on mac os.
>
> Yes, it does.
>
> My quick reaction is that if the POSIX-required macros operation on
> system types that might be struct, then faking up ints for testing is
> unsound.
>
> Maybe only do verify if guile has to define macros, and don't try to
> test the OS?
So something like the patch below?
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/libguile/posix.c b/libguile/posix.c
index 74c743119..0b1fe2637 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -105,8 +105,8 @@
# else
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
# endif
-#endif
verify (WEXITSTATUS (W_EXITCODE (127, 0)) == 127);
+#endif
#include <signal.h>
Information forwarded
to
bug-guile <at> gnu.org
:
bug#60971
; Package
guile
.
(Mon, 23 Jan 2023 18:05:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 60971 <at> debbugs.gnu.org (full text, mbox):
lgtm, no other issues on mac os.
thanks
Daniel
Information forwarded
to
bug-guile <at> gnu.org
:
bug#60971
; Package
guile
.
(Mon, 23 Jan 2023 18:49:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 60971 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Jan 23, 2023 at 2:48 AM Ludovic Courtès <ludo <at> gnu.org> wrote:
> Hi,
>
> Greg Troxel <gdt <at> lexort.com> skribis:
>
> > lloda <lloda <at> sarc.name> writes:
> >
> >> This looks like https://debbugs.gnu.org/60971 <
> https://debbugs.gnu.org/60971> on mac os.
> >
> > Yes, it does.
> >
> > My quick reaction is that if the POSIX-required macros operation on
> > system types that might be struct, then faking up ints for testing is
> > unsound.
> >
> > Maybe only do verify if guile has to define macros, and don't try to
> > test the OS?
>
> So something like the patch below?
>
Oh, I missed the other report. Yes, this works on macOS as just reported by
Daniel. No other issues.
Aleix
[Message part 2 (text/html, inline)]
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Mon, 23 Jan 2023 22:00:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
lloda <lloda <at> sarc.name>
:
bug acknowledged by developer.
(Mon, 23 Jan 2023 22:00:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 60971-done <at> debbugs.gnu.org (full text, mbox):
lloda <lloda <at> sarc.name> skribis:
> lgtm, no other issues on mac os.
Awesome, pushed as 9b20ca275dba758a194073936cde7c95311bd51e.
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Feb 2023 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 335 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.