fix(build): bootstrap libraries before compiling emu#163
fix(build): bootstrap libraries before compiling emu#163Ticed wants to merge 1 commit intoNERVsystems:masterfrom
Conversation
pdfinn
left a comment
There was a problem hiding this comment.
Hey @Ticed, thanks for this — really appreciate you taking the time to dig into the build system and put together a fix. This is a real problem: the macOS build scripts aren't self-contained like the Linux one, and a fresh clone + ./build-macos-headless.sh shouldn't leave someone staring at linker errors.
Two of these fixes are clean and I'd like to get them merged right away:
- QUICKSTART.md typo — good catch,
X/arm64/bin→MacOSX/arm64/bin devprof.$O: $RUNTin portmkfile —devprof.cincludesrunt.hbut was missing the dependency. Correct fix.
For the library bootstrap, I have a few suggestions before we merge that part:
-
libfreetypedoesn't need to be built. If you look at theemu/MacOSX/emuconfig, freetype is commented out in thelibsection — it's not linked into either headless or SDL3 builds. Building it is harmless but unnecessary. -
The
SYSTARGexport is redundant.mkconfigalready setsSYSTARG=$SYSHOST, so the build system picks it up automatically. No harm done, but it's not needed. -
The library loop is duplicated across three files. Identical 23-line blocks in
build-macos-headless.sh,build-macos-sdl3.sh, andbuild_test.shwill be a maintenance headache. Would you be open to extracting that into a shared script (something likescripts/bootstrap-libs.sh) that all three source? Our CI already handles this as discrete steps — take a look at themacos-arm64job in.github/workflows/ci.ymlfor how we structure the build order.
Suggestion: Would you be up for splitting this into two PRs? I can merge the QUICKSTART + portmkfile fixes right now, and we can iterate on the bootstrap work separately. That way the good stuff lands immediately. Happy to help with the shared-script approach if you want to pair on it.
One more thing — the QUICKSTART and portmkfile fixes are really upstream improvements that would benefit all InferNode users. Would you consider submitting those to infernode-os/infernode as well? That's the canonical repo; our fork here carries product-specific changes. Totally fine to keep the bootstrap PR here since it's about our macOS build scripts specifically.
Thanks again for contributing — finding the devprof dependency and the QUICKSTART typo shows you were reading carefully.
58261c3 to
afa19d2
Compare
|
|
Thanks for the thorough review, @pdfinn. I force-pushed this PR down to the two changes you called out as ready to merge: the I’ll send the macOS bootstrap changes as a separate PR with your suggestions folded in: remove |



Reduced scope per review: this PR now contains only the two fixes that are ready to merge.
QUICKSTART.mdhad a stale path (X/arm64/bin) that would leave readers with a brokenPATH.emu/port/portmkfilewas missing thedevprof.$O: $RUNTdependency, sodevprof.cwould not be rebuilt whenrunt.hregenerates.The macOS library-bootstrap work will follow in a separate PR. That follow-up
will address the review notes by removing
libfreetypefrom the loop, dropping the redundantSYSTARGexport, and extracting the duplicated bootstrap logic into a sharedscripts/bootstrap-libs.shhelper.