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

Can not build from Source on Windows(10) #5370

Closed
PocketSquirrl opened this issue Jun 16, 2016 · 4 comments
Closed

Can not build from Source on Windows(10) #5370

PocketSquirrl opened this issue Jun 16, 2016 · 4 comments

Comments

@PocketSquirrl
Copy link

PocketSquirrl commented Jun 16, 2016

I'm trying to build Grafana with Go 1.5 on Windows 10 as described in the documentation(http://docs.grafana.org/project/building_from_source/).
But when I try to build from the source file with the go run build.go build command i get this output:
Version: 3.1.0, Linux Version: 3.1.0, Package Iteration: 1466062835
rm -r bin
rm -r Godeps/_workspace/pkg
rm -r Godeps/_workspace/bin
rm -r dist
rm -r tmp
rm -r C:\Users\D062588\Documents\work\pkg\windows_amd64\github.com\grafana
rm -r ./bin/grafana-server.exe
rm -r ./bin/grafana-server.exe.md5
GOPATH=C:\Users\D062588\Documents\work\src\github.com\grafana\grafana\Godeps\_workspace;C:\Users\D062588\Documents\work
go version
go version go1.5 windows/amd64
go build -ldflags -w -X main.version=3.1.0 -X main.commit=v3.0.4+264-g23e0240 -X main.buildstamp=1466060136 -o ./bin/grafana-server.exe ./pkg/cmd/grafana-server
\# github.com/grafana/grafana/pkg/log
pkg\log\log.go:182: undefined: NewSyslog
exit status 2
exit status 1

The go build . doesn't work either. There it just says can't load package: package github.com/grafana/grafana: no buildable Go source files in C:\Users\D062588\Documents\work\src\github.com\grafana\grafana

Edit: I did everything the same way on linux and there it works fine....
Don't know if my windows configuration is wrong or if it's not possible to build on windows 10.

@PocketSquirrl PocketSquirrl changed the title [Question] Can not build from Source Can not build from Source on Windows(10) Jun 16, 2016
@torkelo torkelo closed this as completed Jun 16, 2016
@torkelo
Copy link
Member

torkelo commented Jun 16, 2016

thanks for reporting this, should be fixed in latest master

@torkelo torkelo reopened this Jun 16, 2016
@torkelo torkelo closed this as completed Jun 16, 2016
@smalik03
Copy link
Contributor

@torkelo I was getting the same error on Windows 7, after updating to the latest master branch I am getting these errors -

Version: 3.1.0, Linux Version: 3.1.0, Package Iteration: 1466083734
rm -r bin
rm -r Godeps/_workspace/pkg
rm -r Godeps/_workspace/bin
rm -r dist
rm -r tmp
rm -r C:\Users\user1\GoProjects\pkg\windows_amd64\github.com\grafana
rm -r ./bin/grafana-server.exe
rm -r ./bin/grafana-server.exe.md5
GOPATH=C:\Users\user1\GoProjects\src\github.com\grafana\grafana\Godeps\_workspace;C:\User``s\user1\GoProjects
go version
go version go1.5.3 windows/amd64
go build -ldflags -w -X main.version=3.1.0 -X main.commit=v3.0.4+276-gb039a81-dirty -X``main.buildstamp=1466080579 -o ./bin/grafana-server.exe ./pkg/cmd/grafana-server
# github.com/grafana/grafana/pkg/log
pkg\log\log.go:183: sysLogHandler.Format undefined (type *SysLogHandler has no field or method``Format)
pkg\log\log.go:184: sysLogHandler.Network undefined (type *SysLogHandler has no field or``method Network)
pkg\log\log.go:185: sysLogHandler.Address undefined (type *SysLogHandler has no field or``method Address)
pkg\log\log.go:186: sysLogHandler.Facility undefined (type *SysLogHandler has no field or method``Facility)
pkg\log\log.go:187: sysLogHandler.Tag undefined (type *SysLogHandler has no field or method``Tag)
pkg\log\log.go:194: cannot use sysLogHandler (type *SysLogHandler) as type DisposableHandler in``append:
*SysLogHandler does not implement DisposableHandler (missing Close method)
exit status 2
exit status 1

@kmohide
Copy link

kmohide commented May 21, 2018

@torkelo I am getting this issue when building the same repository on windows 10, if you can help with how to install it from source only for windows, thanks
Version: 5.2.0-pre1, Linux Version: 5.2.0, Package Iteration: 1526907072pre1
rm -r dist
rm -r tmp
rm -r E:\Machine Scope\Grafana\pkg\windows_amd64\github.com\grafana
rm -r ./bin/grafana-server.exe
rm -r ./bin/grafana-server.exe.md5
go version
go version go1.10.2 windows/amd64
go build -ldflags -w -X main.version=5.2.0-pre1 -X main.commit=cebae40 -X main.buildstamp=1526894002 -X main.enterprise=false -o ./bin/grafana-server.exe ./pkg/cmd/grafana-server

github.com/grafana/grafana/vendor/github.com/mattn/go-sqlite3

exec: "gcc": executable file not found in %PATH%
exit status 2
exit status 1

@torkelo
Copy link
Member

torkelo commented May 22, 2018

you need gcc compiler, https://sourceforge.net/projects/mingw-w64/

@torkelo torkelo reopened this May 22, 2018
@torkelo torkelo closed this as completed May 22, 2018
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

No branches or pull requests

4 participants