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

Doesn't work with Mac OSX #101

Closed
telenieko opened this Issue Feb 12, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@telenieko

telenieko commented Feb 12, 2018

Documentation does not state which platforms are supported for development, so one would guess any platform supported by golang is good but...

Following the getting started from Mac OS, when doing the go run main.go ...

INFO[0000] ../../github.com/mweagle/Sparta/sparta_main_awsbinary.go:17:2: cannot find package "github.com/zcalusic/sysinfo" in any of:

INFO[0000] 	/Users/marc/.gvm/gos/go1.9/src/github.com/zcalusic/sysinfo (from $GOROOT)
INFO[0000] 	/Users/marc/go/src/github.com/zcalusic/sysinfo (from $GOPATH)
INFO[0000] Invoking rollback functions

As far as I understand zcalusic/sysinfo is Linux only.

go version go1.9 darwin/amd64
GOARCH="amd64"
GOBIN="/Users/marc/go/bin"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lc/80799yss6klb3_ft_szyfgyr0000gn/T/go-build360770781=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"

@mweagle

This comment has been minimized.

Owner

mweagle commented Feb 13, 2018

Hi @telenieko - fair assumption & I do develop on OSX. I suspect the build tags may be interfering with go gets ability to fetch the package. Will see if there's a workaround. In the meantime, if you execute:

go get github.com/zcalusic/sysinfo

directly are you able to build a Sparta app?

@mweagle

This comment has been minimized.

Owner

mweagle commented Feb 13, 2018

Added a precondition check - will be available in 1.0.2:

...

ERRO[0000] Failed to validate preconditions: Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms
exit status 1
@telenieko

This comment has been minimized.

telenieko commented Feb 13, 2018

@mweagle, yes the workaround works:

go get github.com/zcalusic/sysinfo
# github.com/zcalusic/sysinfo
../../github.com/zcalusic/sysinfo/kernel.go:24:12: undefined: syscall.Utsname
../../github.com/zcalusic/sysinfo/kernel.go:25:12: undefined: syscall.Uname
@mweagle

This comment has been minimized.

Owner

mweagle commented Feb 20, 2018

Updated error text:

INFO[0000] main.go:7:2: cannot find package "github.com/zcalusic/sysinfo" in any of:
INFO[0000] 	/Users/mweagle/Documents/go192/src/github.com/zcalusic/sysinfo (from $GOROOT)
INFO[0000] 	/Users/mweagle/Documents/gopath/src/github.com/zcalusic/sysinfo (from $GOPATH)
ERRO[0000] The `github.com/zcalusic/sysinfo` package is not installed  gopath=/Users/mweagle/Documents/gopath os=darwin sysinfoMarkerPath=/Users/mweagle/Documents/gopath/src/github.com/zcalusic/sysinfo/sysinfo.go

...

ERRO[0000] Failed to validate preconditions: Please run `go get -u -v github.com/zcalusic/sysinfo` to install this Linux-only package. This package is used when cross-compiling your AWS Lambda binary and cannot be reliably imported across platforms. When you `go get` the package, you may see errors as in `undefined: syscall.Utsname`. These are expected and can be ignored
@mweagle

This comment has been minimized.

Owner

mweagle commented Mar 25, 2018

Released with 1.1.0. Closing.

@mweagle mweagle closed this Mar 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment