herumi / bls-go-binary

22 stars 22 forks source link

examples do not work on windows #6

Closed SeienK closed 2 years ago

SeienK commented 3 years ago

I just compile the go file in examples, but the exe seems to be crashed on running. I also tried examples in bls-eth-go-binary, and that works well on windows.

herumi commented 3 years ago

What do you use version of tools?

It goes well in my environment.

 git branch -v
  dev    dfeac77 update windows binary
* master 19c7242 update submodule again
go version
go version go1.14.1 windows/amd64

$ go run examples/cast-sample.go
sk 1
pk 1 11ccb44e77ac2c5dc32a6009594dbe331ec85a61290d6bbac8cc7ebb2dceb128 f204a14bbdac4a05be9a25176de827f2e60085668becdd4fc5fa914c9ee0d9a 7c13d8487903ee3c1c5ea327a3a52b6cc74796b1760d5ba20ed802624ed19c8 8f9642bbaacb73d8c89492528f58932f2de9ac3e80c7b0e41f1a84f1c40182
x.a 11ccb44e77ac2c5dc32a6009594dbe331ec85a61290d6bbac8cc7ebb2dceb128
x.b f204a14bbdac4a05be9a25176de827f2e60085668becdd4fc5fa914c9ee0d9a
y.a 7c13d8487903ee3c1c5ea327a3a52b6cc74796b1760d5ba20ed802624ed19c8
y.b 8f9642bbaacb73d8c89492528f58932f2de9ac3e80c7b0e41f1a84f1c40182

$ go run examples/agg-verify.go
verify=true
verify split=true

$ go test ./bls
ok      github.com/herumi/bls-go-binary/bls     (cached)

$ cat /proc/cpuinfo
...
model name      : Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
...
SeienK commented 3 years ago

ok, the problem is the go version

it works well by go 1.14.1, and it fails by go 1.16 and 1.16.7

go version go version go1.16 windows/amd64

git branch -v

go run examples/agg-verify.go exit status 3221225794

herumi commented 3 years ago

Hum, it works well by go 1.16.

MINGW64 /c/prog/bls-go-binary
$ go version
go version go1.16 windows/amd64
$ go run examples/agg-verify.go
verify=true
verify split=true

What kind of CPU are you using?

SeienK commented 3 years ago

I update my gcc from 9.2.0 to 10.3.0 and now everything goes well

Here are the 3 settings that I tried before and failed: Settings 1 go 1.16 windows/amd64 tdm-gcc v9.2.0 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz

Settings 2 go 1.16.7 windows/amd64 tdm-gcc v9.2.0 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz

Settings 3 go 1.15.15 windows/amd64 tdm-gcc v9.2.0 AMD Ryzen 7 4800H

And this setting works go 1.14.1 windows/amd64 tdm-gcc v9.2.0 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz