Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update secp256k1 to latest #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LuKks
Copy link

@LuKks LuKks commented Apr 25, 2024

Closes #204

I couldn't fix this error:

node:internal/modules/cjs/loader:1465
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /self/secp256k1-node/build/Release/addon.node: undefined symbol: secp256k1_pre_g_128
    at Module._extensions..node (node:internal/modules/cjs/loader:1465:18)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at load (/self/secp256k1-node/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/self/secp256k1-node/bindings.js:1:40)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v20.12.2

This looks somewhat related bitcoin-core/secp256k1#1181 but I don't know about C, bindings, or any of this so any hints would be appreciated, thanks

@LuKks LuKks force-pushed the update-vendor branch 4 times, most recently from c21cadf to 910051c Compare April 25, 2024 21:20
@vostrnad
Copy link

vostrnad commented May 5, 2024

The error might be caused by a breaking change in libsecp256k1 v0.4.0:

When consuming libsecp256k1 as a static library on Windows, the user must now define the SECP256K1_STATIC macro before including secp256k1.h.

@brunovivas
Copy link

I can get around this error by unconditionally defining variables as static in precomputed_ecmult_gen.h and precomputed_ecmult.h, but it's not clear to me why EXHAUSTIVE_TEST_ORDER isn't being set correctly.

@andrewtoth
Copy link

The upstream lib is now at version 0.6.0, so this should be rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update libsecp256k1 dependency
4 participants