Skip to content

ci(windows): build VS2010 solution retargeted to v143#17

Merged
gburd merged 3 commits into
masterfrom
fix/windows-build
Jun 16, 2026
Merged

ci(windows): build VS2010 solution retargeted to v143#17
gburd merged 3 commits into
masterfrom
fix/windows-build

Conversation

@gburd

@gburd gburd commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes the Windows CI build. The legacy Berkeley_DB.sln uses VS2008 .vcproj files MSBuild 2022 can't load (MSB4025). Switch to Berkeley_DB_vs2010.sln (.vcxproj), build only the db library project, and retarget to the runner's toolset (v143) and Windows SDK. Kept continue-on-error until confirmed green.

gburd added 3 commits June 16, 2026 13:52
The legacy Berkeley_DB.sln references VS2008 .vcproj files that MSBuild can no
longer load (MSB4025: root element missing), and devenv isn't on the runner.
Switch to Berkeley_DB_vs2010.sln (.vcxproj), build just the `db` library
target, and retarget PlatformToolset=v143 + WindowsTargetPlatformVersion=10.0.
…locked_val

- The Windows/WinCE builds use checked-in pre-generated db.h; the SSI work
  updated db.in/api_flags.in but not these copies, so MSVC failed on
  DB_TXN_SNAPSHOT_SAFE/TXN_SNAPSHOT_SAFE/DB_SNAPSHOT_CONFLICT. Regenerated via
  dist/s_windows.
- mut_win32.c referenced an undefined cast type 'interlocked_val' in the
  shared-latch path (pre-existing); define it as 'long volatile *' (the type
  the Interlocked* intrinsics expect).
atomic_read() is not an l-value on the Win32 mutex backend, so
&atomic_read(&mutexp->sharecount) failed with C2102. Pass the address of the
underlying storage (&mutexp->sharecount.value) to InterlockedExchange/Decrement.
@gburd

gburd commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

Incremental Windows fixes landed here get the build from can't load the project all the way to compiling the whole tree. Fixed: legacy .vcproj.vcxproj solution, toolset retarget to v143, regenerated Windows db.h for the SSI symbols (dist/s_windows), defined the missing interlocked_val cast, and fixed the &atomic_read l-value error.

Remaining (separate modernization task): on the newest MSVC (VS18 / 14.44) the build fails with ~416 errors inside the STL <atomic> header — BDB's own atomic_init/atomic_read macros (dbinc/atomic.h) collide with C++ std::atomic_init once the modern SDK transitively includes <atomic>. Fixing this means renaming BDB's atomic macros or forcing C compilation / blocking the C++ atomic include. Tracked as a follow-up; the Windows job stays continue-on-error so it doesn't gate PRs. Merging the incremental improvements.

@gburd
gburd merged commit ae79a12 into master Jun 16, 2026
36 of 39 checks passed
@gburd
gburd deleted the fix/windows-build branch June 16, 2026 18:14
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