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

Doesn't work with Mac OSX #101

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

Doesn't work with Mac OSX #101

telenieko opened this issue Feb 12, 2018 · 5 comments

Comments

@telenieko
Copy link

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
Copy link
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
Copy link
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
Copy link
Author

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
Copy link
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
Copy link
Owner

mweagle commented Mar 25, 2018

Released with 1.1.0. Closing.

@mweagle mweagle closed this as completed Mar 25, 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

2 participants