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
install error on mac #23
Comments
Yes, we will. For now, rename mmap_linux.go to mmap_darwin.go and you should be good. I have the fix for this but it is not checked in yet. |
Actually the file name has changed mv mmf_darwin_linux.go mmf_darwin.go |
Renaming the file with a "_unix" suffix should allow for successful builds targeting both darwin and linux:
|
Renaming to mmf_unix.go will break the build on Windows. However, I think I fixed this awhile a go by adding "// +build linux darwin" to the .go file. |
According to the documentation (https://golang.org/pkg/go/build/#overview), using a conditional compilation suffix should take the following form: source_GOOS_GOARCH.go (e.g., source_windows_amd64.go). So using the build tags is appropriate in this case but the file suffix must not trigger an implicit conditional compilation. |
If you run "go tool dist list", you'll see the list of supported GOOS/GOARC combinations. "unix" is not on the list at all and therefore not a supported GOOS. So, a file name ending with "_unix.go" is ALWAYS compiled by the compiler regardless of the GOOS. This is why I MUST add "// +build linux darwin" to the top of my file. Alternatively, I could have to files with identical contents but one named mmf_darwin.go and the other named mmf_linux.go. I prefer the 1 file so I don't have to make similar changes in multiple files. |
Running
$ go get github.com/Azure/azure-storage-blob-go/2016-05-31/azblob
gives me this output
My environment:
Edit:
oh I see there are files for windows/linux but none for mac. For now, I'll comment out that code since looks like only used as example.
The text was updated successfully, but these errors were encountered: