Opened 17 months ago

Closed 7 weeks ago

#63507 closed defect (duplicate)

xorg-server-legacy @1.20.10_2 does not build on PPC Tiger, Mac OS X 20.4.11, because bundle_trampoline.c:32:19: error: spawn.h: No such file or directory

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: tiger Cc: jeremyhu@…
Port: xorg-server-legacy

Description

/opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include  -I./.. -DBUILD_DATE=\"20210918\" -DXSERVER_VERSION=\"1.20.10\" -DX11BINDIR=\"/opt/local/bin\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-legacy/files/include -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I../../../include -I../../../include -I../../../Xext  -I../../../damageext -I../../../xfixes -I../../../Xi -I../../../mi -I../../../miext/sync -I../../../miext/shadow  -I../../../miext/damage -I../../../render -I../../../randr -I../../../fb -I../../../dbe -I../../../present -pipe -Os -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c -o bundle_trampoline.o bundle_trampoline.c
bundle_trampoline.c:32:19: error: spawn.h: No such file or directory
bundle_trampoline.c:53: warning: function declaration isn't a prototype
bundle_trampoline.c: In function 'executable_path':
bundle_trampoline.c:53: warning: old-style function definition
bundle_trampoline.c: In function 'main':
bundle_trampoline.c:79: error: 'posix_spawnattr_t' undeclared (first use in this function)
bundle_trampoline.c:79: error: (Each undeclared identifier is reported only once
bundle_trampoline.c:79: error: for each function it appears in.)
bundle_trampoline.c:79: error: expected ';' before 'attr'
bundle_trampoline.c:80: warning: implicit declaration of function 'posix_spawnattr_init'
bundle_trampoline.c:80: warning: nested extern declaration of 'posix_spawnattr_init'
bundle_trampoline.c:80: error: 'attr' undeclared (first use in this function)
bundle_trampoline.c:81: warning: implicit declaration of function 'posix_spawnattr_setflags'
bundle_trampoline.c:81: warning: nested extern declaration of 'posix_spawnattr_setflags'
bundle_trampoline.c:81: error: 'POSIX_SPAWN_SETEXEC' undeclared (first use in this function)
bundle_trampoline.c:83: warning: ISO C90 forbids mixed declarations and code
bundle_trampoline.c:84: warning: implicit declaration of function 'posix_spawn'
bundle_trampoline.c:84: warning: nested extern declaration of 'posix_spawn'
make[4]: *** [bundle_trampoline.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_x11_xorg-server-legacy/xorg-server-legacy/work/XQuartz-xorg-server-16f52e5/hw/xquartz/mach-startup'
make[3]: *** [all] Error 2

This file does exist:

-rw-r--r-- 1 root admin 1360 31. Jul 14:30 /opt/local/include/LegacySupport/sys/spawn.h

The C code in bundle_trampoline.c is:

   29	#include <assert.h>
   30	#include <mach-o/dyld.h>
   31	#include <libgen.h>
   32	#include <spawn.h>
   33	#include <sys/syslimits.h>
   34	#include <stdio.h>
   35	#include <stdlib.h>
   36	#include <unistd.h>
   37	
   38	/* We wnt XQuartz.app to inherit a login shell environment.  This is handled by the X11.sh

The word wnt in the last line could be corrected and on old Macs <sys/spawn> could be included?

Attachments (1)

main.log (1.6 MB) - added by ballapete (Peter "Pete" Dyballa) 17 months ago.
Main.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (7)

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

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

comment:1 Changed 17 months ago by kencu (Ken)

It won't work at present. I fixed this spawn issue locally in xorg-server-legacy here, https://github.com/kencu/macports-ports/commit/670d8c47c1dbd8ae799ca59322ec559237d7eefa, but even then it just crashes.

I believe xorg-server-1.18 in MacPorts still works on Tiger, but it is not as recent as what we had before.

I therefore use the xorg-server or xorg-server-legacy I put in TigerPorts https://github.com/kencu/TigerPorts/ until such time as someone has time to figure out why the one in MacPorts crashes after my spawn.h fix, and fixes that.

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

comment:2 in reply to:  1 Changed 17 months ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

I have these installed:

  xorg-server       @1.18.4_3 requested_variants='' platform='darwin 8' archs='ppc' date='2018-09-08T11:14:45+0200'
  xorg-server-devel @1.20.4_0 requested_variants='' platform='darwin 8' archs='ppc' date='2019-03-26T12:32:51+0100'
  xorg-server-devel @1.20.9_0 requested_variants='' platform='darwin 8' archs='ppc' date='2020-11-19T23:43:35+0100'

comment:3 Changed 17 months ago by kencu (Ken)

yes, old installed versions. All those have changed such that you will no longer be able to build those, but if you have them installed you can avoid updating them with modest effort.

comment:4 Changed 8 weeks ago by ballapete (Peter "Pete" Dyballa)

The recent version of Portfile uses the configure arguments --disable-dri2 --disable-dri3 which seem to be obsolete now, since I recall mesa @22.1.7 now supports this…

comment:5 Changed 8 weeks ago by ballapete (Peter "Pete" Dyballa)

I tried to build once with unchanged Portfile but with GCC 7 instead of default GCC 4.2 – and ran into a different failure:

libtool: compile:  /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I../../include -DBUILD_DATE=\"20221206\" -DXSERVER_VERSION=\"1.20.10\" -DUSE_NEW_CLUT -DXFree86Server -I../../miext/rootless -I../../pseudoramiX -DX11LIBDIR=\"/opt/local/lib\" -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/var/macports/sources/nue.de.rsync.macports.org/macports/release/tarballs/ports/x11/xorg-server-legacy/files/include -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I../../include -I../../include -I../../Xext -I../../damageext -I../../xfixes -I../../Xi -I../../mi -I../../miext/sync -I../../miext/shadow -I../../miext/damage -I../../render -I../../randr -I../../fb -I../../dbe -I../../present -pipe -Os -arch ppc -D_THREAD_SAFE -pthread -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA -c X11Application.m  -fno-common -DPIC -o .libs/X11Application.o
In file included from X11Controller.h:41:0,
                 from X11Application.h:36,
                 from X11Application.m:39:
xpr/x-list.h:51:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 X_EXTERN void X_PFX(list_free_1) (x_list * node);
          ^~~~
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:52:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_prepend) (x_list * lst, void *data);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:54:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_append) (x_list * lst, void *data);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:55:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_remove) (x_list * lst, void *data);
                 ^
xpr/x-list.h:56:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 X_EXTERN void X_PFX(list_free) (x_list * lst);
          ^~~~
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:57:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_pop) (x_list * lst, void **data_ret);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:59:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_copy) (x_list * lst);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:60:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_reverse) (x_list * lst);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:61:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_find) (x_list * lst, void *data);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:62:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_nth) (x_list * lst, int n);
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:63:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_filter) (x_list * src,
                 ^
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:66:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_map) (x_list * src,
                 ^
xpr/x-list.h:70:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
 X_EXTERN unsigned int X_PFX(list_length) (x_list * lst);
          ^~~~~~~~
xpr/x-list.h:71:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 X_EXTERN void X_PFX(list_foreach) (x_list * lst, void (*fun)
          ^~~~
xpr/x-list.h:48:18: error: unknown type name '__private_extern__'
 #define X_EXTERN __private_extern__
                  ^
xpr/x-list.h:48:18: note: in definition of macro 'X_EXTERN'
 #define X_EXTERN __private_extern__
                  ^~~~~~~~~~~~~~~~~~
xpr/x-list.h:75:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 X_EXTERN x_list *X_PFX(list_sort) (x_list * lst,
                 ^
X11Application.m:103:12: warning: redundant redeclaration of 'darwinFakeButtons' [-Wredundant-decls]
 extern int darwinFakeButtons;
            ^~~~~~~~~~~~~~~~~
In file included from X11Application.m:41:0:
darwin.h:68:12: note: previous declaration of 'darwinFakeButtons' was here
 extern int darwinFakeButtons;
            ^~~~~~~~~~~~~~~~~
X11Application.m: In function '-[X11Application sendEvent:]':
X11Application.m:321:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     OSX_BOOL for_appkit, for_x;
     ^~~~~~~~
X11Application.m:351:21: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
                     NSWindow *mainWindow = [self mainWindow];
                     ^~~~~~~~
X11Application.m:497:17: warning: 'X11Application' may not respond to '-set_front_process:'
                 [self set_front_process:nil];
                 ^
X11Application.m:497:17: warning: (Messages without a matching method signature
X11Application.m:497:17: warning: will be assumed to return 'id' and accept
X11Application.m:497:17: warning: '...' as arguments.)
X11Application.m: In function 'X11ApplicationCanEnterRandR':
X11Application.m:1156:5: warning: non-ASCII character in CFString literal [--all-warnings]
     msg = NSLocalizedString(
     ^~~
make[3]: *** [X11Application.lo] Error 1

comment:6 Changed 7 weeks ago by kencu (Ken)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.