Open behzad-mozaffari opened 6 years ago
I see the same problem if I use
GOOS=linux GOARCH=amd64 gb build cmd/...
on OSX machine
Hello,
It looks like your using the go tool not gb. You may need to raise this issue elsewhere.
If the problem is with gb, please do the following.
On 19 Oct 2017, at 17:31, Jithin James notifications@github.com wrote:
Facing similar issue here on Centos 7:
[root@home runc]# cat /etc/centos-release CentOS Linux release 7.4.1708 (Core)
[root@home runc]# go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/buildah" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build173567046=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config"
[root@home runc]# make go build -buildmode=pie -ldflags "-X main.gitCommit="c05f6368afaf7f720c10b1207a51e40fccf05295" -X main.version=1.0.0-rc4+dev " -tags "seccomp" -o runc .
internal/poll
/usr/local/go/src/internal/poll/fd_mutex.go:194:6: missing function body for "runtime_Semacquire" /usr/local/go/src/internal/poll/fd_mutex.go:195:6: missing function body for "runtime_Semrelease" /usr/local/go/src/internal/poll/fd_poll_runtime.go:17:6: missing function body for "runtimeNano" /usr/local/go/src/internal/poll/fd_poll_runtime.go:19:6: missing function body for "runtime_pollServerInit" /usr/local/go/src/internal/poll/fd_poll_runtime.go:20:6: missing function body for "runtime_pollServerDescriptor" /usr/local/go/src/internal/poll/fd_poll_runtime.go:21:6: missing function body for "runtime_pollOpen" /usr/local/go/src/internal/poll/fd_poll_runtime.go:22:6: missing function body for "runtime_pollClose" /usr/local/go/src/internal/poll/fd_poll_runtime.go:23:6: missing function body for "runtime_pollWait" /usr/local/go/src/internal/poll/fd_poll_runtime.go:24:6: missing function body for "runtime_pollWaitCanceled" /usr/local/go/src/internal/poll/fd_poll_runtime.go:25:6: missing function body for "runtime_pollReset" /usr/local/go/src/internal/poll/fd_poll_runtime.go:25:6: too many errors make: *** [runc] Error 2
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@davecheney Sorry it was a different issue meant for a different project.
I can build the project by setting CGO_ENABLED=0 and GOPATH={project}:{project}/vendor and running go install. I couldn't get gb to pass through the CGO_ENABLED parameter.
Gb does not support cross compilation with cgo enabled.
On 19 Oct 2017, at 21:59, behzad-mozaffari notifications@github.com wrote:
I had a freshly installed go + gb. GOROOT wasn't set. I wasn't using go tool directly. The error is the result of running gb build. I can build the project by setting CGO_ENABLED=0 and GOPATH={project}:{project}/vendor and running go install. I couldn't get gb to pass through the CGO_ENABLED parameter.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I can not stable reproduce the problem, but time-to-time receive problem on my OSX with cross-compilation to linux WITHOUT cgo. I pretty sure what only gb used (because we build by GNU Make, where only gb used)
On a centos 7 machine running go 1.9. gb build generates the following error after compilation is finished.
gb build, runs on the same project in windows and mac with not issues. On windows setting GOOS and GOARCH to linux results in a binary but on mac the following error is shown missing function body errors for internal package
This doesn't happen in a simple single file project with no dependecies.