-
Notifications
You must be signed in to change notification settings - Fork 289
Description
Fix: Windows tests fail with exit code 0xc0000135 (DLL not found)
Summary
Many tests fail on Windows with exit code 0xc0000135, which means the
process could not start because a required DLL was not found on PATH.
The affected tests span multiple test suites:
nc_test4(e.g.tst_xplatform,tst_virtual_datasets)examples/C(e.g.simple_xy_wr,pres_temp_4D_wr)unit_test(e.g.test_ncuri)nczarr_test(e.g.test_unlim_vars,test_put_vars_two_unlim_dim)
Root Cause
The CI ctest invocation only prepended ~/tmp/bin to PATH:
PATH=~/tmp/bin:$PATH ctest . -j 4 -E 'bom' --output-on-failure~/tmp/bin is the install prefix for netcdf.dll. However, two
additional directories are required:
-
${CONDA_PREFIX}/Library/bin— contains HDF5 DLLs
(hdf5.dll,hdf5_hl.dll, etc.) installed by conda. Without
these, any executable that links against HDF5 fails immediately
with0xc0000135. -
build/liblib/Release— the MSVC multi-config build layout
placesnetcdf.dllhere. If the install step did not copy it to
~/tmp/bin(or if~/tmp/binis not on the Windows DLL search
path for some reason), this fallback ensures the DLL is found.
Fix
Add both directories to PATH for the ctest invocation and the
verbose re-run step:
PATH=~/tmp/bin:${CONDA_PREFIX}/Library/bin:$(pwd)/liblib/Release:$PATH \
ctest . -j 4 -E 'bom' --output-on-failureFiles changed
.github/workflows/main-cmake.yml— updatedPATHin both the
"Run ctest" and "Verbose Output if CTest Failure" steps.