Ecdsa

安裝 libwally 時出錯

  • January 3, 2022

我正在嘗試在我的 debian 機器上安裝 libwally。我按照安裝指南進行操作,但執行時./configure收到警告

=== configuring in src/secp256k1 (/home/standup/libwally-core/src/secp256k1)
configure: WARNING: no configuration information is in src/secp256k1

所以當我跑步時,make我得到了錯誤

Making all in src
make[1]: Entering directory '/home/standup/libwally-core/src'
make  all-recursive
make[2]: Entering directory '/home/standup/libwally-core/src'
Making all in secp256k1
make[3]: Entering directory '/home/standup/libwally-core/src/secp256k1'
make[3]: *** No rule to make target 'all'.  Stop.
make[3]: Leaving directory '/home/standup/libwally-core/src/secp256k1'
make[2]: *** [Makefile:1715: all-recursive] Error 1
make[2]: Leaving directory '/home/standup/libwally-core/src'
make[1]: *** [Makefile:927: all] Error 2
make[1]: Leaving directory '/home/standup/libwally-core/src'
make: *** [Makefile:436: all-recursive] Error 1

我發現這是 secp256k1 的問題,所以我做了一些研究,發現這個建議secp256k1在目錄中單獨安裝/src(我只是複製了 repo並將其建構在/src. 這讓我更進一步(執行時沒有警告./configure),但執行後我仍然收到此錯誤make

Making all in src
make[1]: Entering directory '/home/standup/libwally-core/src'
make  all-recursive
make[2]: Entering directory '/home/standup/libwally-core/src'
Making all in secp256k1
make[3]: Entering directory '/home/standup/libwally-core/src/secp256k1'
make  all-am
make[4]: Entering directory '/home/standup/libwally-core/src/secp256k1'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/standup/libwally-core/src/secp256k1'
make[3]: Leaving directory '/home/standup/libwally-core/src/secp256k1'
make[3]: Entering directory '/home/standup/libwally-core/src'
 CC       ctest/test_bech32-test_bech32.o
 CC       libwallycore_la-address.lo
In file included from address.c:1:
internal.h:8:10: fatal error: secp256k1/include/secp256k1_ecdsa_s2c.h: No such file or directory
   8 | #include "secp256k1/include/secp256k1_ecdsa_s2c.h"
     |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:1324: libwallycore_la-address.lo] Error 1
make[3]: Leaving directory '/home/standup/libwally-core/src'
make[2]: *** [Makefile:1715: all-recursive] Error 1
make[2]: Leaving directory '/home/standup/libwally-core/src'
make[1]: *** [Makefile:927: all] Error 2
make[1]: Leaving directory '/home/standup/libwally-core/src'
make: *** [Makefile:436: all-recursive] Error 1

沒有secp256k1/include/secp256k1_ecdsa_s2c.h文件…

我怎樣才能解決這個問題?我不得不手動安裝 secp256k1 對我來說已經很奇怪了……

我認為您需要使用ElementsProject/secp256k1-zkp而不是bitcoin-core/secp256k1。Elements fork 有很多 libwally 使用的額外模組,包括失去s2c的文件(簽署契約)。

引用自:https://bitcoin.stackexchange.com/questions/111586