Skip to content

fix: Enable CGO in Makefile build target for SQLite support#18

Open
spideyz0r wants to merge 1 commit into
mainfrom
fix/enable-cgo-for-sqlite
Open

fix: Enable CGO in Makefile build target for SQLite support#18
spideyz0r wants to merge 1 commit into
mainfrom
fix/enable-cgo-for-sqlite

Conversation

@spideyz0r
Copy link
Copy Markdown
Owner

The go-sqlite3 library requires CGO to be enabled to work properly. Without CGO_ENABLED=1, the binary fails at runtime with: "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work"

This change enables CGO during the build process, allowing SQLite to function correctly when running 'fh --init' and other database operations.

Note: Users building from source will now need a C compiler (gcc, Xcode command-line tools, etc.) installed. Pre-built binaries are not affected as SQLite is statically linked at build time.

🤖 Generated with Claude Code

The go-sqlite3 library requires CGO to be enabled to work properly.
Without CGO_ENABLED=1, the binary fails at runtime with:
"Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work"

This change enables CGO during the build process, allowing SQLite
to function correctly when running 'fh --init' and other database
operations.

Note: Users building from source will now need a C compiler (gcc,
Xcode command-line tools, etc.) installed. Pre-built binaries are
not affected as SQLite is statically linked at build time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@spideyz0r spideyz0r requested a review from Copilot December 5, 2025 23:24
Repository owner deleted a comment from codecov-commenter Dec 5, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR partially addresses SQLite's CGO requirement by enabling CGO for the Makefile's build target. The change allows local development builds to work with the go-sqlite3 driver, which is used throughout the project for database operations (see pkg/storage/).

Key Changes:

  • Enable CGO during Makefile build process by setting CGO_ENABLED=1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants