Opened 19 months ago

Last modified 2 months ago

#67248 assigned defect

grep/coreutils: tiger: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'

Reported by: barracuda156 Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: tiger Cc: Cebtenzzre, ballapete (Peter "Pete" Dyballa), barracuda156, evanmiller (Evan Miller), mascguy (Christopher Nielsen), gombang (Gombang Nan Cengka)
Port: grep coreutils

Description

make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_grep/grep/work/grep-3.10/lib'
/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -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 ppc -MT libgreputils_a-argmatch.o -MD -MP -MF .deps/libgreputils_a-argmatch.Tpo -c -o libgreputils_a-argmatch.o `test -f 'argmatch.c' || echo './'`argmatch.c
In file included from /usr/include/sys/wait.h:110,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from gettext.h:202,
                 from argmatch.h:30,
                 from argmatch.c:25:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[3]: *** [libgreputils_a-argmatch.o] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_grep/grep/work/grep-3.10/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_grep/grep/work/grep-3.10/lib'
make[1]: *** [all-recursive] Error 1

Attachments (2)

main.log (164.3 KB) - added by ballapete (Peter "Pete" Dyballa) 18 months ago.
Main.log of wget @1.21.4 from PPC Tiger, Mac OS X 10.4.11
md2-stream.cpp (144.7 KB) - added by ballapete (Peter "Pete" Dyballa) 18 months ago.
With GCC 4.2 pre-processed wget source file lib/md2-stream.c

Download all attachments as: .zip

Change History (35)

comment:1 Changed 19 months ago by barracuda156

Keywords: tiger added
Port: grep added; tiger removed

comment:2 Changed 19 months ago by Schamschula (Marius Schamschula)

I suspect it is an issue for Mac OS X versions below which we provide build bots. Everything Snow Leopard and up had a clean build.

comment:3 Changed 19 months ago by Cebtenzzre

Cc: Cebtenzzre added

comment:4 Changed 19 months ago by barracuda156

Apparently only on Tiger (also Leopard? not sure). On 10.6.8 and 10A190 Apple gcc-4.2 builds it fine, so it is not a compiler issue per se.

comment:5 Changed 19 months ago by kencu (Ken)

there are many examples (ruby, cctools, more) of the signal.h header causing issues on the transition for Tiger -> Leopard because the register naming changed.

So it's probably that again, but someone with Tiger will have to spend some time and take a look.

comment:6 Changed 19 months ago 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 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.

comment:7 Changed 19 months ago by kencu (Ken)

grep 3.10 builds without any trouble on Tiger i386:

$ port -v installed grep
The following ports are currently installed:
  grep @3.10_0 (active) requested_variants='' platform='darwin 8' archs='i386' date='2023-04-28T21:43:12-0700'

I didn't try PPC yet.

comment:8 Changed 19 months ago by kencu (Ken)

Summary: grep @3.10 is broken on Tiger: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'grep @3.10 is broken on some versions of Tiger (?PPC ONLY): error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'

comment:9 Changed 19 months ago by kencu (Ken)

Installing coreutils on Tiger i386 does fail as mentioned, but also as mentioned, it seems to be missing the definitions in <sys/types.h>.

I just hacked in an #include <sys/types.h> into the end of lib/config.h and coreutils built:

$ port -v installed coreutils
The following ports are currently installed:
  coreutils @8.31_0 requested_variants='' platform='darwin 8' archs='i386' date='2019-12-18T21:24:03-0800'
  coreutils @8.32_0 requested_variants='' platform='darwin 8' archs='i386' date='2020-05-24T11:44:12-0700'
  coreutils @9.3_0 (active) requested_variants='' platform='darwin 8' archs='i386' date='2023-04-28T23:28:09-0700'

but how to get it properly done remains open.

Version 0, edited 19 months ago by kencu (Ken) (next)

comment:10 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:11 Changed 19 months ago by ballapete (Peter "Pete" Dyballa)

Surprisingly I have also installed on PPC Tiger, Mac OS X 10.4.11:

  grep @3.10_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2023-05-01T16:20:35+0200'

comment:12 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

#67488 has the same problem. Is it necessary to try building more than once or twice? The environment in which I try to upgrade changes from try to try because gtk3 (depending on libxkbcommon/libxkbcommon-x11 ) and poppler do not upgrade, so I have to reset the version number or remove lines inside their Portfiles…

comment:13 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

Here is the next such error with wget @1.21.4:

/opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I../src  -DDEFAULT_TEXT_DOMAIN=\"wget-gnulib\" -I/opt/local/include   -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -DNDEBUG -pipe -Os -std=c99 -arch ppc -MT libgnu_a-md2-stream.o -MD -MP -MF .deps/libgnu_a-md2-stream.Tpo -c -o libgnu_a-md2-stream.o `test -f 'md2-stream.c' || echo './'`md2-stream.c
In file included from /usr/include/sys/wait.h:110,
                 from ./sys/wait.h:28,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from md2-stream.c:27:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
md2-stream.c: In function 'md2_stream':
md2-stream.c:78: warning: implicit declaration of function 'ferror_unlocked'
md2-stream.c:89: warning: implicit declaration of function 'feof_unlocked'
make[3]: *** [libgnu_a-md2-stream.o] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_net_wget/wget/work/wget-1.21.4/lib'

Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log of wget @1.21.4 from PPC Tiger, Mac OS X 10.4.11

comment:14 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

The C header files included while pre-compiling md2-stream.c are:

. ../src/config.h
.. /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdbool.h
.. ./assert.h
... /usr/include/assert.h
.... /usr/include/sys/cdefs.h
... ./stddef.h
.... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h
. md2.h
.. ./stdio.h
... /usr/include/stdio.h
.... /usr/include/_types.h
..... /usr/include/sys/_types.h
...... /usr/include/machine/_types.h
....... /usr/include/ppc/_types.h
... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdarg.h
... ./stddef.h
... ./sys/types.h
.... /usr/include/sys/types.h
..... /usr/include/sys/appleapiopts.h
..... /usr/include/machine/types.h
...... /usr/include/ppc/types.h
....... /usr/include/ppc/_types.h
..... /usr/include/machine/endian.h
...... /usr/include/ppc/endian.h
....... /usr/include/sys/_endian.h
........ ./stdint.h
......... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h
......... ./limits.h
.......... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h
........... /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/syslimits.h
........... /usr/include/limits.h
............ /usr/include/machine/limits.h
............. /usr/include/ppc/limits.h
.............. /usr/include/ppc/_limits.h
............ /usr/include/sys/syslimits.h
......... ./sys/types.h
.......... /usr/include/sys/types.h
......... ./inttypes.h
.......... /usr/include/inttypes.h
........... ./stdint.h
........ /usr/include/libkern/OSByteOrder.h
......... /usr/include/libkern/ppc/OSByteOrder.h
.. ./stddef.h
. ./stdlib.h
.. /usr/include/stdlib.h
... ./sys/wait.h
.... /usr/include/sys/wait.h
..... /usr/include/sys/signal.h
...... /usr/include/machine/signal.h
....... /usr/include/ppc/signal.h
..... /usr/include/sys/resource.h
.... ./sys/types.h
... ./alloca.h
.. ./stddef.h
.. ./unistd.h
... /usr/include/unistd.h
.... /usr/include/sys/unistd.h
.... ./sys/select.h
..... ./sys/types.h
..... ./sys/time.h
...... /usr/include/sys/time.h
....... ./time.h
........ /usr/include/time.h
......... /usr/include/machine/_limits.h
........ ./stddef.h
..... /usr/include/sys/select.h
...... ./sys/types.h
...... ./signal.h
....... ./sys/types.h
....... /usr/include/signal.h
....... /usr/include/pthread.h
........ /usr/include/pthread_impl.h
........ ./sched.h
......... /usr/include/sched.h
......... ./sys/types.h
........ ./time.h
..... ./signal.h
... ./stddef.h
... ./stdlib.h
... ./sys/types.h
... ./getopt-cdefs.h
... ./getopt-pfx-core.h
.... ./getopt-core.h
... /usr/include/TargetConditionals.h
... /usr/include/crt_externs.h
. unlocked-io.h
.. ./stdio.h

comment:15 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

The pre-compiled output has:

# 128 "/usr/include/sys/signal.h" 3 4
#define SIG_DFL (void (*)( ))0
#define SIG_IGN (void (*)( ))1
#define SIG_HOLD (void (*)( ))5
#define SIG_ERR ((void (*)( ))-1)






#define _MCONTEXT_T 
typedef __darwin_mcontext_t mcontext_t;




#define _MCONTEXT64_T 
typedef __darwin_mcontext64_t mcontext64_t;
# 160 "/usr/include/sys/signal.h" 3 4
#define _SIGSET_T 
typedef __darwin_sigset_t sigset_t;
# 170 "/usr/include/sys/signal.h" 3 4
#define _UCONTEXT_T 
typedef __darwin_ucontext_t ucontext_t;




#define _UCONTEXT64_T 
typedef __darwin_ucontext64_t ucontext64_t;
# 186 "/usr/include/sys/signal.h" 3 4

The types used are not defined in this scope. I think sys/ucontext.h needs to be included that has #include <machine/ucontext.h> which has a switch:

#ifndef	_MACHINE_UCONTEXT_H_
#define	_MACHINE_UCONTEXT_H_

#if defined (__ppc__) || defined (__ppc64__)
#include "ppc/ucontext.h"
#elif defined (__i386__) || defined(__x86_64__)
#include "i386/ucontext.h"
#else
#error architecture not supported
#endif

#endif	/* _MACHINE_UCONTEXT_H_ */

Could be a configure.cppflags-append -include sys/ucontext.h helps to cure the problem…

comment:16 Changed 18 months ago by Cebtenzzre

ballapete, see my earlier comment. From what I can tell it's not a missing header, as the necessary types should be provided by sys/_types.h. It's caused by e.g. gnulib #undef'ing a feature test macro (_POSIX_C_SOURCE) and fragile preprocessor conditionals in the system headers.

comment:17 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

This is not easy to believe – GCC7 is one and a half years old, apple-gcc42 that was used for wget, is two and a half years old. The failures are too recent.

As long as other ports are being built I can check whether and where this macro gets processed.

comment:18 Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

sys/_types.h has:

   29	/* Forward references */
   30	#ifndef _POSIX_C_SOURCE
   31	struct mcontext;
   32	struct mcontext64;
   33	#else /* _POSIX_C_SOURCE */
   34	struct __darwin_mcontext;
   35	#endif /* _POSIX_C_SOURCE */

and

  106	#ifndef _POSIX_C_SOURCE
  107	typedef struct mcontext *__darwin_mcontext_t;	/* [???] machine context */
  108	typedef struct mcontext64 *__darwin_mcontext64_t; /* [???] machine context */
  109	#else /* _POSIX_C_SOURCE */
  110	typedef struct __darwin_mcontext *__darwin_mcontext_t; /* [???] machine context */
  111	#endif /* _POSIX_C_SOURCE */

and also:

  157	/* user context */
  158	#ifndef _POSIX_C_SOURCE
  159	struct ucontext
  160	#else /* _POSIX_C_SOURCE */
  161	struct __darwin_ucontext
  162	#endif /* _POSIX_C_SOURCE */
  163	{
  164		int		uc_onstack;
  165		__darwin_sigset_t	uc_sigmask;	/* signal mask used by this context */
  166		__darwin_stack_t 	uc_stack;	/* stack used by this context */
  167	#ifndef _POSIX_C_SOURCE
  168		struct ucontext	*uc_link;		/* pointer to resuming context */
  169	#else /* _POSIX_C_SOURCE */
  170		struct __darwin_ucontext *uc_link;	/* pointer to resuming context */
  171	#endif /* _POSIX_C_SOURCE */
  172		__darwin_size_t	uc_mcsize;		/* size of the machine context passed in */
  173		__darwin_mcontext_t	uc_mcontext;	/* pointer to machine specific context */
  174	};
  175	#ifndef _POSIX_C_SOURCE
  176	typedef struct ucontext __darwin_ucontext_t;	/* [???] user context */
  177	#else /* _POSIX_C_SOURCE */
  178	typedef struct __darwin_ucontext __darwin_ucontext_t; /* [???] user context */
  179	#endif /* _POSIX_C_SOURCE */
  180	
  181	#ifndef _POSIX_C_SOURCE
  182	struct ucontext64 {
  183		int		uc_onstack;
  184		__darwin_sigset_t	uc_sigmask;	/* signal mask used by this context */
  185		__darwin_stack_t 	uc_stack;	/* stack used by this context */
  186		struct ucontext64 *uc_link;		/* pointer to resuming context */
  187		__darwin_size_t	uc_mcsize;		/* size of the machine context passed in */
  188		__darwin_mcontext64_t uc_mcontext64;	/* pointer to machine specific context */
  189	};
  190	typedef struct ucontext64 __darwin_ucontext64_t; /* [???] user context */
  191	#endif /* _POSIX_C_SOURCE */

while the pre-compiled C source has:

# 28 "/usr/include/sys/_types.h" 2 3 4
.
.
.
struct __darwin_mcontext;
# 49 "/usr/include/sys/_types.h" 3 4
.
.
.
# 93 "/usr/include/sys/_types.h" 3 4
.
.
.
typedef struct __darwin_mcontext *__darwin_mcontext_t;
.
.
.
# 128 "/usr/include/sys/signal.h" 3 4
.
.
.
#define _MCONTEXT_T 
typedef __darwin_mcontext_t mcontext_t;
.
.
.
#define _MCONTEXT64_T 
typedef __darwin_mcontext64_t mcontext64_t;

and also

# 93 "/usr/include/sys/_types.h" 3 4
.
.
.
struct __darwin_ucontext

{
 int uc_onstack;
 __darwin_sigset_t uc_sigmask;
 __darwin_stack_t uc_stack;

 struct __darwin_ucontext *uc_link;

 __darwin_size_t uc_mcsize;
 __darwin_mcontext_t uc_mcontext;
};


typedef struct __darwin_ucontext __darwin_ucontext_t;
# 28 "/usr/include/_types.h" 2 3 4
.
.
.
# 170 "/usr/include/sys/signal.h" 3 4
#define _UCONTEXT_T 
typedef __darwin_ucontext_t ucontext_t;


#define _UCONTEXT64_T 
typedef __darwin_ucontext64_t ucontext64_t;
# 186 "/usr/include/sys/signal.h" 3 4

which means that _POSIX_C_SOURCE is (was) #defined. Actually the problem is despite types __darwin_mcontext64_t and __darwin_ucontext64_t #defined. These are defined outside of sys/_types.h, in sys/signal.h:

  134	#ifndef _ANSI_SOURCE
  135	#include <sys/_types.h>
  136	
  137	#ifndef _MCONTEXT_T
  138	#define _MCONTEXT_T
  139	typedef __darwin_mcontext_t		mcontext_t;
  140	#endif
  141	
  142	#ifndef _POSIX_C_SOURCE
  143	#ifndef _MCONTEXT64_T
  144	#define _MCONTEXT64_T
  145	typedef __darwin_mcontext64_t		mcontext64_t;        <<<<<<<<
  146	#endif
  147 	#endif /* _POSIX_C_SOURCE */
  148	
  149	#ifndef _PID_T
  150 	#define _PID_T
  151	typedef __darwin_pid_t			pid_t;
  152	#endif
  153	
  154	#ifndef _PTHREAD_ATTR_T
  155	#define _PTHREAD_ATTR_T
  156	typedef __darwin_pthread_attr_t		pthread_attr_t;
  157	#endif
  158	
  159	#ifndef _SIGSET_T
  160	#define _SIGSET_T
  161	typedef __darwin_sigset_t		sigset_t;
  162	#endif
  163	
  164	#ifndef	_SIZE_T
  165	#define	_SIZE_T
  166	typedef	__darwin_size_t			size_t;
  167	#endif
  168	
  169	#ifndef _UCONTEXT_T
  170	#define _UCONTEXT_T
  171	typedef __darwin_ucontext_t		ucontext_t;
  172	#endif
  173	
  174	#ifndef _POSIX_C_SOURCE
  175	#ifndef _UCONTEXT64_T
  176  	#define _UCONTEXT64_T
  177	typedef __darwin_ucontext64_t		ucontext64_t;        <<<<<<<<
  178	#endif
  179	#endif /* _POSIX_C_SOURCE */

Which means that in-between _POSIX_C_SOURCE changed to being undefined…

First time here:

# 21 "./stdio.h" 3
# 42 "./stdio.h" 3
#define _POSIX_C_SOURCE 200809L    (line 2406 pre-processed output)

then

# 50 "./stdio.h" 2 3

#undef _GL_ALREADY_INCLUDING_STDIO_H


#undef _GL_DEFINED__POSIX_C_SOURCE
#undef _POSIX_C_SOURCE



#define _GL_STDIO_H 
# 68 "./stdio.h" 3                (line 2924 pre-processed output)

And indeed some 2,000 lines later sys/signal.h with the user context variables gets included. So it's stdlib.h that resets the macro?

Changed 18 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: md2-stream.cpp added

With GCC 4.2 pre-processed wget source file lib/md2-stream.c

comment:19 Changed 18 months ago by mascguy (Christopher Nielsen)

Cc: barracuda156 evanmiller mascguy added
Port: coreutils added
Summary: grep @3.10 is broken on some versions of Tiger (?PPC ONLY): error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'grep/coreutils: tiger: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'

Has duplicate issue:67527

comment:20 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

Same error with coreutils @9.4.

comment:21 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

diffutils @3.10_1 have this problem:

/opt/local/bin/gcc-apple-4.2 -std=gnu99  -I.   -I/opt/local/include   -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-missing-field-initializers -pipe -Os -arch ppc -MT libdiffutils_a-argmatch.o -MD -MP -MF .deps/libdiffutils_a-argmatch.Tpo -c -o libdiffutils_a-argmatch.o `test -f 'argmatch.c' || echo './'`argmatch.c
In file included from /usr/include/sys/wait.h:110,
                 from ./sys/wait.h:28,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from gettext.h:202,
                 from argmatch.h:35,
                 from argmatch.c:25:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[2]: *** [libdiffutils_a-argmatch.o] Error 1

comment:22 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

And texinfo encounters this bug:

/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../..   -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 ppc -MT libgnu_a-error.o -MD -MP -MF .deps/libgnu_a-error.Tpo -c -o libgnu_a-error.o `test -f 'error.c' || echo './'`error.c
In file included from /usr/include/sys/wait.h:110,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from error.c:29:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[4]: *** [libgnu_a-error.o] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_textproc_texinfo/texinfo/work/texinfo-7.1/gnulib/lib'

comment:23 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

And gzip has it too:

/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I.   -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 ppc -MT libgzip_a-error.o -MD -MP -MF .deps/libgzip_a-error.Tpo -c -o libgzip_a-error.o `test -f 'error.c' || echo './'`error.c
In file included from /usr/include/sys/wait.h:110,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from error.c:29:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[3]: *** [libgzip_a-error.o] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_gzip/gzip/work/gzip-1.13/lib'

comment:24 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

gnutar fails with:

/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -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 ppc -MT libgnu_a-argmatch.o -MD -MP -MF .deps/libgnu_a-argmatch.Tpo -c -o libgnu_a-argmatch.o `test -f 'argmatch.c' || echo './'`argmatch.c
In file included from /usr/include/sys/wait.h:110,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from argmatch.c:28:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[4]: *** [libgnu_a-argmatch.o] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_gnutar/gnutar/work/tar-1.35/gnu'

comment:25 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)

While checking why lighttpd does not find a few installed things I saw this in configure.log:

configure:7622: /opt/local/bin/gcc-apple-4.2 -std=gnu99 -c -pipe -Os -I/opt/local/include/LegacySupport -arch ppc -I/opt/local/include -I/opt/local/include/LegacySupport conftest.c >&5
conftest.c:39: error: expected ';', ',' or ')' before 'ip'
conftest.c:40: error: '_Restrict' undeclared here (not in a function)
conftest.c:41: error: '_Restrict' undeclared here (not in a function)
conftest.c: In function 'main':
conftest.c:47: error: nested functions are disabled, use -fnested-functions to re-enable
conftest.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 't'
conftest.c:47: error: 't' undeclared (first use in this function)
conftest.c:47: error: (Each undeclared identifier is reported only once
conftest.c:47: error: for each function it appears in.)
conftest.c:49: warning: implicit declaration of function 'foo'
conftest.c:49: error: type of formal parameter 1 is incomplete
configure:7622: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "lighttpd"
| #define PACKAGE_TARNAME "lighttpd"
| #define PACKAGE_VERSION "1.4.73"
| #define PACKAGE_STRING "lighttpd 1.4.73"
| #define PACKAGE_BUGREPORT "https://redmine.lighttpd.net/projects/lighttpd/boards/2"
| #define PACKAGE_URL "https://www.lighttpd.net/"
| #define PACKAGE "lighttpd"
| #define VERSION "1.4.73"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| /* end confdefs.h.  */
| typedef int *int_ptr;
| 	   int foo (int_ptr _Restrict ip) { return ip[0]; }
| 	   int bar (int [_Restrict]); /* Catch GCC bug 14050.  */
| 	   int bar (int ip[_Restrict]) { return ip[0]; }
| 
| int
| main (void)
| {
| int s[1];
| 	   int *_Restrict t = s;
| 	   t[0] = 0;
| 	   return foo (t) + bar (t);
| 
|   ;
|   return 0;
| }

Is this the cure?

error: nested functions are disabled, use -fnested-functions to re-enable

comment:26 in reply to:  22 Changed 9 months ago by barracuda156

Replying to ballapete:

And texinfo encounters this bug:

/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../..   -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 ppc -MT libgnu_a-error.o -MD -MP -MF .deps/libgnu_a-error.Tpo -c -o libgnu_a-error.o `test -f 'error.c' || echo './'`error.c
In file included from /usr/include/sys/wait.h:110,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from error.c:29:
/usr/include/sys/signal.h:145: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'mcontext64_t'
/usr/include/sys/signal.h:177: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ucontext64_t'
make[4]: *** [libgnu_a-error.o] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_textproc_texinfo/texinfo/work/texinfo-7.1/gnulib/lib'

Yes, there is even a ticket for it: #68964

comment:27 Changed 9 months ago by gombang (Gombang Nan Cengka)

Cc: gombang added

comment:28 Changed 8 months ago by ballapete (Peter "Pete" Dyballa)

I tried to build texinfo with GCC7 and it failed this way:

In file included from /usr/include/sys/wait.h:110:0,
                 from /usr/include/stdlib.h:64,
                 from ./stdlib.h:36,
                 from error.c:29:
/usr/include/sys/signal.h:145:9: error: unknown type name '__darwin_mcontext64_t'
 typedef __darwin_mcontext64_t  mcontext64_t;
         ^~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/signal.h:177:9: error: unknown type name '__darwin_ucontext64_t'
 typedef __darwin_ucontext64_t  ucontext64_t;
         ^~~~~~~~~~~~~~~~~~~~~

This makes the situation clear: there are no 64-bit process contexts on G3 and G4 and i386. I found this which deals with 64-bit support for RTEMS running on G4, I think. Maybe it's easier to add 32-bit support to `gnulib…

Last edited 8 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:29 Changed 7 months ago by kencu (Ken)

In 79cc8a2a1e189cf7ff4704b668ba2c1c716ca4d6/macports-ports (master):

texinfo: fix gnulib regression manifesting on Tiger

see: #67248

comment:30 Changed 7 months ago by kencu (Ken)

@Cebtenzzre -- you nailed it.

I think (sadly) this will need a port-by-port fix as I can't see an elegant way to throw it into legacysupport. Maybe someone else can.

comment:31 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

Texinfo built today: texinfo @7.1_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2024-04-30T08:20:51+0200'

comment:32 Changed 6 months ago by ballapete (Peter "Pete" Dyballa)

coreutils @9.5_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2024-04-30T13:37:26+0200' built too.

comment:33 Changed 2 months ago by hamishmb (Hamish Mcintyre-Bhatty)

I had this issue with gnutar on 10.4 PPC as well, which was a circular dependency problem, as I needed to build automake, which is when I found that the system tar was too old to extract automake, but gnutar also depended on automake.

I just ended up building the newest version of tar that I could (1.30), and then forcing macports to use it by creating a symlink from /usr/bin/tar to my manually compiled tar in /opt/local. I'm sure that's not the recommended way to do things, but it seems to work fine.

Note: See TracTickets for help on using tickets.