crate-crypto / go-ipa

A Go implementation of cryptographic primitives for Verkle Trees
https://verkle.dev
Apache License 2.0
32 stars 14 forks source link

Cannot perform dynamic linking with go-ipa v0.0.0-20231025140028-3c0104f4b233 #68

Open mortimr opened 10 months ago

mortimr commented 10 months ago

Hello !

I'm building go plugins that contain go-ipa in their dependencies (extending go-ethereum capabilities) and I'm now unable to build the dynamic library. Here's the error I have when building

# github.com/crate-crypto/go-ipa/bandersnatch/fr
asm: element_mul_amd64.s:86: when dynamic linking, R15 is clobbered by a global variable access and is used here: 00013 (/home/mortimr/go/pkg/mod/github.com/crate-crypto/go-ipa@v0.0.0-20231025140028-3c0104f4b233/bandersnatch/fr/element_mul_amd64.s:86)      MULXQ   DI, R14, R15

Any idea on how this could get fixed ?

kevaundray commented 8 months ago

This seems to be a gnark-crypto issue, perhaps you could open up an issue on their repo?

If this does continue to become a hinderance and it cannot be fixed in gnark, then we could look into using pure golang implementations for field arithmetic under a feature flag