Every local build regenerated grammar.autogen.cc/.h and lexer.autogen.cc
and copied them back into the source tree, churning git whenever the
host's bison/flex emitted cosmetically different output than whatever
produced the committed copy. The existing normalization only tokenized
paths and header guards; it could not help when two generators that even
REPORT the same version (3.8.2) differ in emitted code (the committed
grammar had a distro-patched bison's "int yynerrs YY_ATTRIBUTE_UNUSED;"
that vanilla 3.8.2 downgrades on every rebuild).
Two-layer fix:
- Version pin: the committed generated files record the generator that
produced them ("made by GNU Bison X.Y.Z", YY_FLEX_*_VERSION). A host
with an OLDER generator no longer regenerates at all -- it builds from
the committed copy via the existing pre-generated path. Hosts at/above
the pin still regenerate, so CI keeps validating grammar.y/lexer.l
against a real toolchain.
- Input-hash gate: the post-build copy-back stamps the committed file
with the sha256 of its INPUT (grammar.y / lexer.l) and is skipped
entirely while that hash is unchanged. Generator differences alone can
no longer touch the committed files; editing the .y/.l still updates
them exactly as before.
Also: the copy-back now skips writing byte-identical content, so it no
longer bumps mtimes and cascades pointless relinks on every build.
The three committed autogen files are re-stamped in this commit (one-time
churn) as the new pinned baseline: bison 3.8.2 / flex 2.6.4, matching
every CI image.
Claude-Session: https://claude.ai/code/session_01PCUi8QKaFxeTyLXMeVkqn4
Co-authored-by: Claude <noreply@anthropic.com>
The committed *.autogen.* files embedded the generating build
directory's name in #line markers (build/ vs build-rel/), so building
from different build trees churned them. NORMALIZE/DENORMALIZE now
tokenize the build root alongside $REPO_ROOT$; regenerated copies are
byte-identical across build directories.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add cross-platform VSCode config, agent guide, and doc overhaul
CMake / build:
- Add CMakePresets.json: platform-aware configure presets for Linux, macOS,
and Windows (MSYS2/MinGW64); generator and env are now preset-driven
- Fix cmake/util.cmake NORMALIZE: also replace Bison-generated header guard
(mangled absolute build path → stable YY_YY_GRAMMAR_AUTOGEN_H_INCLUDED)
- Move driver-testsuite and driver-autotest run targets to root CMakeLists.txt;
rename driver-fulltest → driver-autotest
- Update grammar.autogen.h with stable platform-independent header guard
- Fix cmake/FindMySQL.cmake: MSYS2/MinGW64 static linking, mariadb_config
discovery, POSIX-to-native path conversion, --libs_sys for Windows deps
- Add cmake/util.cmake: NORMALIZE/DENORMALIZE for grammar.autogen paths
- Fix src/CMakeLists.txt: use find_program(bash) for .sh build script
- Update grammar.autogen.cc: replace absolute paths with $REPO_ROOT$ tokens
VSCode (.vscode/):
- settings.json: remove hardcoded cmake.generator/cmake.environment (now in
presets); fix VERBOSE=1 → --verbose; keep MSYS2 terminal profile for Windows
- launch.json: replace hardcoded /mnt/e paths and pipeTransport WSL configs
with platform-specific configs using windows/osx sections; two configs:
"driver - testsuite" (interactive) and "driver - autotest" (-ftest)
- tasks.json: cmake build task with platform-correct parallel jobs (nproc /
sysctl / NUMBER_OF_PROCESSORS); driver-testsuite and driver-autotest run tasks
- .gitignore: ignore auto-generated .vscode/c_cpp_properties.json
Windows development:
- Add open-editor-msys2.bat: auto-detects MSYS2, sets MSYS2_ROOT, launches
VS Code or Antigravity IDE inside MSYS2 environment
- Add open-editor-wsl.bat: reads WSL distro from UNC path, launches editor
with --remote wsl+<distro>
Agent guide (AGENTS.md + CLAUDE.md):
- Add AGENTS.md: architecture, package API, memory management, CMake
constraints, CI matrix, Windows/WSL environment requirements
- CLAUDE.md: import AGENTS.md via @-directive
README overhaul (EN + CN):
- Add three-layer architecture diagram and expanded LPC/Driver/Mudlib sections
- Per-platform build guides with WSL setup flow
- Sync README_CN.md with Chinese translations of all new sections
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix tasks.json: use nproc, add clean rebuild, fix fulltest target
- Replace %NUMBER_OF_PROCESSORS% with $(nproc) — tasks run in MSYS2 bash
via the automation profile so the Windows cmd variable never expanded
- Add 'cmake: clean rebuild driver' task using --clean-first flag
- Rename driver-autotest → driver-fulltest to match the CMake target name
- Drop redundant windows/osx command overrides (bash works on all platforms)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Rename VS Code tasks and document them in README
- Rename tasks to driver: build / clean rebuild / testsuite / autotest
- Add VS Code build section to README with task table and kit selection tip
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* add static linking support for alpine linux
* alpine linux static linking document
* libexecinfo and libdl for backtrace
* fixes clang build with new version of github action build images
* fixes clang build with new version of github action build images
Compiling in centos (AWS) presents this error when trying to find jemalloc
```
CMake Error at /usr/local/lib64/python3.6/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find jemalloc (missing: JEMALLOC_LIBRARY) (found version
"5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756")
```
Making this change allows it to compile.
* Move settings from common.cmake into main cmake files
* Fix#478 and #461
* Update how VERSION is displayed
* Set PUBLIC deps for packages
* Update FindMySQL.cmake