Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/database/database.go:59:10: undefined: OpenSQLiteDatabase #947

Closed
lifepillar opened this issue Jun 29, 2024 · 4 comments · Fixed by #948
Closed

internal/database/database.go:59:10: undefined: OpenSQLiteDatabase #947

lifepillar opened this issue Jun 29, 2024 · 4 comments · Fixed by #948
Labels
type:bug Something isn't working

Comments

@lifepillar
Copy link
Contributor

Data

  • Shiori version: v1.7.0 branch
  • Database Engine: SQLite (the default).
  • Operating system: FreeBSD 14
  • CLI/Web interface/Web Extension: CLI

Describe the bug / actual behavior

Trying to build Shiori from source results in:

internal/database/database.go:59:10: undefined: OpenSQLiteDatabase

Expected behavior

The build should succeed.

To Reproduce

Steps to reproduce the behavior:

  1. git clone https://github.com/go-shiori/shiori.git
  2. git checkout v1.7.0
  3. go build
  4. See error

Notes

Likely not a bug; rather, I'm missing something in the build process.

@lifepillar lifepillar added the type:bug Something isn't working label Jun 29, 2024
@github-project-automation github-project-automation bot moved this to To do in Roadmap Jun 29, 2024
@lifepillar
Copy link
Contributor Author

The culprit is 02247b2. I've got around the error by reinstating OpenSQLiteDatabase() in internal/database/sqlite.go. This seems a FreeBSD-specific problem.

@fmartingr
Copy link
Member

fmartingr commented Jun 29, 2024

The culprit is 02247b2. I've got around the error by reinstating OpenSQLiteDatabase() in internal/database/sqlite.go. This seems a FreeBSD-specific problem.

OpenBSD builds were broken so we removed the unimportant CGO dependencies and isolated the SQLite library into it's own build under internal/database/sqlite_openbsd.go. Unsure what's the problem could be with freebsd, maybe just adding the build flag to the same file to use it under freebsd is enough?

https://github.com/go-shiori/shiori/blob/master/internal/database/sqlite_openbsd.go#L1-L2

If FreeBSD works with nonCGO we can add it into the noncgo build flags:

https://github.com/go-shiori/shiori/blob/master/internal/database/sqlite_noncgo.go#L1-L2

@lifepillar
Copy link
Contributor Author

If FreeBSD works with nonCGO we can add it into the noncgo build flags

I can confirm that this way Shiori builds.

@fmartingr
Copy link
Member

If FreeBSD works with nonCGO we can add it into the noncgo build flags

I can confirm that this way Shiori builds.

Would you be open to submit a PR with those changes?

lifepillar added a commit to lifepillar/shiori that referenced this issue Jun 30, 2024
Fix broken build on FreeBSD after commit 02247b2.
fmartingr pushed a commit that referenced this issue Jul 1, 2024
Fix broken build on FreeBSD after commit 02247b2.
@github-project-automation github-project-automation bot moved this from To do to Done in Roadmap Jul 1, 2024
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Aug 3, 2024
- Increment the go version required by the port to build
- Add a patch to fix the following error during the build target:

internal/database/database.go:59:10: undefined: OpenSQLiteDatabase

See also: go-shiori/shiori#947

Release changes:	https://github.com/go-shiori/shiori/releases/tag/v1.7.0
Reported by:	github-actions[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants