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

installing kaspad and all dependencies fails due to muhash.go #2201

Open
dstark1993 opened this issue Apr 2, 2023 · 4 comments
Open

installing kaspad and all dependencies fails due to muhash.go #2201

dstark1993 opened this issue Apr 2, 2023 · 4 comments

Comments

@dstark1993
Copy link

dstark1993 commented Apr 2, 2023

After cloning https://github.com/kaspanet/kaspad and running '''install . ./cmd/...''' from the kaspad directory, there are several errors because of muhash (I presume is the type declaration?).

image

OS: Windows 10 64bit
Golang: version go1.20.2 windows/amd64

@kennethffx2
Copy link

This happens to me also.

@arkadd61
Copy link

Same here, is there a fix for it?

@lemois-1337
Copy link

First option: Install gcc on Windows, set CGO_ENABLED=1 environment variable before compilation so that it compiles the C part during go build:

CGO_ENABLED=1 go build -v -tags netgo,osusergo -o ./bin/ . ./cmd/...

Optionally you can also set CC environment variable if multiple gcc installation exists.

Second option: Cross compile on Linux for Windows:

CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -v -tags netgo,osusergo -o ./bin/ . ./cmd/...

If needed extend both with -s and -w for striping to get smaller binaries and -extldflags=-static for static linking.

@ppbbgg110
Copy link

First option: Install gcc on Windows, set CGO_ENABLED=1 environment variable before compilation so that it compiles the C part during go build:第一个选项:在 Windows 上安装 gcc ,在编译前设置 CGO_ENABLED=1 环境变量,以便在 go 构建期间编译 C 部分:

CGO_ENABLED=1 go build -v -tags netgo,osusergo -o ./bin/ . ./cmd/...

Optionally you can also set CC environment variable if multiple gcc installation exists.(可选)如果存在多个 gcc 安装,您还可以设置 CC 环境变量。

Second option: Cross compile on Linux for Windows:

CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -v -tags netgo,osusergo -o ./bin/ . ./cmd/...

If needed extend both with -s and -w for striping to get smaller binaries and -extldflags=-static for static linking.如果需要,可以扩展 with -s-w for striping,以获得较小的二进制文件和 -extldflags=-static 静态链接。

GOOS=linux GOARCH=arm64 CGO_ENABLED=1 go build -ldflags="-s -w" -tags="netgo osusergo" -o output_fil
ename

runtime/cgo

gcc_arm64.S: Assembler messages:
gcc_arm64.S:30: 错误: no such instruction: stp x29,x30,[sp,' gcc_arm64.S:34: 错误: operand size mismatch for mov'
gcc_arm64.S:36: 错误: no such instruction: stp x19,x20,[sp,' gcc_arm64.S:39: 错误: no such instruction: stp x21,x22,[sp,'
gcc_arm64.S:42: 错误: no such instruction: stp x23,x24,[sp,' gcc_arm64.S:45: 错误: no such instruction: stp x25,x26,[sp,'
gcc_arm64.S:48: 错误: no such instruction: stp x27,x28,[sp,' gcc_arm64.S:52: 错误: operand size mismatch for mov'
gcc_arm64.S:53: 错误: operand size mismatch for mov' gcc_arm64.S:54: 错误: operand size mismatch for mov'
gcc_arm64.S:56: 错误: no such instruction: blr x20' gcc_arm64.S:57: 错误: no such instruction: blr x19'
gcc_arm64.S:59: 错误: no such instruction: ldp x27,x28,[sp,' gcc_arm64.S:62: 错误: no such instruction: ldp x25,x26,[sp,'
gcc_arm64.S:65: 错误: no such instruction: ldp x23,x24,[sp,' gcc_arm64.S:68: 错误: no such instruction: ldp x21,x22,[sp,'
gcc_arm64.S:71: 错误: no such instruction: ldp x19,x20,[sp,' gcc_arm64.S:74: 错误: no such instruction: ldp x29,x30,[sp],'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants