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

Error occurs when use go1.22.1 linux/amd64 #131

Closed
xander42280 opened this issue Jun 4, 2024 · 0 comments · Fixed by #136
Closed

Error occurs when use go1.22.1 linux/amd64 #131

xander42280 opened this issue Jun 4, 2024 · 0 comments · Fixed by #136

Comments

@xander42280
Copy link
Contributor

my hello_world.go

package main

import (
	"fmt"
	"os"
	"strconv"
)

func main() {
	fmt.Printf("%#v\n", os.Args)
	if len(os.Args) < 2 {
		fmt.Printf("input a, b\n")
		return
	}

	a, _ := strconv.Atoi(os.Args[0])
	b, _ := strconv.Atoi(os.Args[1])
	result := a * b
	fmt.Printf("result %d\n", result)
}
GOOS=linux GOARCH=mips GOMIPS=softfloat go build -o hello_world_mips1.22 hello_world.go

run example:

ubuntu@ip-172-31-0-75:/mnt/data/xander/zkm$ BASEDIR=test-vectors RUST_LOG=info ELF_PATH=/mnt/data/xander/test/test_proof/hello_world_mips1.22 SEG_OUTPUT=/tmp/output SEG_SIZE=262144 ARGS="123456 321" cargo run --release --example zkmips split
warning: both `/home/ubuntu/.cargo/config` and `/home/ubuntu/.cargo/config.toml` exist. Using `/home/ubuntu/.cargo/config`
    Finished `release` profile [optimized] target(s) in 0.25s
     Running `target/release/examples/zkmips split`
runtime: unexpected error while checking standard file descriptor 0, errno=-1
fatal error: cannot open standard fds

runtime stack:
runtime.throw({0xe8140, 0x18})
	/usr/local/go/src/runtime/panic.go:1023 +0x54 fp=0x7fffcf78 sp=0x7fffcf64 pc=0x56310
runtime.checkfds()
	/usr/local/go/src/runtime/fds_unix.go:34 +0x330 fp=0x7fffcfac sp=0x7fffcf78 pc=0x1ab5c
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:803 +0x278 fp=0x7fffcff0 sp=0x7fffcfac pc=0x5b8b4
runtime.rt0_go()
	/usr/local/go/src/runtime/asm_mipsx.s:62 +0xac fp=0x7fffd000 sp=0x7fffcff0 pc=0x95cb8
[2024-06-04T10:58:45Z INFO  zkmips] Split done
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

Successfully merging a pull request may close this issue.

1 participant