Skip to content

feat: add source-built MySQL client packages - #185

Merged
Sunrisepeak merged 9 commits into
mcpplibs:mainfrom
wellwei:codex/add-mysql-source-packages
Aug 8, 2026
Merged

feat: add source-built MySQL client packages#185
Sunrisepeak merged 9 commits into
mcpplibs:mainfrom
wellwei:codex/add-mysql-source-packages

Conversation

@wellwei

@wellwei wellwei commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

wellwei and others added 9 commits August 8, 2026 18:11
The vendored libmysqlclient staging repo now defines HAVE_SYS_RESOURCE_H
(plus the other POSIX macros upstream configure.cmake pairs with them) and
carries Windows support sources; tag 8.4.6 was force-moved to the repaired
commit, so the linux/macosx archives changed. mcpp-index still declares only
linux+macosx for this package.
Linux toolchain glibc >= 2.38 declares strlcat/strlcpy; vendored config now
defines HAVE_STRLCAT/HAVE_STRLCPY there so crypt_genhash_impl.cc uses libc
instead of its static fallback. Tag 8.4.6 updated again.
The connector install hook fails with only an empty E_INTERNAL on macOS CI
with no build log. Add stdout diagnostics (pcall wrapper, step values, run()
error dump) to locate the failing step. Temporary diagnostic commit.
xlings swallows install-hook stdout/log.error, so the previous stdout
diagnostics never reached the Actions log. Write every step (including a
descriptor-load marker) to $HOME/.mcpp/registry/data/mcpp_mysql_connector_cpp_build.log,
which validate.yml's 'find ... -name mcpp_*_build.log' dump tail-prints.
check_mirror_urls/check_package_name execute the descriptor with only import
stubbed; top-level path.join crashed lint. Make diag lazy and a no-op unless
the xlings runtime's path global is present.
Root cause (from CI diagnostics): pkginfo.install_dir('compat:openssl')
returns nil when openssl was installed into the shared registry cache by the
sibling libmysqlclient member instead of this member's local xpkgs, so the
install hook bailed with only an empty E_INTERNAL.

- declare compat:libmysqlclient/compat:openssl as xpm deps so the resolver
  records them for this package
- add find_dep_install_dir() fallback scanning the known xpkgs roots
  (member-local + $MCPP_HOME/registry/data/xpkgs)
- write the hook trace + failure reason to
  $HOME/.mcpp/registry/data/mcpp_mysql_connector_cpp_build.log, which the
  validate.yml find-dump tail-prints (log.error/stdout are swallowed)
- macOS: sanitize PATH to /usr/bin:/bin:/usr/sbin:/sbin so a GNU libtool on
  PATH (conda/homebrew) cannot shadow Apple's libtool in the CMake merge
CI reached CMake configure for the first time and failed with exit 127:
resolve_tool fell back to bare 'cmake' because the xim cmake macOS payload is
CMake.app/Contents/bin/cmake, not bin/cmake, and the previous fix replaced
PATH entirely so the fallback had nothing to resolve. Handle the .app layout
for an absolute path and prepend /usr/bin:/bin:/usr/sbin:/sbin to the existing
PATH (system libtool wins, tools stay reachable).
A dev-machine PATH containing spaces (e.g. 'Library/Application Support/...')
split the env command line and failed CMake configure with exit 127. Wrap the
prepended PATH value in single quotes (sh_quote).
@Sunrisepeak
Sunrisepeak merged commit 798a524 into mcpplibs:main Aug 8, 2026
10 checks passed
Sunrisepeak added a commit that referenced this pull request Sep 11, 2026
* feat(compat.vulkan): 1.4.357.3 ships the Vulkan loader on Windows

A Windows program that links `vulkan-1.lib` needs `vulkan-1.dll` at process
start, and that DLL is not part of Windows. It arrives with a GPU driver, with
LunarG's Vulkan Runtime redistributable, or beside an application. A machine
without a driver has none, and the program dies before `main` with 0xC0000135
(STATUS_DLL_NOT_FOUND). Measured on GitHub's `windows-2022` image (#387 probe,
run 34569282837): `vulkan`, `eui-neo-vulkan` and `vulkan-hpp-module` all fail
that way, while images that happen to carry a driver pass.

WHAT CHANGES

  compat.vulkan 1.4.357.3   windows artifact adds bin/vulkan-1.dll and
                            LICENSE.txt; mcpp.windows.runtime gains
                            library_dirs = { "bin" }
  khronos.vulkan-hpp 1.4.357.1   same headers, pin -> compat.vulkan 1.4.357.3
  compat.eui-neo 0.5.9.1    upstream 0.5.9 unchanged, `vulkan` feature pin
                            -> compat.vulkan 1.4.357.3
  members                   vulkan 1.4.357.3, vulkan-hpp-module 1.4.357.1,
                            eui-neo-vulkan 0.5.9.1
  tests/examples/vulkan     on Windows, asserts the mapped vulkan-1.dll lives
                            in the executable's own directory

THE MECHANISM ALREADY EXISTS AND IS NOT NEW HERE. mcpp copies every *.dll under
a dependency's `runtime.library_dirs` beside the executable it builds (mcpp #185,
v0.0.73); `compat.openblas` has shipped `bin/libopenblas.dll` this way on
Windows CI since mcpp-index #55. Two properties this change leans on were
measured locally with mcpp 2026.9.11.2 rather than assumed:

  * transitive -- app -> mid -> dep(bin/vulkan-1.dll): the DLL lands beside
    `app`. `vulkan-hpp-module` and `eui-neo-vulkan` reach compat.vulkan only
    transitively.
  * test binaries -- `mcpp test` places it beside the test executable too.

`mcpp pack` needs nothing further: its PE closure always searches the
executable's own directory ("whatever the build staged beside it ... is by
definition part of what it runs with"), and `vulkan-1.dll` is not in its
system-DLL allow-list, so the deployed copy is what a packed program carries.

THE ARTIFACT (xlings-res/vulkan-import 1.4.357.3, sha256 8118f1bd...12f5)

  lib/vulkan-1.lib    byte-identical to 1.4.357.1's
  vulkan-1.def        upstream `loader/vulkan-1.def`, tag vulkan-sdk-1.4.357.0
  bin/vulkan-1.dll    built from vulkan-sdk-1.4.357.0 by
                      xlings-res/vulkan-loader's windows workflow, which loads
                      the DLL and resolves vkEnumerateInstanceVersion,
                      vkCreateInstance and vkGetInstanceProcAddr before
                      publishing (run 34608619850)
  LICENSE.txt         Vulkan-Loader's Apache-2.0 -- a redistributed binary
                      carries its license
  README.md           how each file was produced

Packed deterministically (sorted, fixed mtime, numeric owner, gzip -n); the
sha was computed twice, read back from GitHub, and the gitcode mirror
(mcpp-res/vulkan-import 1.4.357.3) is byte-identical.

COMPATIBILITY, MEASURED. The DLL exports exactly the 265 names in the .def --
no additions, no omissions -- so every import `vulkan-1.lib` can produce
resolves, and no consumer can hit "entry point not found". The loader version
the earlier xim payload carried (1.4.313) exports the same 265; the build is at
1.4.357 anyway so the loader matches the headers it is consumed with.

On a machine that ALREADY has a GPU driver nothing is lost: the copy beside
the executable is found first (the application directory precedes System32),
and the loader still reads HKLM\SOFTWARE\Khronos\Vulkan\Drivers, so the driver
the machine has is the ICD it uses. The ICD is deliberately not supplied -- a
software fallback would hide a missing driver behind a slow device.

WHY NEW VERSIONS INSTEAD OF MOVING PINS. An installed copy records the pins it
resolved with. Moving a pin inside a published version does not reach a warm
store, which is not hypothetical here: with #391's first approach, a warm CI
store kept `compat.vulkan@1.4.357.0`, never re-evaluated its closure, and the
loader never arrived. That is the same rule as compat.vulkan 1.4.357.1.
Versions before 1.4.357.3 have no bin/; mcpp skips a declared runtime
directory that does not exist, so `library_dirs` is inert for them.

WHY THE TEST ASSERTION IS A REAL CHECK. On Windows the test now requires the
mapped vulkan-1.dll to sit in the executable's directory. With an older
compat.vulkan that fails on a machine with a driver (the loader comes from
System32) and never runs on one without (the process dies first). The
`windows-2022` leg of this PR has no system loader at all, so it can only pass
if the deployment works. This is also why #391 -- which put the DLL in
System32 on the runner -- is superseded rather than merged: it would make that
leg pass whether or not the package works.

Co-authored-by: sunrisepeak <x.d2learn.org@gmail.com>

* fix(eui-neo): find upstream's directory under a re-released version; vulkan-hpp moves to a follow-up

TWO THINGS LOCAL VERIFICATION FOUND in the first push of this branch.

1. compat.eui-neo 0.5.9.1 could not install. The install hook looks for the
   unpacked archive by name, `EUI-NEO-<version>`, and took the version
   verbatim -- so it looked for `EUI-NEO-0.5.9.1/` in an archive that unpacks
   to `EUI-NEO-0.5.9/`:

       eui-neo: no CMakeLists.txt under .../compat-x-eui-neo/0.5.9.1/eui-neo-0.5.9.1
       after unpacking; the archive layout is neither wrapped nor flat

   A fourth version component is this index re-releasing the same upstream tag,
   so the lookup now drops it. Three-component versions are unchanged; checked
   directly: 0.5.9 -> 0.5.9, 0.5.9.1 -> 0.5.9, 0.5.10 -> 0.5.10,
   1.2.3.45 -> 1.2.3, 0.5.9-rc1 -> 0.5.9-rc1. The `layer` directory keeps the
   package's own version; the sources are `*/` globs, so its name never
   mattered.

   After the fix, locally with mcpp 2026.9.11.2:
       compat.eui-neo[vulkan]: ok (backend=vulkan, loader api 1.4.357)
   i.e. eui-neo 0.5.9.1 resolved compat.vulkan 1.4.357.3 through the feature.

   This is the same class of bug as openxlings/xim-pkgindex#821 fixed in
   vulkan-loader: a hook deriving a path from the version works exactly until a
   second version shares an archive.

2. khronos.vulkan-hpp 1.4.357.1 cannot be verified in the same change that
   introduces compat.vulkan 1.4.357.3. `vulkan-hpp-module` redirects only the
   `khronos` namespace to this checkout, so `compat` comes from the PUBLISHED
   index, which does not have 1.4.357.3 until this merges:

       xlings install_packages failed (exit 1) for 'compat.vulkan@1.4.357.3'
       with 1 index repo configured [mcpplibs -> https://github.com/mcpplibs/mcpp-index.git]

   Redirecting `compat` as well was tried and is still refused -- mcpp reports
   "≥2 project-level index repos is a known xlings resolution gap (mcpp #238;
   root cause openxlings/xlings#374)" even though #238 is closed. So the
   khronos.vulkan-hpp bump and its member pin are reverted here and follow
   once this is merged and the index republished -- the same order
   openxlings/xim-pkgindex#818 and mcpp-index#391 needed.

   Consequence for this PR's CI, stated in advance: `vulkan-hpp-module` is
   still selected (its manifest names vulkan) and still resolves
   compat.vulkan 1.4.357.0, so on the windows leg it fails exactly as it does
   on main today. `vulkan` and `eui-neo-vulkan` are the members this change is
   judged by.

Co-authored-by: sunrisepeak <x.d2learn.org@gmail.com>

---------

Co-authored-by: sunrisepeak <x.d2learn.org@gmail.com>
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.

2 participants