-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Description
On Ubuntu 22.04, in the master branch @ 0857f29:
$ ./autogen.sh
$ ./configure --without-daemon --without-gui --without-utils --disable-tests --disable-bench --disable-fuzz-binary --disable-shared --prefix=/
$ make
$ make DESTDIR=~/CONSENSUS install
$ g++ testconsensus.cpp -o testconsensus -I ~/CONSENSUS/include -L ~/CONSENSUS/lib -l:libbitcoinconsensus.a
/usr/bin/ld: /home/hebasto/CONSENSUS/lib/libbitcoinconsensus.a(libbitcoinconsensus_la-pubkey.o): in function `ecdsa_signature_parse_der_lax(secp256k1_ecdsa_signature*, unsigned char const*, unsigned long)':
./src/pubkey.cpp:50: undefined reference to `secp256k1_context_static'
/usr/bin/ld: ./src/pubkey.cpp:50: undefined reference to `secp256k1_ecdsa_signature_parse_compact'
/usr/bin/ld: ./src/pubkey.cpp:179: undefined reference to `secp256k1_ecdsa_signature_parse_compact'
/usr/bin/ld: ./src/pubkey.cpp:173: undefined reference to `secp256k1_ecdsa_signature_parse_compact'
...
$ cat testconsensus.cpp
#include <iostream>
#include <bitcoinconsensus.h>
int main()
{
std::cout << "bitcoinconsensus version: " << bitcoinconsensus_version() << std::endl;
return 0;
}
It is worth mentioning that the static libbitcoinconsensus.a
library is not shipped as a part of a release package.
However, in the light of upcoming migration to CMake, 100% feature compatibility is expected, and a few options might be considered:
- Fix the current build system.
- Disable building static libraries in the current build system.
- Something else.