fix(build): repair mk emuinstall on a clean clone - #507
Open
Ticed wants to merge 2 commits into
Open
Conversation
The emu configs for MacOSX and Linux declare tk, so the emulator links libtk.a, but libtk was absent from the directory walk. mk emuinstall and mk install therefore failed at the final link on a clean clone. The platform build scripts carry their own library list including libtk, which is why CI never saw this.
Every other platform sets INSTALLDIR to $ROOT/$SYSTARG/$OBJTYPE/bin. The macOS mkfiles set a literal /sys/$SYSTARG/$OBJTYPE/bin, so the install step had nowhere to write and mk emuinstall failed after a successful build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mk emuinstallandmk installfail on a clean clone on macOS. There are two faults in the same command, so this PR has two commits.1. libtk is missing from EMUDIRS
Everything compiles, then the emulator link fails:
The root
mkfilewalksEMUDIRSto build the libraries and the emulator, butlibtkis not in that list.emu/MacOSX/emuandemu/Linux/emuboth declaretkin theirlibsection, soLIBFILESincludeslibtk.aand the link needs it.emu/Nt/emudoes not declaretk, so this part only affects POSIX builds.The first commit adds
libtktoEMUDIRS, afterlibmemlayerand beforeemu. Its dependencies (libdraw,libmemdraw,libmemlayer) already come earlier in the list.2. The macOS install path points at /sys
Fixing the link exposes the next failure. The build finishes, then the install step fails:
Eight platforms set
INSTALLDIR=$ROOT/$SYSTARG/$OBJTYPE/bin. The three macOS mkfiles set a literal/sys/$SYSTARG/$OBJTYPE/bin, carrying the same trailing comment as the others. macOS has no/sys, so the copy has nowhere to go.The second commit restores
$ROOTinemu/MacOSX/mkfile,mkfile-gandmkfile-x. Onlymkfileis used by the current build. The other two hold the same divergence and are corrected for consistency, but they are not exercised here.Why CI passes today
The platform build scripts do not read
EMUDIRS, and they do not run the install step.build-linux-amd64.sh:186has its own library list, and that list already includeslibtk:build-macos-headless.shbuilds only the emulator and assumes the libraries already exist, so the gap stays hidden on any machine that has built before. It shows up on a fresh clone using themkpath, whichCLAUDE.mdoffers alongside the scripts.Verification
macOS arm64, fresh worktree at
585fbdba, these two commits only.Before, from a clean tree:
./makemk.sh, thenmk GUIBACK=headless emuinstallstops at the emulator link. Noo.emuis produced.After, from a clean tree (
mk nuke, then./makemk.sh, thenmk GUIBACK=headless emuinstall): the command exits 0.libtk.ais built as part of the walk, the emulator links,MacOSX/arm64/bin/emuis installed, and the installed binary runs.