Skip to content
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: no room to add dwarf info #41967

Open
mengzhuo opened this issue Oct 14, 2020 · 4 comments
Open

cmd/link: no room to add dwarf info #41967

mengzhuo opened this issue Oct 14, 2020 · 4 comments

Comments

@mengzhuo
Copy link
Contributor

@mengzhuo mengzhuo commented Oct 14, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15.2 darwin/amd64
git commit @ 7c58ef732efd9bf0d0882bb95371ce1909924a75

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/zhuo/Library/Caches/go-build"
GOENV="/Users/zhuo/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/zhuo/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/zhuo/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/zhuo/godev"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/zhuo/godev/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/zhuo/godev/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lx/34ltzbq94d5b105hg0pn86vh0000gn/T/go-build092562634=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version devel +7c58ef732e Wed Oct 14 05:34:32 2020 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +7c58ef732e Wed Oct 14 05:34:32 2020 +0000
uname -v: Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.15.4
BuildVersion:	19E287
lldb --version: lldb-1200.0.32.1
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
gdb --version: GNU gdb (GDB) 9.2

What did you do?

./all.bash

What did you expect to see?

All passed.

What did you see instead?

--- FAIL: TestExternalLinkerCgoExec (6.13s)
    nm_test.go:122: building test executable failed: exit status 2 # command-line-arguments
        /Users/zhuo/godev/pkg/tool/darwin_amd64/link: /Users/zhuo/godev/pkg/tool/darwin_amd64/link: com
bining dwarf failed: no room to add dwarf info. Need at least 1192 padding bytes, found 264

CC @cherrymui @randall77

@mengzhuo
Copy link
Contributor Author

@mengzhuo mengzhuo commented Oct 14, 2020

Hi, @cherrymui

This might help bisect shows it's e8f9185 is the first bad commit.

@mengzhuo mengzhuo changed the title cmd/nm: no room to add dwarf info cmd/link: no room to add dwarf info Oct 14, 2020
@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Oct 14, 2020

I cannot reproduce on my machine.

go version go1.15.2 darwin/amd64

Also, commit e8f9185 is not part of Go 1.15.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 15, 2020

Change https://golang.org/cl/262398 mentions this issue: cmd/link: use system strip for macho combine dwarf

@mengzhuo
Copy link
Contributor Author

@mengzhuo mengzhuo commented Oct 15, 2020

I see. The strip on my system is GNU strip installed by brew.
Will upload CL soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.