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/compile: internal compiler error: Type.Elem UNSAFEPTR #26398

Closed
Saxon1 opened this issue Jul 16, 2018 · 12 comments
Closed

cmd/compile: internal compiler error: Type.Elem UNSAFEPTR #26398

Saxon1 opened this issue Jul 16, 2018 · 12 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@Saxon1
Copy link

Saxon1 commented Jul 16, 2018

Please answer these questions before submitting your issue. Thanks!

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

Version 1.10
doesn't happen on 1.9

Does this issue reproduce with the latest release?

I'm on the latest release.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/saxon/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/saxon/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
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"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build007043969=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Tried 'go build' in av/rtmp on the repo: https://bitbucket.org/ausocean/av/src on the branch librtmpPorting.

What did you expect to see?

a clean build

What did you see instead?

bitbucket.org/ausocean/av/rtmp

:1:0: internal compiler error: Type.Elem UNSAFEPTR

Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new

@Saxon1
Copy link
Author

Saxon1 commented Jul 16, 2018

Note: I don't see this on go1.9

@ianlancetaylor
Copy link
Contributor

I checked out https://bitbucket.org/ausocean/av, and ran git checkout librtmpPorting, but there is no src directory there. Can you give precise directions for reproducing the problem starting from scratch? Thanks.

@ianlancetaylor ianlancetaylor changed the title internal compiler error: Type.Elem UNSAFEPTR cmd/compile: internal compiler error: Type.Elem UNSAFEPTR Jul 16, 2018
@ianlancetaylor ianlancetaylor added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jul 16, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Jul 16, 2018
@FiloSottile
Copy link
Contributor

/cc @randall77 @josharian

@gopherbot please open a backport issue as this might be a 1.10 regression.

@gopherbot
Copy link

Backport issue(s) opened: #26402 (for 1.10).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@josharian
Copy link
Contributor

@FiloSottile in the future, can we wait on backport setup until we can reproduce?

@ALTree
Copy link
Member

ALTree commented Jul 16, 2018

I looked into this.

It seems like you hardcoded in a few places that the librtmp you are using with cgo can be found in /usr/local/lib. In fact, when I try to build the c dependencies of your project using make, it instructs me to run sudo make install-deps, which I have no intention to do.

Please provide a reproducer that can be compiled without the requirement of running a make command from root, if possible.

@ALTree
Copy link
Member

ALTree commented Jul 16, 2018

I'll amend the comment I wrote above since it sounds unnecessarily harsh.

What I wanted to say is that, in general, Go contributors and the Go Devs will be able to help much quicker if the reproducer attached to a bug is easy to build. In this case I downloaded your repository, looked into it, and I found out that building it -apparently- requires to run a make command from root, to move headers you depend on into a specific system folder. Since running arbitrary commands from root is something that may have harmful consequences, anyone investigating your report may be unwilling to do that, and this will slow down the investigation. For this reason, we usually ask the reporter to try to make the reproducer as small, simple, and easy to build as possible.

@Saxon1
Copy link
Author

Saxon1 commented Jul 17, 2018

I ended up committing past the problem. I'm going to rebase and create a new branch. I'll also provide instructions for building the C stuff in the program dir rather than in /usr/local. And apologies for making it more difficult to investigate. I'm quite a busy boy currently - once I went back to go1.9 and got it working, I nearly forgot about the issue.

@aclements aclements modified the milestones: Go1.11, Go1.12 Jul 31, 2018
@bradfitz bradfitz added NeedsFix The path to resolution is known, but the work has not been done. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 31, 2018
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 31, 2018
@griesemer griesemer added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 30, 2018
@griesemer
Copy link
Contributor

@Saxon1 is this still an issue? W/o a way to reproduce we cannot act on this. Please let us know if you can provide more detailed information, or close the issue.

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@josharian
Copy link
Contributor

I've closed the backport bug as well.

@griesemer
Copy link
Contributor

@josharian thanks!

@golang golang locked and limited conversation to collaborators Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

9 participants