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/cgo: file:line not shown for missing function #18452

Closed
gshimansky opened this issue Dec 28, 2016 · 2 comments
Closed

cmd/cgo: file:line not shown for missing function #18452

gshimansky opened this issue Dec 28, 2016 · 2 comments

Comments

@gshimansky
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.4 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/gashiman/work/go"
GORACE=""
GOROOT="/opt/go"
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build456244343=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

When I compile a program like this
https://play.golang.org/p/oUiZf7N8xc
there is no file name and line in the error message of the compiler. When a program is complex and consists of many files with many lines, it sometimes may take a long time to guess, where exactly is the problem.

What did you expect to see?

File name with line number where the function could not be found.

What did you see instead?

Error message with just a function name that couldn't be found. It is not clear where in the code it was found.

@rsc
Copy link
Contributor

rsc commented Jan 4, 2017

/cc @mdempsky

@rsc rsc added this to the Go1.9Early milestone Jan 4, 2017
@rsc rsc changed the title Go compiler doesn't show file name and line in error message when C. function is missing cmd/cgo: file:line not shown for missing function Jan 4, 2017
@gopherbot
Copy link

CL https://golang.org/cl/34783 mentions this issue.

@bradfitz bradfitz modified the milestones: Go1.9Maybe, Go1.9Early May 3, 2017
@golang golang locked and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants