gomobile android library
magtamas opened this issue · 1 comments
Hi! I tried create a .aar from exist go files, but when i try bind the files, i got a ld:error according to which libbls384_256.so is incompatible with armelf_linux_eabi.
First i ran make install in "bls" and "mcl" directories and it insert the .so and .a files to /usr/local/lib. Can you please add some advice what i missed? Thank you!
$ gomobile bind -target=android -androidapi 21 -o $GOPATH/bls.aar -a -v ~/Dokumentumok/AndroidBLS/bls-go-binary/bls
write /tmp/gomobile-work-30102121/src/go.mod
go: downloading golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105
go: downloading golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098
go: downloading golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading golang.org/x/mod v0.4.2
go: found github.com/herumi/bls-go-binary/bls in github.com/herumi/bls-go-binary v0.0.0-00010101000000-000000000000
unused github.com/BurntSushi/xgb
unused github.com/yuin/goldmark
unused golang.org/x/crypto
unused golang.org/x/exp
unused golang.org/x/image
unused golang.org/x/mod
unused golang.org/x/net
unused golang.org/x/sync
unused golang.org/x/sys
unused golang.org/x/term
unused golang.org/x/text
unused golang.org/x/tools
unused golang.org/x/xerrors
runtime/cgo
github.com/herumi/bls-go-binary/bls
#github.com/herumi/bls-go-binary/bls
ld: error: /usr/local/lib/libbls384_256.so is incompatible with armelf_linux_eabi
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
golang.org/x/mobile/internal/mobileinit
golang.org/x/mobile/bind/java
golang.org/x/mobile/bind/seq
gomobile: go build -v -buildmode=c-shared -o=/tmp/gomobile-work-30102121/android/src/main/jniLibs/armeabi-v7a/libgojni.so ./gobind failed: exit status 2
I think that clang-14 can't find he bls/lib/android/armeabi-v7a/libbls384_256.a
generated by make android
, but I don't know how to specify the path while I'm studying it.