Closed Moopli closed 1 year ago
@ale-linux Can you please help us out in this issue
On it. @Moopli, could you please help me reproduce the issue?
I figured out a way to reproduce the build errors without having to use trustbloc/wallet-sdk:
-androidapi X
flag for the SDK version you installed (in my case, 22).(cd cmd/aries-agent-mobile/; make bindings-android)
In my case, I got the same build errors as I specified above.
If I amend the same Makefile line to replace the -target
flag with -target=android/amd64,android/arm64
, and add the flag -tags generic
, android bindings build successfully, but this disables support for 32-bit architectures.
thanks @Moopli , I think I understand the issue and I can quickly push out a fix. There are a few options, and in order to understand what the best one is I'd like to know what GOARCH you're using for the build that fails. Could you provide me that info pls?
@ale-linux the failing targets are android/386 and android/arm.
Gotcha - yes, exactly what I suspected. fabric-amcl (which packages code from https://github.com/miracl/amcl in a go-gettable way) only contains the 64-bit implementation of FP256BN. We have two options: either just drop FP256BN from mathlib (it's anyway insecure these days) or leave it and add support for the 32 bit version. In the interest of backward compatibility I'm shooting for the second option. Expect from me a PR shortly
@Moopli, please take a look at https://github.com/hyperledger/aries-framework-go/pull/3595. All the amcl-related issues were fixed. The undefined: mul
issue will likely still be there (and we would need to solve it), but I wanted to have a quick fix out for the thing that got you stuck so that you could validate it.
wasm
unit tests fail, since the patch inadvertently dropped support for wasm
. I'll work to fix it, but in the meantime you can report on the fix status for your platform.
wasm
test works well now
@ale-linux The undefined: mul
error seems fine to handle just by adding the generic
build tag, to enable this implementation in mathlib.
Since you're more familiar with mathlib, would you say that this is an issue to fix in mathlib? Or is this just expected usage?
It's definitely a mathlib issue - I just went ahead and fixed it too. Could you please retry https://github.com/hyperledger/aries-framework-go/pull/3595 ?
We use gomobile to build android libs in one of our projects that depends on afgo, and updating to the latest commit revision has introduced a number of build errors:
The last error is fixed by adding the
generic
build flag. TheMConst
cast issue causes an undocumented loss of support for 32-bit architectures - specifying the android build target to only 64-bit architectures allows the build to succeed.