ethereum/go-ethereum · warning

./bench: Schnorr signatures module not enabled.\n

Error message

./bench: Schnorr signatures module not enabled.\n

What it means

Compile-time guard for the Schnorr signature module in the bench tool: when ENABLE_MODULE_SCHNORRSIG is undefined and the command line contains 'schnorrsig', 'schnorrsig_sign', or 'schnorrsig_verify', the tool prints this message and exits with EXIT_FAILURE. It prevents benchmarking code that was never compiled in.

Source

Thrown at crypto/secp256k1/libsecp256k1/src/bench.c:219

#ifndef ENABLE_MODULE_ECDH
    if (have_flag(argc, argv, "ecdh")) {
        fprintf(stderr, "./bench: ECDH module not enabled.\n");
        fprintf(stderr, "Use ./configure --enable-module-ecdh.\n\n");
        return EXIT_FAILURE;
    }
#endif

#ifndef ENABLE_MODULE_RECOVERY
    if (have_flag(argc, argv, "recover") || have_flag(argc, argv, "ecdsa_recover")) {
        fprintf(stderr, "./bench: Public key recovery module not enabled.\n");
        fprintf(stderr, "Use ./configure --enable-module-recovery.\n\n");
        return EXIT_FAILURE;
    }
#endif

#ifndef ENABLE_MODULE_SCHNORRSIG
    if (have_flag(argc, argv, "schnorrsig") || have_flag(argc, argv, "schnorrsig_sign") || have_flag(argc, argv, "schnorrsig_verify")) {
        fprintf(stderr, "./bench: Schnorr signatures module not enabled.\n");
        fprintf(stderr, "Use ./configure --enable-module-schnorrsig.\n\n");
        return EXIT_FAILURE;
    }
#endif

#ifndef ENABLE_MODULE_ELLSWIFT
    if (have_flag(argc, argv, "ellswift") || have_flag(argc, argv, "ellswift_encode") || have_flag(argc, argv, "ellswift_decode") ||
        have_flag(argc, argv, "encode") || have_flag(argc, argv, "decode") || have_flag(argc, argv, "ellswift_keygen") ||
        have_flag(argc, argv, "ellswift_ecdh")) {
        fprintf(stderr, "./bench: ElligatorSwift module not enabled.\n");
        fprintf(stderr, "Use ./configure --enable-module-ellswift.\n\n");
        return EXIT_FAILURE;
    }
#endif

    /* ECDSA benchmark */
    data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);

View on GitHub (pinned to 6bb0588ad8)

Solutions

  1. Rebuild with ./configure --enable-module-schnorrsig
  2. Drop the schnorr benchmark tokens from the command line
  3. Verify enabled modules by inspecting the generated config.h before benching

Example fix

# before
./configure && make && ./src/bench schnorrsig   # -> module not enabled

# after
./configure --enable-module-schnorrsig && make && ./src/bench schnorrsig
Defensive patterns

Strategy: validation

Validate before calling

#!/bin/sh
if grep -q 'ENABLE_MODULE_SCHNORRSIG' config.h 2>/dev/null; then
  ./src/bench schnorrsig
else
  echo "schnorr module off; skipping" >&2
fi

Prevention

When it happens

Trigger: Running './bench schnorrsig' (or the sign/verify sub-names) on a build configured without --enable-module-schnorrsig — the default for plain ./configure builds of libsecp256k1.

Common situations: Manually configured builds of the vendored libsecp256k1 inside geth; benchmark scripts carried over from a full-featured system build; newer vendored versions where schnorr is opt-in.

Related errors


AI-assisted analysis of ethereum/go-ethereum@6bb0588ad8 (2026-08-15). Data as JSON: /api/errors/40b98e0e037f9cd3. Report an issue: GitHub.