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

Comments

Projects
None yet
9 participants
@Saxon1
Copy link

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

This comment has been minimized.

Copy link
Author

commented Jul 16, 2018

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

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2018

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 this to the Go1.11 milestone Jul 16, 2018

@FiloSottile

This comment has been minimized.

Copy link
Member

commented Jul 16, 2018

/cc @randall77 @josharian

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

@gopherbot

This comment has been minimized.

Copy link

commented Jul 16, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2018

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

@ALTree

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

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 and removed WaitingForInfo labels Jul 31, 2018

@griesemer

This comment has been minimized.

Copy link
Contributor

commented Nov 28, 2018

@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

This comment has been minimized.

Copy link

commented Nov 30, 2018

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.)

@gopherbot gopherbot closed this Nov 30, 2018

@josharian

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2018

I've closed the backport bug as well.

@griesemer

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2018

@josharian thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.