moxious / triage

testing triage actions for issues
0 stars 1 forks source link

Compiling Go source code on Debian 11 (WSL 2) produces compile errors - undefined: sqlite3.Error #362

Open tonypowa opened 2 weeks ago

tonypowa commented 2 weeks ago

What happened?


generate go files

go run ./pkg/build/wire/cmd/wire/main.go gen -tags "oss" ./pkg/server

wire: github.com/grafana/grafana/pkg/server: wrote /home/user/grafana/pkg/server/wire_gen.go

build go files

go run build.go -dev build

Version: 11.1.0, Linux Version: 11.1.0, Package Iteration: 1716404568pre

building binaries build

building grafana ./pkg/cmd/grafana

go build -ldflags -w -X main.version=11.1.0-pre -X main.commit=c706166a248 -X main.buildstamp=1716398727 -X main.buildBranch=main -o ./bin/grafana ./pkg/cmd/grafana

# github.com/grafana/grafana/pkg/services/sqlstore/migrator

pkg/services/sqlstore/migrator/migrator.go:216:43: undefined: sqlite3.ErrBusy

pkg/services/sqlstore/migrator/sqlite_dialect.go:135:24: undefined: sqlite3.Error

pkg/services/sqlstore/migrator/sqlite_dialect.go:146:24: undefined: sqlite3.Error

pkg/services/sqlstore/migrator/sqlite_dialect.go:154:41: undefined: sqlite3.ErrConstraintUnique

pkg/services/sqlstore/migrator/sqlite_dialect.go:154:98: undefined: sqlite3.ErrConstraintPrimaryKey

exit status 1

exit status 1

make[1]: ISSUE_TRIAGE.md README.md copy-issue.sh grafana-labels.txt grafana-triage-labels.txt [Makefile:170: build-go] Error 1

make[1]: Leaving directory '/home/user/grafana'

What did you expect to happen?

Compile and run Backend

Compiling and testing the frontend works fine!

Did this work before?

n/a

How do we reproduce it?


make run

Is the bug inside a dashboard panel?

No response

Environment (with versions)?

Grafana: main branch

OS: Debian 11 (WSL 2)

Browser: N/A

Go Version: go1.22.3 linux/amd64

Grafana platform?

None

Datasource(s)?

No response

tonypowa commented 2 weeks ago

This issue is a test copy of an issue in another repo. Original issue: https://github.com/grafana/grafana/issues/#88187

moxious commented 2 weeks ago

Hello @tonypowa, it seems like your issue is related to building the Grafana backend on a specific environment. This looks like a potential issue with the Backend platform project. Please make sure you have the latest dependencies installed and consider opening an issue in the Backend platform project if this persists, providing all the necessary details for replication.

moxious commented 2 weeks ago

Summary: User tonypowa reported a compilation failure for Grafana's main branch when attempting to compile Go source code on Debian 11 (WSL 2), encountering errors related to undefined references in the sqlite3 package. The issue is still open, with one comment made on it.

moxious commented 2 weeks ago

Elaboration:

Hello @tonypowa, thank you for reaching out with the issue you've encountered when trying to compile Grafana on Debian 11 under WSL 2.

It looks like you are running into an error related to the SQLite integration with Go. To help us get to the bottom of this and provide a possible fix, could you provide a bit more information?

Here's an additional step you may try which could help us isolate the problem:

These commands will clear the module download cache, force-update the go-sqlite3 package, and rebuild the application. If there's a version mismatch or a stale cache, this might resolve it.

We're here to help, and once you provide these details, we'll be better equipped to understand and address the issue.