You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing some CFFI Python bindings to the musig module and when doing so, I got the following error:
generating cffi module 'build/temp.macosx-11-x86_64-3.9/_libsecp256k1.c'
already up-to-date
building '_libsecp256k1' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -DCFFI_ENABLE_RECOVERY -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -Ibuild/temp.macosx-11-x86_64-3.9/include -I/Users/martijndevos/Documents/coincurve/build/temp.macosx-11-x86_64-3.9/include -c build/temp.macosx-11-x86_64-3.9/_libsecp256k1.c -o build/temp.macosx-11-x86_64-3.9/build/temp.macosx-11-x86_64-3.9/_libsecp256k1.o
In file included from build/temp.macosx-11-x86_64-3.9/_libsecp256k1.c:574:
build/temp.macosx-11-x86_64-3.9/include/secp256k1_musig.h:244:178: error: '__nonnull__' attribute parameter 1 is out of bounds
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(7) SECP256K1_ARG_NONNULL(8) SECP256K1_ARG_NONNULL(11);
^ ~~
build/temp.macosx-11-x86_64-3.9/include/secp256k1.h:167:54: note: expanded from macro 'SECP256K1_ARG_NONNULL'
# define SECP256K1_ARG_NONNULL(_x) __attribute__ ((__nonnull__(_x)))
^ ~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
The error seems to originate from this line. I'm not entirely sure, but I suspect that the SECP256K1_ARG_NONNULL(11) is wrong since the secp256k1_musig_session_init function only has ten parameters (given that they start counting parameter indices from 1). Changing this to SECP256K1_ARG_NONNULL(10) seems to fix the compilation issue, although I'm not sure if this is the proper fix.
The text was updated successfully, but these errors were encountered:
Just so you're aware, the musig module will be replaced by a MuSig2 module (see #131).
I am aware of the MuSig2 code but I didn't know about the pending PR. I finished the Python bindings to the (old) MuSig implementation and they seem to work correctly, also see here. I'm currently working on the bindings to MuSig2 but they require me to rewrite a few bindings since a few function signatures have changed. 😀
I'm writing some CFFI Python bindings to the
musig
module and when doing so, I got the following error:The error seems to originate from this line. I'm not entirely sure, but I suspect that the
SECP256K1_ARG_NONNULL(11)
is wrong since thesecp256k1_musig_session_init
function only has ten parameters (given that they start counting parameter indices from 1). Changing this toSECP256K1_ARG_NONNULL(10)
seems to fix the compilation issue, although I'm not sure if this is the proper fix.The text was updated successfully, but these errors were encountered: