herumi / bls-go-binary

22 stars 22 forks source link

build fail on macos #33

Closed ltp456 closed 2 weeks ago

ltp456 commented 4 weeks ago

/Users/red/app/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1 Undefined symbols for architecture arm64: "_mclBnG1_setDst", referenced from: cgo_273b5d2df95f_Cfunc_mclBnG1_setDst in 000032.o "_mclBnG2_setDst", referenced from: cgo_273b5d2df95f_Cfunc_mclBnG2_setDst in 000032.o "_mclBn_getG2ByteSize", referenced from: __cgo_273b5d2df95f_Cfunc_mclBn_getG2ByteSize in 000032.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

herumi commented 4 weeks ago

Which version of bls-go-binary did you use? The latest version is v1.34.0 on the release branch. The following command worked correctly on my M1 Mac.

% git branch -v
* release       c1d9b11 fix(release): added libs for windows
% uname -a
Darwin m1.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64
go test -count=1 -v ./bls
=== RUN   TestSign
sec:eae04ca8281fd8f0438cd178e92bad55522c13b8e96fa0e26133ee18a4df9626
pub:5c1a60f52431c023fdc7571d55639837d2f278a218739e250fa76a0b772f459591411a0d523c7971da806db9a6c4dd06cb84cc686e1b97f59e03c75d84c692d1f5d825ac2602f139bd7a94f6668b26ce3ce683821491252607d5f758bcbfe389
0. sign(abc)=451c340b3759588f9ab1c1eac92a2a5f975f9bb94b36fb8a42d9ed53cee359b11a3752bc895bc97d08a8b88e50247386
1. sign(def)=b80231bc47ef66e1ee16dde439d66ac4182d3132c8b8641d6b3599dde94955afc8f74d3d2cef87f9efcf86182365b118
2. sign(123)=92c80906fc42ba142a7907232d8c140cfa9827500668828a150ed63cc91d90bea22d1faec86e9dc2558d56a62f871a8c
--- PASS: TestSign (0.01s)
=== RUN   TestPairing
--- PASS: TestPairing (0.02s)
=== RUN   TestCast
--- PASS: TestCast (0.00s)
=== RUN   TestDFINITY
--- PASS: TestDFINITY (0.01s)
PASS
ok      github.com/herumi/bls-go-binary/bls     0.249