Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.

gb build fails on centos7 with linking error  #728

@behzad-mozaffari

Description

@behzad-mozaffari

On a centos 7 machine running go 1.9. gb build generates the following error after compilation is finished.

/usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-237740002/000000.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status

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

# internal/poll
fd_mutex.go:194:6: missing function body for "runtime_Semacquire"
fd_mutex.go:195:6: missing function body for "runtime_Semrelease"
fd_poll_runtime.go:17:6: missing function body for "runtimeNano"
fd_poll_runtime.go:19:6: missing function body for "runtime_pollServerInit"
fd_poll_runtime.go:20:6: missing function body for "runtime_pollServerDescriptor"
fd_poll_runtime.go:21:6: missing function body for "runtime_pollOpen"
fd_poll_runtime.go:22:6: missing function body for "runtime_pollClose"
fd_poll_runtime.go:23:6: missing function body for "runtime_pollWait"
fd_poll_runtime.go:24:6: missing function body for "runtime_pollWaitCanceled"
fd_poll_runtime.go:25:6: missing function body for "runtime_pollReset"
fd_poll_runtime.go:25:6: too many errors

This doesn't happen in a simple single file project with no dependecies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions