Skip to content

feat(build): align bootstrap builds with Termux NDK r29 (16 KB) - #26

Merged
gouravkhunger merged 16 commits into
mainfrom
feat/16kb-page-size-alignment
Aug 16, 2026
Merged

feat(build): align bootstrap builds with Termux NDK r29 (16 KB)#26
gouravkhunger merged 16 commits into
mainfrom
feat/16kb-page-size-alignment

Conversation

@gouravkhunger

@gouravkhunger gouravkhunger commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary (2026-08-16)

Host bootstrap build (same shape as main) on Termux NDK r29. 16 KB ELF is the NDK default. Ruby 3.3.4 + github-pages 232 stay pinned.

  • identity: patches/properties.patch (xyz.jekyllex prefix)
  • slim: no ICU/TclTk/extra terminfo; skip-extract icu/tcl/fonts
  • git 2.55: NO_PERL/NO_EXPAT/NO_TCLTK/NO_RUST

Test plan

  • Build bootstraps green (all 4 ABIs)
  • zip size near v0.1.4 (~60 MB)
  • follow-up: tag + bump jekyllex-android bootstrapVersion + checksums

Inject Google's max/common-page-size=16384 linker flags into the
pinned termux_setup_toolchain_27 setup so bootstrap shared objects
link with 16 KB LOAD alignment without bumping NDK, packages, or
patches. Idempotent; no-ops if flags already present.
Move off the frozen acf1df1e / NDK r27 stack to current termux-packages
(NDK r29, toolchain_29, 16 KB ELF alignment by default).

- Pin termux-packages @ 23d530425344 (TERMUX_PACKAGES_REF)
- Keep upstream properties; apply xyz.jekyllex via apply-jekyllex-identity.sh
- Rebase build-bootstraps on upstream (JekyllEx package set, ruby-*.zip,
  --android10, no second-stage)
- CI uses Termux package-builder docker (run-docker.sh) like Termux
- Keep patches/ for JekyllEx ruby 3.3.x and Android 10 package fixes
- Post-build readelf check for 4 KB LOAD aligns on arm64/x86_64
@gouravkhunger gouravkhunger changed the title fix(build): 16 KB page-size ELF alignment for NDK r27 bootstraps feat(build): align bootstrap builds with Termux NDK r29 (16 KB) Aug 2, 2026
The package-builder image already ships NDK r29 and the Android SDK.
Re-running setup-android-sdk after run-docker UID remap fails with
"Failed to read or create install properties file". Match Termux
packages CI: warm the container, then build-bootstraps only.
Full-tree package overlays replaced modern termux sources with NDK r27-era
recipes while leaving new patches in place, so ncurses fix-paths.patch
failed and broke libxslt.

Use upstream ncurses/libxml2/git for NDK r29. Only replace packages/ruby
with the JekyllEx 3.3.x tree (keep upstream tool-rbinstall.rb.diff) and
add the git credential.c.patch on top of upstream git.
Bundled nokogiri failed configuring because gem patches only ran at
rbinstall (after make) and mini_portile2 was missing on the host gem path.

- Depend on libxml2/libxslt; set NOKOGIRI_USE_SYSTEM_LIBRARIES=1
- Install mini_portile2 on the host ruby as a fallback
- Apply packages/ruby/gem-patches during make (retry after first fail)
- Wire gem-patches into CI overlay; relax rbinstall patch paths
Restore a valid 6-line rbinstall gem-patch hunk (docker gem-patches path),
vendor the 3.3.4 tool-rbinstall prefix rewrite, extract+patch bundled gems
before make, and retarget the git credential password hook at 2.55.
NDK r29 configure was turning linux-android into linux-android-android,
so rbconfig and gem extensions landed off TERMUX_HOST_PLATFORM and
post_massage aborted. Apply Termux android-sdk-level.patch, resolve
rbconfig/extensions by search, and skip libxml2 python bindings.
Docker UID remap cannot create ruby-$arch.zip at the mount root, so verify
and upload saw no archive. Copy the zip into output/, extract only runtime
packages, and check LOAD align on ELF shared objects/executables.
Upstream ncurses now downloads extra terminal sources; codeberg foot
tarball timed out and failed libxslt. Keep the NDK r29 ncurses snapshot
only.
@gouravkhunger
gouravkhunger marked this pull request as ready for review August 16, 2026 10:17
@gouravkhunger
gouravkhunger merged commit 49ba245 into main Aug 16, 2026
6 checks passed
@gouravkhunger
gouravkhunger deleted the feat/16kb-page-size-alignment branch August 16, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant