doc: note the Windows CRLF/BerkeleyDB build failure in CLAUDE.md - #3268
Open
PrestackI wants to merge 1 commit into
Open
doc: note the Windows CRLF/BerkeleyDB build failure in CLAUDE.md#3268PrestackI wants to merge 1 commit into
PrestackI wants to merge 1 commit into
Conversation
CLAUDE.md documents only the Linux-native build. On Windows that path fails in a way whose cause is not obvious: `src/bdb53/dist/configure` is a POSIX shell script, and `.gitattributes` marks it `text=auto`, so a clone with Git-for-Windows' default `core.autocrlf=true` checks it out with CRLF. `cmake -B build` still succeeds — BerkeleyDB is wired through `ExternalProject_Add` with a `CONFIGURE_COMMAND`, which runs at build time — so the failure surfaces from `cmake --build build` instead, which makes it easy to misattribute. Add a short Windows Contributors subsection pointing at the WSL-native clone as the fix, and scope the two existing Windows references: doc/build.md for the native flow, and doc/build-windows-wsl.md only for the win64 cross-compile, since that guide produces build_win64/*.exe rather than the build/ tree the Tests section uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLAUDE.mddocuments only the Linux-native build. On Windows that path fails in a way whose cause is not obvious, and nothing in the tracked docs warns about it.The failure
src/bdb53/dist/configureis a POSIX shell script..gitattributesmarks the tree* text=autowith noeol=lfoverride forsrc/bdb53, so a clone made with Git-for-Windows' defaultcore.autocrlf=truechecks that script out with CRLF. The bundled BerkeleyDB build then dies on it.Two details make it easy to misdiagnose, and the wording here is deliberate about both:
ExternalProject_Addwith aCONFIGURE_COMMAND(src/bdb53/CMakeLists.txt:67-70), and an ExternalProject's configure step runs at build time.cmake -B buildreturns 0;cmake --build buildis what fails. A contributor whose configure succeeded would otherwise conclude the note does not apply to them.leveldbandsecp256k1are plainadd_subdirectorytargets with no dependency onBerkeleyDB_Project, so under-jthey compile concurrently with the failure.The change
Adds a short
### Windows Contributorssubsection after the Linux-native build block, pointing at a WSL-native clone as the fix.It also scopes the two existing Windows references, which currently mislead:
doc/build.md("Linux Native") is named as the reference for the normal development flow.doc/build-windows-wsl.mdis scoped to the win64 case only. Its sole build command is./build_targets.sh TARGET=win64and it verifiesbuild_win64/src/gridcoinresearchd.exe— it produces nobuild/tree, so it does not serve thectest --test-dir buildloop thatCLAUDE.mddocuments directly below.doc/build-msys2.mdis deliberately not linked: it is a three-line deprecation stub that redirects to the WSL guide, and MSYS2 builds against a Windows-filesystem checkout, i.e. it reproduces the very failure being described.The
gridcoin-gui-wslskill is mentioned for Qt GUI iteration, qualified as GUI-only since it configures-DENABLE_TESTS=OFF.Scope
Markdown only — 17 added lines in one file, nothing removed. No source, CMake, test, workflow, or lint configuration is touched.
Not verified
The quoted error string
Syntax error: newline unexpectedwas not reproduced end-to-end. The CRLF cause is confirmed directly (od -con the checked-out file shows#!/bin/sh\r\n), but the exact message is adash/ashrendering and may differ under another shell. Happy to soften it to "a shell syntax error" if a maintainer prefers not to assert a specific string.If
src/bdb53/** eol=lfis ever added to.gitattributes, this subsection becomes obsolete and should be deleted rather than updated.