Hello!
I am trying to build grafana from source with golang version 1.20.1 in Windows 10. Unfortunately i get the following error via Cygwin:
$ go run build.go build
Version: 10.1.0, Linux Version: 10.1.0, Package Iteration: 1693484960pre
building binaries build
building grafana ./pkg/cmd/grafana
rm -r ./bin/windows-amd64/grafana.exe
rm -r ./bin/windows-amd64/grafana.exe.md5
go build -ldflags -w -X main.version=10.1.0-pre -X main.commit=unknown-dev -X ma
in.buildstamp=1693484962 -X main.buildBranch=main -buildmode=exe -o ./bin/window
s-amd64/grafana.exe ./pkg/cmd/grafana
# github.com/grafana/grafana/pkg/cmd/grafana-server/commands
pkg\cmd\grafana-server\commands\cli.go:228:19: undefined: server.Initialize
# github.com/grafana/grafana/pkg/cmd/grafana-cli/commands
pkg\cmd\grafana-cli\commands\commands.go:53:24: undefined: server.InitializeForC
LI
exit status 1
exit status 1
I have recently found a post regarding the above problem
and thus following the above steps regarding gen command
gen -tags oss ./pkg/server ./pkg/cmd/grafana-cli/runner
i get the following Cygwin output
$ gen -tags oss ./pkg/server ./pkg/cmd/grafana-cli/runner
-bash: gen: command not found
and regarding make gen-go
command i get the following Cygwin output
$ make gen-go
make: *** No rule to make target `gen-go’. Stop.
For your own convenience in my GOPATH/bin, i have got the following two files
Any idea that could help me?
Regards
asimkon
2
Hello!
I have finally managed to build it for Windows 64-bit via the following command
and get the following result
Now i am trying to build it for Win 32-bit via GOARCH=386 and unfortunately i get the following error via Cygwin
searching for -lmingwex
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-
w64-mingw32/bin/ld.exe: cannot find -lmingwex
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-
w64-mingw32/bin/ld.exe: skipping incompatible C:/mingw-w64/mingw64/bin/../lib/gc
c/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a when
searching for -lmingw32
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-
w64-mingw32/bin/ld.exe: skipping incompatible C:/mingw-w64/mingw64/bin/../lib/gc
c/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib\libmingw32.a when
searching for -lmingw32
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-
w64-mingw32/bin/ld.exe: skipping incompatible C:/mingw-w64/mingw64/bin/../lib/gc
c/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a when
searching for -lmingw32
C:/mingw-w64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-
w64-mingw32/bin/ld.exe: cannot find -lmingw32
collect2.exe: error: ld returned 1 exit status
exit status 1
exit status 1
For your own convenience, i also attach the following
Any idea that could assist me?
Regards