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: sw_64cpu compile failed #37877

Closed
Ccaomei opened this issue Mar 16, 2020 · 8 comments
Closed

cmd/compile: sw_64cpu compile failed #37877

Ccaomei opened this issue Mar 16, 2020 · 8 comments
Milestone

Comments

@Ccaomei
Copy link

@Ccaomei Ccaomei commented Mar 16, 2020

I recently in the winning ShenWei CPU compilation go1.14 kirin system source code, compile problem: go1.14 / SRC/runtime/runtime1. Go: 162-22: internal compiler error: 'check' : panic during opt while compiling the check:
Runtime error: floating point error

Please take a look at it for me. Thank you very much!!!

@Ccaomei
Copy link
Author

@Ccaomei Ccaomei commented Mar 16, 2020

I used the riscv64 instruction set to compile, and the environment variable was set to export GOHOSTARCH=riscv64, export GO_GCFLAGS=all=-d=checkptr=0

@josharian
Copy link
Contributor

@josharian josharian commented Mar 16, 2020

Thanks for the report. Some questions. Can you share the source code that you were compiling? Does the error happen reliably, or only once? If I read correctly, you were compiling on your riscv64 machine. How did you bootstrap the toolchain that you were using?

@josharian
Copy link
Contributor

@josharian josharian commented Mar 16, 2020

@Ccaomei
Copy link
Author

@Ccaomei Ccaomei commented Mar 16, 2020

I was in the bid kirin, sw_64 CPU, compiled go1.14, I changed the code in the CMD /dist/main.go file, detected sw_64 arch, set it to riscv64 instruction set, and then execute.Every time it happens, it's inevitable.

@cagedmantis cagedmantis added this to the Backlog milestone Mar 16, 2020
@cagedmantis cagedmantis changed the title sw_64cpu compile failed,please help cmd/compile: sw_64cpu compile failed Mar 16, 2020
@4a6f656c
Copy link
Contributor

@4a6f656c 4a6f656c commented Mar 16, 2020

I presume you're referring to the Sunway architecture?

If so, I highly doubt these are RISC-V based, hence would not expect riscv64 to work on this hardware (but I could be wrong).

@Ccaomei
Copy link
Author

@Ccaomei Ccaomei commented Mar 17, 2020

Yes, it is at Sunway architecture. I would like to ask you how to solve the compilation problem that I am currently encountering. Is there any solution? @4a6f656c

@Ccaomei
Copy link
Author

@Ccaomei Ccaomei commented Mar 17, 2020

@4a6f656c Do you know how to compile go source code on Sunway CPU?

@randall77
Copy link
Contributor

@randall77 randall77 commented Mar 17, 2020

You might be able to use gccgo on your platform. Presumably gcc works?
The standard Go distribution will not work. It cannot target that architecture, as far as I can tell (although the wikipedia page for Sunway doesn't provide enough details to be 100% sure).

@randall77 randall77 closed this Mar 17, 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
5 participants
You can’t perform that action at this time.