Repository navigation
Make bolt-cppml build, run and package on Windows and Linux - #27
Conversation
- CMake: default BUILD_SHARED_LIBS to OFF on MSVC. The vendored llama.cpp turns it ON, which made bolt_lib a DLL without exports, so no import library was produced and every dependent target failed with LNK1181. - CMake: give the bolt and gui_main install rules a BUNDLE DESTINATION so configuring on macOS (where executables are app bundles) succeeds. - Fix MSVC compile errors: unistd.h in bolt_terminal_ai.cpp, missing <map> in demo_advanced_ai_features.cpp, and the winnt.h DELETE macro clashing with OperationType::DELETE in test_extended_e2e.cpp. - Workflows: stop requesting the Visual Studio 17 2022 generator, quote the vcpkg toolchain path in the MSBuild job, and replace the retired macos-13 and ubuntu-20.04 runners. - Remove the Deno and Xcode template workflows: the repository has no Deno code or Xcode project, so they could only fail. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
apt.llvm.org has no LLVM 17 repository for the current ubuntu-latest release, so the clang jobs failed at apt-get update. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
The MSYS2 step installs ninja but not mingw32-make, so configuring with the MinGW Makefiles generator failed before compiling anything. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
|
The workflow runs
Any PR that edits one of these workflows or source files will fail the same way. I have not changed the linter or reformatted the files, since that would either weaken the check or bury the fix in whitespace. Options, if you want this green:
Generated by Claude Code |
The test created a Q8_0 tensor with 100 elements, which is not a multiple of the Q8_0 block size (32). ggml asserts on that, so the AIModels suite and the full unit run aborted in Debug; Release builds compile the assertion out. Use 128 elements instead. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
COMPONENT only applies to the artifact kind it follows. Adding BUNDLE DESTINATION before it left RUNTIME in the Unspecified component, so app-only installs and the NSIS package would have omitted the executables on Windows and Linux. State the component for both kinds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
…g bracket findOpeningBracket started scanning one character before the closing bracket, so that bracket was never pushed and the first opening bracket popped an empty std::stack. That is undefined behaviour and aborts under libstdc++ assertions (clang Debug on current ubuntu-latest). Start the scan at the closing bracket itself. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
- GitRepository: redirect stderr to NUL on Windows; cmd.exe has no /dev/null, so every git command failed. - Debugger test: declare the callback's captured state before the debugger. Its destructor fires the callback again, which wrote to an already-destroyed std::string (heap corruption, 0xc0000374). - Logging tests: make log-file cleanup best-effort. Windows cannot delete a file that a sink or stream still has open. - File tree test: compare the selected path as a filesystem path, since the tree joins components with a backslash on Windows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
macOS has no <GL/gl.h>; the header lives at <OpenGL/gl.h>. With the configure step fixed, this was the next error in the macOS build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
The DEB now builds, installs and runs in the release dry run. The RPM step then failed in find-debuginfo because eu-strip (elfutils) is not on the runner. The binary is prebuilt, so disable the debuginfo subpackage. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
- CMake: fall back to the distribution ImGui package (Debian/Ubuntu libimgui-dev plus libstb), which ships headers and a library but no CMake config. Without it the GUI was silently left out of any Linux build that used system packages instead of vcpkg. - scripts/smoke_test.sh: start gui_main and the GUI demos under xvfb when there is no display and require them to stay up; previously they were skipped, so the GUI was never run anywhere. - E2E CI: ship gui_main in the Linux artifact and install xvfb and the Mesa software renderer so the integration job exercises it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
On Linux the programs were linked with an rpath that only suited an installed bin/ + lib/ layout, so a fresh build could not start: "./bolt: error while loading shared libraries: libbolt_lib.so.1". Add $ORIGIN and $ORIGIN/bin to the rpath so the programs find libbolt_lib.so and llama.cpp's libraries next to them, both in the build directory and in an unpacked tarball. Test programs live in <build>/test and get a matching rpath, so ./test/bolt_unit_tests works as the README says. The smoke test now checks that bolt starts with LD_LIBRARY_PATH unset, and, when BOLT_SMOKE_MODEL points at a GGUF file, that the model loads and generates text through DirectGGUFInference and the AI manager. The integration job downloads a 19 MB public model for this. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
Workflows: - release.yml: the Notify job read needs.prepare.outputs without listing prepare in needs, so the summary showed an empty version. It also said "All release artifacts have been uploaded" whatever happened; it now reports the publishing job's result. - e2e-ci.yml: the sanitizer job used a whole NAME=value string as an environment variable name. Drop that entry; the export in the script is what sets the variable. - cross-platform.yml: remove a step conditioned on matrix.compiler_version, which no matrix entry defines, and state shell: pwsh for the Windows test step. - Quote shell expansions and group redirects to the step summary. Code: - GitRepository::push and pull shared their argument-building code; move it to one helper. - test_logging.cpp: replace repeated cleanup, line-counting and content-checking blocks with helpers. README: trailing space and a code fence without a language. No linter is disabled or reconfigured by this change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71
Description
Several workflows were failing on
main(CMake on multiple platforms, Cross-Platform Build and Test, MSBuild, Deno, Xcode) and E2E CI was failing on pull requests. This PR fixes the build on Windows and Linux, then goes further: it fixes defects found by actually running the built programs (command line, GUI and a real model), and makes the release pipeline produce working packages. macOS is disabled in CI for now (see below).Type of Change
Changes Made
Build system
BUILD_SHARED_LIBStoOFFon MSVC. The vendored llama.cpp turned itON, makingbolt_liba DLL with no exports, so about 45 targets failed withLNK1181.-march=native(incmake/platforms/Linux.cmake) and llama.cpp'sGGML_NATIVEtied binaries to the build machine's CPU; CI artifacts died with "Illegal instruction" on another runner, and release packages would have done the same on user machines. New optionBOLT_NATIVE_OPTIMIZATIONS(defaultOFF) controls both; the default targets a fixed x86-64 baseline (AVX2).bin/+lib/layout, so a fresh build failed withlibbolt_lib.so.1: cannot open shared object fileunlessLD_LIBRARY_PATHwas set. The rpath now also covers the build directory and an unpacked tarball; test programs get a matching one, so./test/bolt_unit_testsworks as the README says.libimgui-dev,libstb-dev) when vcpkg's ImGui is not available, instead of being silently left out.boltandgui_mainget aBUNDLE DESTINATIONand stay in theappcomponent.Product code
bolt: the interactive loop spun forever at end of input; it now exits.initialize()ran twice; it is idempotent. Added--helpand--version.BandwidthTrackerandNetworkMetrics: two self-deadlocks (locking a non-recursive mutex already held). Recording sent or received bytes, or generating a report, hung.BracketMatcher::findOpeningBracketpopped an empty stack when matching from a closing bracket.GitRepositoryredirected stderr to/dev/null, which does not exist under Windowscmd.pushandpullnow share one helper for their arguments instead of two copies.demo_advanced_ai_featureslooped forever on end of input or non-numeric input.unistd.hinbolt_terminal_ai.cpp, a missing<map>include.Tests
boltinput loop.DELETEmacro clash on Windows.test_logging.cpp: repeated cleanup, line-counting and content-checking blocks moved into helpers.CI
scripts/smoke_test.sh, run by the Integration Tests job (which previously could not fail: its artifact lacked the shared libraries and every command ended in|| echo). It checks that:boltstarts withoutLD_LIBRARY_PATH, answers a scripted session, and exits at end of input;bolt_terminal_aiandbenchmark_toolruns without hanging or crashing;gui_main,demo_widget_framework,demo_lsp_ui_integration) start under a virtual display and stay up;Visual Studio 17 2022generator; build MinGW with Ninja and give itgit; use the distribution clang; version-agnostic runtime packages;lcovtolerates bogus gcov counts from system headers; replace the retiredubuntu-20.04runner.needs.prepare.outputswithout depending onprepare(empty version) and always claimed the artifacts were uploaded; the sanitizer job used a wholeNAME=valuestring as an environment variable name; a step conditioned on a matrix value nobody defines. Shell expansions in the three touched workflows are quoted.deno.ymlandobjective-c-xcode.yml: no Deno code and no Xcode project exist.Release pipeline (
release.yml, verified byworkflow_dispatchdry runs on this branch)Dependsfrom the libraries the binary links, and install the package and runboltfrom it.|| true). It builds now.macOS: temporarily disabled
cross-platform.yml,e2e-ci.ymlandrelease.yml, each with a note on how to re-enable it. The release job no longer waits on them and the release notes say macOS builds are unavailable.macos-13andmacos-14images, an<OpenGL/gl.h>include guard, build-tree rpaths, and a lighter Homebrew step. The macOS build compiled and linked with these, but no test run completed there.Testing
On commit
cbb03736:cmake --installto a prefix gives aboltthat starts with no environment set up.Reviewer Notes
Lint Code Baseis still red. No linter was disabled or reconfigured in this PR. The shell, Markdown, YAML and copy/paste checks now pass on the touched files. What remains:clang-formatandcpplintfail on all 21 touched C++ files. The repository has no.clang-formatorCPPLINT.cfg, so they compare existing code with LLVM formatting and the Google style guide (which also rejects<mutex>,<thread>and<chrono>and requires a copyright header). This needs a maintainer decision: adopt a style and reformat, or stop running these two linters.macos-15andmacos-15-intelas unknown runner labels, because theactionlintbundled withsuper-linter@v4predates them. They are only used by the disabled macOS jobs.?with ImGui's default font, and the initial window layout overlaps; neither is changed here.bolt, which is also an existing Debian/Ubuntu package (the Thunderbolt device manager).boltprogram answers with an echo of the input; that is how it is written, not something this PR changed. Model inference is reached throughbolt_terminal_aiand the AI demos, which pick up the first GGUF file in./models.🤖 Generated with Claude Code
https://claude.ai/code/session_011vmiZ7F3rQu7dith9sQw71