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

cmd/link: linking a c-shared archive into a Go program fails on Darwin #29061

Open
YoshikiShibata opened this Issue Dec 1, 2018 · 9 comments

Comments

Projects
None yet
5 participants
@YoshikiShibata

YoshikiShibata commented Dec 1, 2018

Please answer these questions before submitting your issue. Thanks!

What did you do?

I tried to rebuild the latest tip version with all.bash on my Mac.

What did you expect to see?

No error.

What did you see instead?

$ git rev-parse HEAD
b397248168fcb26400ac6afb88bf6080497a819e
##### ../misc/cgo/testcshared
--- FAIL: TestGo2C2Go (4.85s)
    cshared_test.go:616: run: [go build -buildmode=c-shared -o /var/folders/pb/c7_4_d355ng5zfm4r_jg2gg00000gn/T/cshared-TestGo2C2Go380654146/libtestgo2c2go.dylib go2c2go/go]
    cshared_test.go:641: run: [go build -o /var/folders/pb/c7_4_d355ng5zfm4r_jg2gg00000gn/T/cshared-TestGo2C2Go380654146/m1 go2c2go/m1]
    cshared_test.go:642: command failed: [/var/folders/pb/c7_4_d355ng5zfm4r_jg2gg00000gn/T/cshared-TestGo2C2Go380654146/m1]
        signal: abort trap
        dyld: Library not loaded: libtestgo2c2go.dylib
          Referenced from: /var/folders/pb/c7_4_d355ng5zfm4r_jg2gg00000gn/T/cshared-TestGo2C2Go380654146/m1
          Reason: image not found
        
FAIL
2018/12/02 08:32:51 Failed: exit status 1

Does this issue reproduce with the latest release (go1.11.2)?

N/A

System details

go version devel +b397248168 Sat Dec 1 17:31:02 2018 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/yoshiki/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yoshiki/gocode:/Users/yoshiki/exercises/gpl:/Users/yoshiki/oak"
GOPROXY=""
GORACE=""
GOROOT="/Users/yoshiki/tools/go"
GOTMPDIR=""
GOTOOLDIR="/Users/yoshiki/tools/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version devel +b397248168 Sat Dec 1 17:31:02 2018 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +b397248168 Sat Dec 1 17:31:02 2018 +0000
uname -v: Darwin Kernel Version 18.2.0: Fri Oct  5 19:41:49 PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.14.1
BuildVersion:	18B75
lldb --version: lldb-1000.0.38.2
  Swift-4.2
@odeke-em

This comment has been minimized.

Member

odeke-em commented Dec 2, 2018

Thank you for filing this issue @YoshikiShibata!

Kindly paging @ianlancetaylor @bcmills.

@YoshikiShibata

This comment has been minimized.

YoshikiShibata commented Dec 3, 2018

This problem is still happening. Why is nobody assigned to this issue?

@bcmills

This comment has been minimized.

Member

bcmills commented Dec 3, 2018

Why is nobody assigned to this issue?

It was reported two days ago, at the beginning of the weekend. Please be patient.

@bcmills

This comment has been minimized.

Member

bcmills commented Dec 3, 2018

Looking at the build dashboard, it appears that the failure was introduced in CL 152079, which was intended to fix #27019.

(CC @eliasnaur)

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 3, 2018

@YoshikiShibata You reported the problem on Saturday. I didn't work on Saturday or Sunday, because they are the weekend. I'm working on it now.

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 3, 2018

As far as I can tell the test simply can't work on Darwin, so I'm going to arrange to skip it.

@gopherbot

This comment has been minimized.

gopherbot commented Dec 3, 2018

Change https://golang.org/cl/152159 mentions this issue: misc/cgo/testcshared: don't run TestGo2C2Go on Darwin

@ianlancetaylor ianlancetaylor changed the title from cgo: misc/cgo/testcshared fails with the latest tip version to cmd/link: linking a c-shared archive into a Go program fails on Darwin Dec 3, 2018

@ianlancetaylor ianlancetaylor removed their assignment Dec 3, 2018

@ianlancetaylor ianlancetaylor modified the milestones: Go1.12, Unplanned Dec 3, 2018

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 3, 2018

Keeping the release-blocker label until CL 152159 is submitted.

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Dec 3, 2018

CL 152159 is submitted, removing release-blocker label.

gopherbot pushed a commit that referenced this issue Dec 3, 2018

misc/cgo/testcshared: don't run TestGo2C2Go on Darwin
Darwin doesn't support the multiple copies of the runtime package
implied by linking a c-shared library into a Go program.

Updates #29061

Change-Id: I6cf5d00babf82f1de05689c1345aaa5ae0b0659c
Reviewed-on: https://go-review.googlesource.com/c/152159
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

@bcmills bcmills added the OS-Darwin label Dec 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment