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: conflicting package heights 21 and 11 for path "github.com/golang/protobuf/proto" #39061

Closed
fwhezfwhez opened this issue May 14, 2020 · 9 comments

Comments

@fwhezfwhez
Copy link

@fwhezfwhez fwhezfwhez commented May 14, 2020

-go 1.12.17 win64

refer to golang/protobuf#1128

They said error might ocurred due to go tool chain.

How to fix it?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 14, 2020

I can't recreate the problem using Go 1.12.

What is the exact command that you run? What is the exact output?

@ALTree ALTree changed the title [Bug Report]internal compiler error: conflicting package heights 21 and 11 for path "github.com/golang/protobuf/proto" cmd/compile: internal compiler error: conflicting package heights 21 and 11 for path "github.com/golang/protobuf/proto" May 14, 2020
@ALTree
Copy link
Member

@ALTree ALTree commented May 14, 2020

Are you invoking the compiler with -I? If yes, you may be triggering #25635.

@fwhezfwhez
Copy link
Author

@fwhezfwhez fwhezfwhez commented May 14, 2020

I can't recreate the problem using Go 1.12.

What is the exact command that you run? What is the exact output?

go run main.go
go build

they all faces the same error internal compiler error: conflicting package heights 21 and 11 for path "github.com/golang/protobuf/proto"

@fwhezfwhez
Copy link
Author

@fwhezfwhez fwhezfwhez commented May 14, 2020

@ianlancetaylor @ALTree
Here is my detail

go build -a -x

compile.log

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 15, 2020

Can you show us the input file that you are compiling? Thanks.

@fwhezfwhez
Copy link
Author

@fwhezfwhez fwhezfwhez commented May 18, 2020

I kinda know why this error occurs.

My project uses binary-only package, the sourcr file x.a is built in manager's computer and then copy to mine.
x package imports github.com/golang/protobuf/proto whose version differs between manager'computer and mine and thus makes my project not builtable while importing x.a.

Basiclly I think proto's upgrading work has something conflict to the old commits.

@fwhezfwhez
Copy link
Author

@fwhezfwhez fwhezfwhez commented May 18, 2020

I kinda know why this error occurs.

My project uses binary-only package, the sourcr file x.a is built in manager's computer and then copy to mine.
x package imports github.com/golang/protobuf/proto whose version differs between manager'computer and mine and thus makes my project not builtable while importing x.a.

Basiclly I think proto's upgrading work has something conflict to the old commits.

But still confused, If proto repo didn't upgrade well, The error should print like:

function XXXX not found
YYY undefine

However it print compile error. Ok, go back to go tool chain, I'm trying to reproduce bug spot anyway.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 18, 2020

Note that Go 1.12 is the last release that supported binary-only packages, and that Go 1.12 is no longer supported.

@fwhezfwhez
Copy link
Author

@fwhezfwhez fwhezfwhez commented May 22, 2020

Sorry that I don't have source file to locate what causes this problem. I try to rebuild a minimum problem case but fail.All things run ok.

That's it! I'll use protobuf package of old and fixed version to avoid this compile error.

@fwhezfwhez fwhezfwhez closed this May 22, 2020
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.