I'm trying to compile a performant version of this library for testing on my local machine. I experimented with the following flags:
CFLAGS="-O3" ./configure --with-ecmult-window=24 --with-ecmult-gen-precision=8
After running make -j 1, I got this error:
make all-am
make[1]: Entering directory '/home/.../rust-secp256k1/secp256k1-sys/depend/secp256k1'
CC src/bench.o
src/bench.c: In function 'main':
src/bench.c:191:16: warning: implicit declaration of function 'rustsecp256k1_v0_6_1_context_create'; did you mean 'rustsecp256k1_v0_6_1_context_randomize'? [-Wimplicit-function-declaration]
191 | data.ctx = rustsecp256k1_v0_6_1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| rustsecp256k1_v0_6_1_context_randomize
src/bench.c:191:16: warning: nested extern declaration of 'rustsecp256k1_v0_6_1_context_create' [-Wnested-externs]
src/bench.c:191:14: warning: assignment to 'rustsecp256k1_v0_6_1_context *' {aka 'struct rustsecp256k1_v0_6_1_context_struct *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
191 | data.ctx = rustsecp256k1_v0_6_1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
| ^
src/bench.c:209:5: warning: implicit declaration of function 'rustsecp256k1_v0_6_1_context_destroy'; did you mean 'rustsecp256k1_v0_6_1_context_randomize'? [-Wimplicit-function-declaration]
209 | rustsecp256k1_v0_6_1_context_destroy(data.ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| rustsecp256k1_v0_6_1_context_randomize
src/bench.c:209:5: warning: nested extern declaration of 'rustsecp256k1_v0_6_1_context_destroy' [-Wnested-externs]
src/bench.c:212:14: warning: assignment to 'rustsecp256k1_v0_6_1_context *' {aka 'struct rustsecp256k1_v0_6_1_context_struct *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
212 | data.ctx = rustsecp256k1_v0_6_1_context_create(SECP256K1_CONTEXT_SIGN);
| ^
make[1]: *** No rule to make target 'libsecp256k1.c', needed by 'libsecp256k1.lo'. Stop.
make[1]: Leaving directory '/home/.../rust-secp256k1/secp256k1-sys/depend/secp256k1'
make: *** [Makefile:825: all] Error 2
How can I resolve this error, and are there any other performance optimizations I can make use of?
Also, it's worth noting, in troubleshooting this error, it seems to build fine if I stay on the happy path with defaults, following the build instructions in the README.
Not sure if it's helpful to mention or relevant, but I'm building on a Zen 2 AMD system running Arch Linux with 128GB of DDR4.