{"action":"created","issue":{"url":"https://api.github.com/repos/minio/minio/issues/1033","labels_url":"https://api.github.com/repos/minio/minio/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/minio/minio/issues/1033/comments","events_url":"https://api.github.com/repos/minio/minio/issues/1033/events","html_url":"https://github.com/minio/minio/issues/1033","id":126781951,"number":1033,"title":"Cannot build with CGO_ENABLED=0","user":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-15T00:40:35Z","updated_at":"2016-01-15T01:20:27Z","closed_at":null,"body":"Hey guys,\r\n\r\nI'm trying to build a Minio server from HEAD to run in an `alpine:3.3` container as part of the Deis platform. I'm currently building from HEAD using [this script](https://github.com/deis/minio/blob/master/server/install.sh), which essentially downloads the latest source code from `master` and runs `make install` on it.\r\n\r\nWhen running that in a docker container that includes the `CGO_ENABLED` environment variable set to `0`, the below error occurs:\r\n\r\n```console\r\nInstalling minio:\r\n# github.com/minio/minio/vendor/github.com/minio/minio-xl/pkg/crypto/sha256\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go:63: undefined: blockAVX2\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go:65: undefined: blockAVX\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go:67: undefined: blockSSE\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go:69: undefined: blockGeneric\r\n# github.com/minio/minio/vendor/github.com/minio/minio-xl/pkg/crypto/sha512\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go:50: undefined: blockAVX2\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go:52: undefined: blockAVX\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go:54: undefined: blockSSE\r\nvendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go:56: undefined: blockGeneric\r\nMakefile:59: recipe for target 'gomake-all' failed\r\nmake: *** [gomake-all] Error 2\r\ncp: cannot stat '/go/bin/minio': No such file or directory\r\nmake: *** [build-server] Error 1\r\n```\r\n\r\nI'm guessing the error happens because there's no default configuration when no build tag gets compiled, but I'm not sure if there's a solution in this case. Anyway, this command should reproduce the file:\r\n\r\n```console\r\ndocker run -e CGO_ENABLED=0 -e GO15VENDOREXPERIMENT=1 -e GOROOT=/usr/local/go --rm -v /path/to/install.sh:/pwd -w /pwd golang:1.5.2 ./install.sh\r\n```"},"comment":{"url":"https://api.github.com/repos/minio/minio/issues/comments/171835988","html_url":"https://github.com/minio/minio/issues/1033#issuecomment-171835988","issue_url":"https://api.github.com/repos/minio/minio/issues/1033","id":171835988,"user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?v=3","gravatar_id":"","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T01:20:27Z","updated_at":"2016-01-15T01:20:27Z","body":"With CGO enabled 'minio' server will use processor optimized version of sha256 which are significantly faster than Golang sha256 package. \r\n\r\nSO wondering it makes sense to not disable them this way even for docker images. "}}