Skip to content

libxml2: preserve resolver zlib inputs in manual build - #901

Closed
brandonpayton wants to merge 1 commit into
mainfrom
fix/libxml2-resolver-zlib-include
Closed

libxml2: preserve resolver zlib inputs in manual build#901
brandonpayton wants to merge 1 commit into
mainfrom
fix/libxml2-resolver-zlib-include

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 12, 2026

Copy link
Copy Markdown
Member

Purpose

Keep libxml2's manual source build on the package resolver's declared zlib dependency path.

The build script runs configure with --with-zlib, then bypasses the generated Makefiles and compiles the libxml2 sources itself. That manual compile omitted the resolver zlib include directory, so CI failed at tree.c: fatal error: zlib.h: No such file or directory even though the resolver had supplied a complete zlib prefix.

Change

  • require both the resolved zlib archive and header
  • pass the resolved zlib include/library paths through configure
  • preserve the resolved zlib include path in the manual compile flags
  • use an argument array for the manual compiler invocation

This changes package build behavior only. It does not change the Kandelo ABI.

Validation

All commands ran through scripts/dev-shell.sh.

  • bash -n packages/registry/libxml2/build-libxml2.sh
  • full wasm32 libxml2 source build from this branch against the current main SDK: produced lib/libxml2.a
  • full wasm32 libxml2 source build from this branch against the SDK ordering fix in SDK: preserve user linker order after platform glue #899: configure found both zlib.h and gzread in -lz, then produced lib/libxml2.a
  • linked a smoke module using both xmlReadMemory and zlibVersion against resolver-produced libxml2 and zlib prefixes
  • wasm-validate --enable-threads --enable-exceptions --enable-function-references on the smoke module
  • confirmed ABI export value 18 and no unresolved libxml2/zlib imports in the smoke module
  • git diff --check

shellcheck was not run because it is not available in the declared dev shell.

@brandonpayton

Copy link
Copy Markdown
Member Author

Exact-head CI classification for 67bfdb225:

  • Browser, cargo-kernel, fork-instrument, libc, POSIX, and Sortix suites passed.
  • Full Vitest ran 125 files / 898 tests; 116 files and 869 tests passed, with the sole failure at host/test/teardown-reclaim.test.ts:71.
  • That assertion is the known fixed-delay teardown readiness race addressed by open PR Make teardown reclamation CI wait for a blocked worker #889; it is unrelated to this PR's libxml2 resolver zlib include/library propagation.

Failing job: https://github.com/Automattic/kandelo/actions/runs/29195911562/job/86660143205

No broader green claim is made while the required check remains red.

@brandonpayton

Copy link
Copy Markdown
Member Author

Merged PR #907 supersedes this work through the holistic libxml2 resolver-input correction now on main at 4a449540f. The merged implementation is strengthened rather than a verbatim merge of this head.

@brandonpayton
brandonpayton deleted the fix/libxml2-resolver-zlib-include branch September 2, 2026 20:47
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