Skip to content

DIAGNOSTIC (do not merge): resolve ecosystem from source - #76

Closed
ryanmrichard wants to merge 1 commit into
masterfrom
diagnose_stdlib_abi
Closed

ryanmrichard wants to merge 1 commit into
masterfrom
diagnose_stdlib_abi

Conversation

@ryanmrichard

Copy link
Copy Markdown
Member

Diagnostic only — please do not merge. Opened to answer one question; will be closed once CI reports.

What this measures

test_cmake_build fails on all four legs because extra_pip_packages: nwchemex installs the published wheels before configure, so nwx_ecosystem_dependency takes its installed-wheel branch and the C++ build links prebuilt binaries produced by a different toolchain than the dev matrix uses. Verified by reading the published wheels' symbol tables:

leg wheel's C++ runtime runner's result
ubuntu-latest gcc-14 / clang-18 libstdc++, old COW std::string ABI libstdc++, new ABI link fails
macos-14 gcc-14 libc++ libstdc++ link/load fails
macos-14 clang-18 libc++ libc++ links, then all 4 tests segfault

The third row is unattributed. Setting NWX_ECOSYSTEM_FROM_SOURCE=ON skips the installed-wheel branch, so every leg compiles the ecosystem from git master with a single compiler and the ABI variable disappears.

  • Still segfaults → it is the pre-existing SCF#70 pybind11 issue.
  • Goes green → the segfault was itself an ABI artifact (likely Homebrew LLVM's libc++ vs. the SDK libc++ the wheels were built against), which would mean the standard library is not a single axis and planned per-stdlib wheel variants would not be sufficient.

Either way this run also measures whether from-source resolution is a viable interim unblock for #75.

Related

The Linux half is being fixed separately by moving the wheel build to manylinux_2_28 — manylinux2014's devtoolset-10 is built with _GLIBCXX_USE_DUAL_ABI 0 and its c++config.h discards any -D_GLIBCXX_USE_CXX11_ABI=1, so the new ABI is compiled out of that toolchain entirely.

🤖 Generated with Claude Code

Attributes the macos-14/clang-18 segfault in test_cmake_build.

The four legs currently fail because `extra_pip_packages: nwchemex`
installs the published wheels before configure, so
nwx_ecosystem_dependency takes its installed-wheel branch and the C++
build links prebuilt binaries built by a different toolchain than the
dev matrix uses:

  - ubuntu gcc-14/clang-18: wheels are manylinux2014 (old libstdc++
    COW std::string ABI), the runners default to the new one.
  - macos-14 gcc-14: wheels are libc++, Homebrew gcc is libstdc++.
  - macos-14 clang-18: libc++ on both sides, so it links -- then every
    test segfaults, and we do not know why.

Setting NWX_ECOSYSTEM_FROM_SOURCE=ON skips the installed-wheel branch
entirely, so every leg compiles the ecosystem from git master with one
compiler and the ABI variable disappears. That isolates the last case:
if macos-14/clang-18 still segfaults it is the pre-existing SCF#70
pybind11 issue; if it goes green the segfault was itself an ABI
artifact (likely Homebrew LLVM's libc++ against the SDK libc++ the
wheels were built with), which would mean the standard library is not
a single axis and the planned per-stdlib wheel variants would not be
sufficient.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ryanmrichard

Copy link
Copy Markdown
Member Author

Diagnostic complete — closing without merging.

Result: macos-14/clang-18 passed, so its segfault was an ABI artifact (AppleClang-built libc++ wheels mixed with Homebrew-clang-18 code), not the pre-existing SCF#70 pybind11 issue. That also means per-stdlib wheel variants would not have been sufficient: the axis is which libc++, not just libstdc++-vs-libc++.

The other three legs failed on the same underlying ABI bug, through a gap: NWX_ECOSYSTEM_FROM_SOURCE gates only nwx_ecosystem_dependency, while integratorxx.cmake, gauxc.cmake, gau2grid.cmake and libxc.cmake each carry their own ungated find_package(... PATHS NWX_VENV_SITE_PACKAGES) branch. IntegratorXX therefore still resolved from the installed wheels — the published nwchemex-scf wheel bundles lib/libintegratorxx.so exporting _ZN12IntegratorXX18radial_from_stringESs (old ABI) while SCF wants NSt7__cxx11. The hundreds of undefined references collapsed to exactly that one symbol.

Real fix remains moving the Linux wheel build to manylinux_2_28.

@ryanmrichard
ryanmrichard deleted the diagnose_stdlib_abi branch September 16, 2026 13:48
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