kovetskiy/zabbixctl

Unable to build on Windows 7 64bit

FilBot3 opened this issue · 3 comments

I'm running Windows 7 64bit, with GO 1.7.3, and CentOS with GO 1.7.3, but I cannot build zabbixctl for Windows, only on the CentOS system. I did add MinGW to my path to expose the gcc compilers and other libraries, however, it seems there is something that isn't Windows compatible. First output is Windows without and with MinGW in my path. Second output is the CentOS output.

C:\Users\PD028300
λ go get github.com/kovetskiy/zabbixctl
# github.com/kovetskiy/spinner-go
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:161: undefined: syscall.SYS_IOCTL
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:163: undefined: syscall.TIOCGWINSZ
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:165: not enough arguments in call to syscall.Syscall
# github.com/simplereach/timeutils
exec: "gcc": executable file not found in %PATH%

C:\Users\PD028300
λ cat C:\cmder\bin\mingw_cmd.cmd
@echo off

set PATH=%PATH%;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;

C:\Users\PD028300
λ mingw_cmd.cmd

C:\Users\PD028300
λ go get github.com/kovetskiy/zabbixctl
# github.com/kovetskiy/spinner-go
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:161: undefined: syscall.SYS_IOCTL
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:163: undefined: syscall.TIOCGWINSZ
Documents\GitHub\GO\src\github.com\kovetskiy\spinner-go\spinner.go:165: not enough arguments in call to syscall.Syscall
# github.com/simplereach/timeutils
:0: sorry, unimplemented: 64-bit mode not compiled in
In file included from Documents\GitHub\GO\src\github.com\simplereach\timeutils\parse.go:3:
approxidate.h:15:7: warning: no newline at end of file

CentOS:

[pd028300@centos7-docker zabbixctl]$ GOOS=windows GOARCH=386 go build -o zabbixctl.exe main.go 
# github.com/kovetskiy/spinner-go
../spinner-go/spinner.go:161: undefined: syscall.SYS_IOCTL
../spinner-go/spinner.go:163: undefined: syscall.TIOCGWINSZ
../spinner-go/spinner.go:165: not enough arguments in call to syscall.Syscall

Oh, strange. I will fix spinner-go, but your gcc troubles on Windows it is not about zabbixctl, and I can't help you here because I don't have a machine with windows.

# github.com/simplereach/timeutils
exec: "gcc": executable file not found in %PATH%

But how I can guess, you just need to install C compiler (gcc) for Windows.

Yeah, I saw that, and appended MinGW with gcc to my path, and that's when the second error came up/

@predatorian3 This should be working now as part of #23.
There are some small issues that I will be fixing like '-h' not working, and adding more time formats.