Both recipes set DISTFILES and built from archives that tools/mcde-dist.sh
made. They now set DISTFILES= # empty and copy the tree in do-extract, the
way pkgsrc's own net/fetch and pkgtools/pkg_install do. The copy is made by
tools/ext-extract.sh: it copies only the files that differ and keeps the time
stamps of the rest, so a commit rebuilds what it touched and not all 27
minutes of MCDE.
Verified: bmake -C pkgsrc/wm/mcde package built mcde-0.1.0.tgz (16 MB) with
no distinfo present.
These are the changes the cross (Linux) path needed before the chroot path
made them unnecessary on Makronix; they are kept because that path still
builds for the same sysroot on a host that is not Makronix.
tools/pkgsrc-cross.mk.conf names the host side in one place instead of in the
recipes: HOST_TOOLS_BIN on PREPEND_PATH (autoreconf stopped with "Can't exec
libtoolize"), HOST_X11BASE (the include path of the host's X), HOST_X11_LIBS
and HOST_FL_A (the archives the host tools link) and HOST_BUILD_CFLAGS
(-std=gnu17 -fPIE: the 1990s C of the forks, and NetBSD links PIE by default
so tradcpp failed with "relocation R_X86_64_32 ... can not be used when
making a PIE object"). /usr/pkg/lib comes before the base X when linking: a
library pkgsrc builds because the base copy is too old must be the one a
package links (the base freetype is 2.10.4, pkgsrc's 2.15.0 was ignored and
libfontconfig.so needed .19). x11-links keeps the sysroot override only on a
host without X of its own (on Makronix it doubled the path, 7 instead of 111
pkg-config links, x11/libXft then "Package 'x11' not found").
ext/src/mcde/pkgsrc-motif and ext/src/mcde/pkgsrc use those variables; the
build tools (makestrs, wml, wmldbcreate) are built and run by the host, so
their CFLAGS come from HOST_BUILD_CFLAGS and their include path from
HOST_X11BASE.
Measured on makronix-build before the chroot path: mcde-motif rc=0 in 529 s,
wm/mcde rc=0 in 1506 s.
The cross branch named ${MAKRONIX_TOP}/build/pkg/lib/libXt.a and friends. That
is a Linux host, where userland builds them as host tools; on Makronix the
builtin libXt is used, the bootstrap has no libXt.a, and makestrs stopped at
the link ("cannot find /usr/src/build/pkg/lib/libX11.a", measured 2026-11-20).
Where /usr/X11R7/lib/libXt.a and /usr/lib/libfl.a exist, they are named
instead; the bootstrap path stays for the Linux host.
makestrs, wml and wmldbcreate are built and RUN by the build host, and in a
cross build prefix is the target ( /usr/pkg ): there /usr/pkg/include has no
X11, and makestrs stopped with "X11/Xos.h: No such file or directory" on
Makronix (measured 2026-11-20) while the Linux host had the buildlink stub in
that directory. Where the host has its own X (/usr/X11R7), the tools use it;
else the old -I${PREFIX}/include stays.
Two more stops from build/logs/userland-2026-11-14h.log:
- devel/flex linked stage1flex without libintl: its gnulib decides gettext is
needed in a cross build but adds no library, 'undefined reference to gettext'
(log:393-398). The target's base has no libintl, and flex's messages do not
need translating: PKG_OPTIONS.flex= -nls, which its own option turns into
--disable-nls (verified with show-var: CONFIGURE_ARGS carries it).
- wm/mcde stopped linking ttdbck on libXm.la: libtool had recorded a
sysroot-relative '=<workdir>/.buildlink/lib/libpng16.la' in dependency_libs, so
the consumer looked for <sysroot>/<workdir>/... (log:5370ff). pkgsrc rewrites
dependency_libs (mk/buildlink3/bsd.buildlink3.mk:859ff) but not a path starting
with '='. The Motif recipe's post-install gives the installed .la files the
target's path.
The pkgsrc recipe adds TOOL_DEPENDS libXt inside `.if ${X11_TYPE} != "native"`
within the cross branch, with the reasoning that native builds get libXt through
libXmu. That holds only when host and target are the same machine: here the wml
tools run on this host, link the target's libXt through the buildlink directory
and die on NetBSD's libc.so.12 (build/logs/userland-2026-11-14b.log:3698ff).
The dependency is unconditional in the cross branch now, and LIBS_FOR_BUILD
names the host archives it produces (9fd08ec250 and this commit).
The link took -lfl from wmluiltok_LDADD in tools/wml/Makefile, not from LEXLIB,
so the LEXLIB setting of 41bdd94470 changed nothing (build/logs/
userland-2026-11-14a.log:3678ff is the same failure). The variable that decides
the link is overridden now.
wmluiltok is a host tool and links -lfl; -L${LOCALBASE}/lib becomes the buildlink
directory in a cross build, so the linker took the TARGET's flex library and
stopped on NetBSD's libc.so.12 against the host's libc ('errno@@GLIBC_PRIVATE ...
TLS definition ... mismatches non-TLS definition', build/logs/
userland-2026-11-13z.log:3680ff). The path is only set for a cross build; a
native build has flex in its own prefix.
git archive stamps every file with the commit's time, so make saw the checked-in
wmlparse.c as up to date and compiled it although wmlparse.y had changed: the
prototype fixes of a4da3c7870 were ignored and the errors named line numbers of
the old grammar (build/logs/userland-2026-11-13y.log:3660ff, the displayed line
empty). The recipe removes the generated parser in post-extract; yacc (already
in USE_TOOLS) regenerates it.
build/logs/userland-2026-11-13x.log:396: '/bin/make: invalid option -- '='' --
pkgsrc hands MAKE_FLAGS to make as command-line words, so CFLAGS_FOR_BUILD=-O2
-std=gnu17 split and make tried to read -std=gnu17 itself. The variable is set
apart and passed with :Q, as the CPPFLAGS_FOR_BUILD line above already does.
The bare 'Makefile' line in ext/src/mcde/.gitignore hid pkgsrc-motif/Makefile,
so that recipe lived only in the working tree -- found when the change below
could not be committed. It is a recipe, not a generated Makefile; the negation
keeps it visible to git (pkgsrc/Makefile was force-added earlier).
The recipe now passes CFLAGS_FOR_BUILD=-O2 -std=gnu17: config/util/makestrs and
tools/wml are host tools (CC_FOR_BUILD=NATIVE_CC), this host's compiler defaults
to C23 where '()' means 'no arguments', and the fork's 1990s sources stop with
'too many arguments to function' (build/logs/userland-2026-11-13v.log:3646).
The target code is unaffected: the tree's cross gcc defaults to C17
(__STDC_VERSION__ 201710L, measured).