-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Description
On Windows (64-bit), any call into the secp256k1 native library via besu-native fails with java.lang.UnsatisfiedLinkError. This is because the required secp256k1.dll is not available, and the README currently lists Windows build instructions as TBD.
This means that on Windows machines, no method in LibSecp256k1 can be invoked successfully.
Example Failure
LibSecp256k1.secp256k1_ec_pubkey_parse(
CONTEXT,
pubKey,
pubKeyBytes,
pubKeyBytes.length
);
Produces
java.lang.UnsatisfiedLinkError:
'int org.hyperledger.besu.nativelib.secp256k1.LibSecp256k1.secp256k1_ec_pubkey_parse(
com.sun.jna.ptr.PointerByReference,
org.hyperledger.besu.nativelib.secp256k1.LibSecp256k1$secp256k1_pubkey,
byte[],
long
)'
at org.hyperledger.besu.nativelib.secp256k1.LibSecp256k1.secp256k1_ec_pubkey_parse(Native Method)
Expected Behavior
Windows (x64) users should be able to load and call secp256k1 native methods just like Linux/macOS users.
Either prebuilt binaries (.dll) should be published alongside Linux builds, or clear instructions provided for building on Windows.
Actual Behavior
All calls into LibSecp256k1 fail with UnsatisfiedLinkError on Windows because no native library is present.
Environment
- OS: Windows 10 / Windows 11 (64-bit)
- Java: 21.0.7 (also reproducible on other versions)
- besu-native version: latest
Additional Context
The README documents Linux build steps, but for Windows simply states TBD.
Without Windows support, any Java project that depends on besu-native cannot function on Windows.
Suggested Next Steps
- Provide build instructions or CI workflows to compile secp256k1.dll for Windows.
- Publish Windows native artifacts alongside Linux/macOS.
- Update the README to explicitly state supported platforms and how to build for Windows.