[MacPorts] #67248: grep @3.10 is broken on Tiger: error: expected '=', ',', '; ', 'asm' or '__attribute__' before 'mcontext64_t'
MacPorts
noreply at macports.org
Sat Apr 29 04:10:53 UTC 2023
#67248: grep @3.10 is broken on Tiger: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'mcontext64_t'
---------------------------+-------------------------
Reporter: barracuda156 | Owner: Schamschula
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: tiger
Port: grep |
---------------------------+-------------------------
Comment (by Cebtenzzre):
Same issue with coreutils @9.3 on Tiger:
{{{
:info:build /opt/local/bin/gcc-apple-4.2 -std=gnu99 -I. -I./lib -Ilib
-I./lib -Isrc -I./src -I/opt/local/include -Wno-cast-qual -Wno-
conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-
function -Wno-unused-parameter -pipe -Os -arch i386 -MT lib
/libcoreutils_a-version-etc-fsf.o -MD -MP -MF lib/.deps/libcoreutils_a-
version-etc-fsf.Tpo -c -o lib/libcoreutils_a-version-etc-fsf.o `test -f
'lib/version-etc-fsf.c' || echo './'`lib/version-etc-fsf.c
:info:build mv -f lib/.deps/libcoreutils_a-unsetenv.Tpo lib/.deps
/libcoreutils_a-unsetenv.Po
:info:build In file included from /usr/include/sys/wait.h:110,
:info:build from ./lib/sys/wait.h:28,
:info:build from /usr/include/stdlib.h:64,
:info:build from ./lib/stdlib.h:36,
:info:build from lib/verror.c:26:
:info:build /usr/include/sys/signal.h:145: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'mcontext64_t'
:info:build /usr/include/sys/signal.h:177: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'ucontext64_t'
}}}
gcc 7 and clang-mp-3.4 give an {{{unknown type name
'__darwin_mcontext64_t'}}} error instead.
{{{mcontext64_t}}} is defined like this in sys/signal.h:
{{{
#ifndef _POSIX_C_SOURCE
#ifndef _MCONTEXT64_T
#define _MCONTEXT64_T
typedef __darwin_mcontext64_t mcontext64_t;
#endif
#endif /* _POSIX_C_SOURCE */
}}}
{{{__darwin_mcontext64_t}}} is defined like this in sys/_types.h:
{{{
#ifndef _POSIX_C_SOURCE
typedef struct mcontext *__darwin_mcontext_t; /* [???] machine context
*/
typedef struct mcontext64 *__darwin_mcontext64_t; /* [???] machine context
*/
#else /* _POSIX_C_SOURCE */
typedef struct __darwin_mcontext *__darwin_mcontext_t; /* [???] machine
context */
#endif /* _POSIX_C_SOURCE */
}}}
I can reproduce the problem with this simple C source:
{{{
#define _POSIX_C_SOURCE 200112L
#include <sys/types.h>
#undef _POSIX_C_SOURCE
#include <sys/signal.h>
}}}
gnulib commit
[https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=b1d7d87cb9683e6f0dcef5bb8b6583cac0be8748;hp=e3bf6b879e075d18fcc5af41159a1e2b2c347dd4
b1d7d87c] ("stdio: suppress macOS 13 sprintf warnings") from March 5th
performs a similar define/undef so I bet that's the problem. The OS X 10.5
SDK from Xcode 3.1.4 looks immune to this because it uses a
{{{__need_mcontext64_t}}} macro and defines the types in architecture-
specific headers.
gnulib considers OS X 10.4 to be a "formerly supported platform", so I'm
not sure if this is a valid upstream issue.
--
Ticket URL: <https://trac.macports.org/ticket/67248#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list