Opened 15 months ago

Last modified 15 months ago

#63507 new defect

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) 15 months ago.
Main.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (4)

Changed 15 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 15 months ago by kencu (Ken)

It won't work at present.

I fixed the 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.

Last edited 15 months ago by kencu (Ken) (previous) (diff)

comment:2 in reply to:  1 Changed 15 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 15 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.

Note: See TracTickets for help on using tickets.