Skip to content

Big Sur Darwin/11.0/trunk/arm64: 135 packages failing to bulk build due to legacy Imake xorg-cf-files M1/arm64/aarch64 error #314

@JohnDDuncanIII

Description

@JohnDDuncanIII

I was hoping to upgrade from the Darwin/11.0/x86_64 to the Darwin/11.0/arm64 bootstrap in order to run native arm64 packages (rather than x86_64 packages through Rosetta 2) on my M1 MacBook, but it looks like some of the legacy Imake XQuartz programs which I use regularly (catclock, xworld, xphoon, etc.) are broken due to

clang: error: no such file or directory: 'DarwinMachineDefines'

in the most recent Darwin arm64 bulk build.

https://us-east.manta.joyent.com/pkgsrc/public/reports/Darwin/11.0/trunk/arm64/20211006.0939/meta/report.html


It looks like the logic originates from the Darwin / Mac OS X configuration by John Carmack Imake configuration logic for cf.

https://opensource.apple.com/source/X11/X11-0.46.4/xc/config/cf/darwin.cf.auto.html
https://opensource.apple.com/source/X11/X11-0.46.4/xc/config/cf/Imake.cf.auto.html


From my research, it looks like there are ~135 packages in the bulk build which failed due to the aforementioned error.

all-failures.txt

all-failures.zip

DarwinMachineDefines.txt

DarwinMachineDefines.txt
kterm-6.2.0nb24/build.log
magicpoint-1.13anb35/build.log
hanterm-3.1.6nb6/build.log
pixmap-2.6.4nb8/build.log
oneko-1.2nb2/build.log
w9wm-0.4.2nb1/build.log
netmaze-0.81nb4/build.log
kdrill-6.5/build.log
plotmtv-1.4.1nb3/build.log
spider-1.1nb3/build.log
llnlxftp-2.1nb4/build.log
xtel-3.3.0nb14/build.log
nas-1.9.4nb1/build.log
root-tail-0.0.10nb3/build.log
svb-1.0nb2/build.log
tanked-0.90nb3/build.log
llnlxdir-2.1.2nb4/build.log
speyes-1.2.0nb1/build.log
tgif-4.2.5nb1/build.log
xrolodex-1.5nb6/build.log
xbat-1.11nb2/build.log
yrolo-1.1nb6/build.log
xbill-2.0nb6/build.log
unclutter-8nb1/build.log
xbl-1.1.6nb1/build.log
xboing-2.4nb4/build.log
viewfax-2.4nb2/build.log
wmavgload-0.7.0nb1/build.log
xart-19980415nb19/build.log
xdemineur-2.1.1nb2/build.log
xbmbrowser-5.1nb5/build.log
xemeraldia-0.31nb6/build.log
xgraph-11.3.2.9nb2/build.log
xli-1.17.0nb13/build.log
xpaint-2.7.8.1nb11/build.log
x2x-1.27nb2/build.log
xjewel-1.6nb3/build.log
xv-3.10anb25/build.log
xaniroc-1.02nb4/build.log
xkobo-1.11nb5/build.log
xautolock-1.15nb3/build.log
xmris-4.05nb3/build.log
xbanner-1.31nb1/build.log
xcb-2.4nb2/build.log
xcolors-1.3nb5/build.log
xpat2-1.07nb4/build.log
xcolorsel-1.1anb5/build.log
xpipeman-1.5nb6/build.log
xcruise-0.24nb1/build.log
wmsmixer-0.5.1nb2/build.log
xscavenger-1.4.4nb3/build.log
xearth-1.1nb3/build.log
xscrabble-1.0nb7/build.log
xfishtank-2.2nb1/build.log
xskat-4.0/build.log
xflame-1.1.1nb2/build.log
xmcd-3.0.2nb15/build.log
xforms-1.0nb9/build.log
xmix-2.1nb4/build.log
xvier-1.0nb4/build.log
xgas-1.0nb3/build.log
xmmix-1.2nb6/build.log
xhangglider-0.94.0nb1/build.log
xwave-2.0nb2/build.log
xkeycaps-2.46nb3/build.log
xless-1.7nb4/build.log
xbeeb-0.4.1nb3/build.log
xlogout-19891129nb4/build.log
xlupe-1.1nb3/build.log
asclock-1.0nb2/build.log
xengine-1.0.1nb4/build.log
xmascot-2.6anb2/build.log
asclock-xlib-2.0b11nb1/build.log
skkinput-2.06.4/build.log
xmon-1.5.6/build.log
xmountains-2.7nb2/build.log
catclock-0.0nb6/build.log
xmove-2.0b2nb1/build.log
emiclock-2.0.2nb7/build.log
xrmap-base-2.29nb3/build.log
xmx-2.1a7nb9/build.log
gnyaclock-20001218nb3/build.log
xp-1.2b10nb4/build.log
xfinans-5.9nb4/build.log
xinvest-2.6.9nb3/build.log
xpaste-1.1nb4/build.log
xquote-2.6.10nb4/build.log
lmclock-1.2nb1/build.log
xphoon-19910918nb3/build.log
xpostit-3.3.1nb4/build.log
polclock-1.11nb2/build.log
xscribble-20000616nb3/build.log
mpeg_play-2.4patchednb2/build.log
pload-0.9.5nb3/build.log
xscript-19930228nb2/build.log
sunclock-1.5nb2/build.log
swisswatch-0.06nb2/build.log
titrax-1.98nb16/build.log
xtoolwait-1.3nb2/build.log
rasmol-2.7.3nb2/build.log
larswm-7.5.3nb1/build.log
xwit-3.4nb3/build.log
piewm-1.04/build.log
jetpack-1.0nb2/build.log
tightvncviewer-1.3.10nb2/build.log
wmnet-1.06nb5/build.log
lwm-1.2.4/build.log
xfm-1.4.3nb7/build.log
xvkbd-3.5nb1/build.log
xview-lib-3.2.1nb9/build.log
asnap-1.0nb2/build.log
xalarm-3.06nb5/build.log
vnc-3.3.3.2nb14/build.log
tkgate-1.8.7nb2/build.log
cbzone-2.0cnb2/build.log
ssh-askpass-1.0nb1/build.log
xmeter-1.15nb4/build.log
xtimer-0.8089nb4/build.log
uwm-19881027nb2/build.log
xxkb-1.11/build.log
xwatchwin-1.1.1nb2/build.log
xmailbox-2.5nb3/build.log
tcpillust-1.0anb12/build.log
Xaw-Xpm-1.1nb4/build.log
xchrono-19900813nb2/build.log
tvtwm-11nb3/build.log
xdu-3.0nb8/build.log
xlife-5.0nb6/build.log
xmailwatcher-1.6nb3/build.log
xxgdb-1.12nb2/build.log
tightvnc-1.3.10nb20/build.log
mlvwm-0.9.3/build.log
fvwm-wharf-1.0nb1/build.log
xpilot-4.5.4nb3/configure.log
Canna-lib-3.7pl3nb1/configure.log

From some quick googling, in pkgsrc, it looks like this error can be traced back to xorg-cf-files (https://pkgsrc.se/x11/xorg-cf-files), which is currently maintained by either @alanc or @jsonn.

It looks like a macports user has already submitted a trivial patch that could potentially resolve the error. I'm not sure if macOS treats aarch64 and arm64 as interchangeable, but it looks like the patch chooses arm64, so maybe it just doesn't matter.

https://trac.macports.org/ticket/62895#comment:3

Index: Imake.cf
===================================================================
--- Imake.cf.orig 2018-08-19 16:01:16.000000000 -0500
+++ Imake.cf 2021-05-17 16:33:51.000000000 -0500
@@ -37,6 +37,10 @@
 #  define x86_64DarwinArchitecture
 #  undef __x86_64__
 # endif
+# ifdef __arm64__
+#  define arm64DarwinArchitecture
+#  undef __arm64__
+# endif
 #endif
 
 #if defined(clipper) || defined(__clipper__)
Index: darwin.cf
===================================================================
--- darwin.cf.orig 2018-08-19 16:01:16.000000000 -0500
+++ darwin.cf 2021-05-17 16:35:57.000000000 -0500
@@ -249,6 +249,16 @@
 # define ByteOrder              X_LITTLE_ENDIAN
 #endif /* x86_64DarwinArchitecture */
 
+#ifdef arm64DarwinArchitecture
+# define DarwinMachineDefines   -D__arm64__
+# if HasGcc3
+#  define OptimizedCDebugFlags  -Os
+# else
+#  define OptimizedCDebugFlags  -O2 -fno-strength-reduce
+# endif
+# define ByteOrder              X_LITTLE_ENDIAN
+#endif /* arm64DarwinArchitecture */
+
 #if OSMajorVersion < 7
 # define DarwinLocaleDefines    -DX_LOCALE
 #else

I'm not familiar with pkgsrc development, so I'm not exactly sure what to do next. From the most recent xorg-cf-files release, it sounds like the package has been frozen but is still accepting patches.

from @alanc

xorg-cf-files: update to 1.0.7.
When I released version 1.0.6 in December 2015 I wrote:
Today is the 10th anniversary of X.Org moving off this tool for our own
builds. While we continue to accept patches and publish updates for the
benefit of other packages which still use Imake to build, we have not been
actively maintaining, testing, or adding new OS or platform support for
Imake. Software that still uses Imake to build is encouraged to move
to another build system that is better maintained.

If this is the case, and we can confirm that the above macports patch fixes the build errors, should the patch be directly committed into the freedesktop org/util/cf tree itself?

https://cgit.freedesktop.org/xorg/util/cf/tree/darwin.cf
https://cgit.freedesktop.org/xorg/util/cf/tree/Imake.cf

If not, and we can confirm that it does fix the bulk build errors, should the patch be committed into http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/x11/xorg-cf-files/patches/?


I'm opening this in GitHub since that's what https://www.perkin.org.uk/pages/pkgsrc-binary-packages-for-osx.html recommends for users that are most comfortable using git/GitHub/PRs/etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions