Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917751 - go-env.eclass: In riscv hardware, GOARCH should be riscv64, not riscv
Summary: go-env.eclass: In riscv hardware, GOARCH should be riscv64, not riscv
Status: RESOLVED DUPLICATE of bug 917750
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: riscv Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-22 15:56 UTC by Puqns67
Modified: 2023-11-22 15:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Puqns67 2023-11-22 15:56:35 UTC
After commit e398c855e3475c1fb5f3ac6a6e0553116dac83f8 at gentoo git repo, go-module.eclass use go-env.eclass to set compile environment.

go-env.eclass will set GOARCH to riscv on the riscv device, overwriting the default value riscv64, and go does not support setting GOARCH to riscv by default. This causes all ebuilds using go-module to fail to compile on the riscv device.

I found this error while updating net-proxy/v2ray from gentoo-zh overlay.

Add a line to go-env.eclass for fix this issue.

```
diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index ba4f6c3fbb..f74d4ab2c3 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -34,6 +34,7 @@ go-env_set_compile_environment() {
 				else
 					GOARCH="ppc64le"
 				fi ;;
+			riscv)	GOARCH="riscv64" ;;
 			*)	GOARCH="${arch}" ;;
 	esac
```
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-22 15:59:00 UTC
Slightly too slow ;)

*** This bug has been marked as a duplicate of bug 917750 ***