Archive of the libbitcoin Slack #general channel.
/usr/local/include/bitcoin/explorer/command.hpp:58: Fehler: 'SYSCONFDIR' was not declared in this scope
58 | BC_DECLARE_CONFIG_DEFAULT_PATH("libbitcoin" / BX_PROGRAM_NAME ".cfg")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do I have to include anything else? Or do I have to set an environment variable?In file included from /usr/local/include/bitcoin/bitcoin.hpp:47,
from ../btc/btcrpclistunspent.h:10,
from ../btc/btcrpclistunspent.cpp:1:
/usr/local/include/bitcoin/explorer/command.hpp: In function 'boost::filesystem::path libbitcoin::explorer::config_default_path()':
/usr/local/include/bitcoin/explorer/command.hpp:58:1: error: 'SYSCONFDIR' was not declared in this scope
58 | BC_DECLARE_CONFIG_DEFAULT_PATH("libbitcoin" / BX_PROGRAM_NAME ".cfg")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#include <bitcoin/bitcoin.hpp>
#include <bitcoin/explorer.hpp>
#include "btctransactioninput.h"
BtcRpcListUnspent::BtcRpcListUnspent(QObject *parent) : BtcRpcEndPoint(parent)
{
}
And this is how the Qt framework compiles it:
g++ -c -pipe -g -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DBITCOIN_LIBRARY -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I../btc -I. -isystem /usr/local/include -I../number -I../bcaddress -I../arca-api-crypto -I../arca-api-protobuf/protos -I../QtCryptoHash/lib/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o btcrpclistunspent.o ../btc/btcrpclistunspent.cpp
In file included from /usr/local/include/bitcoin/bitcoin.hpp:47,
from ../btc/btcrpclistunspent.h:10,
from ../btc/btcrpclistunspent.cpp:1:
/usr/local/include/bitcoin/explorer/command.hpp: In function 'boost::filesystem::path libbitcoin::explorer::config_default_path()':
/usr/local/include/bitcoin/explorer/command.hpp:58:1: error: 'SYSCONFDIR' was not declared in this scope
58 | BC_DECLARE_CONFIG_DEFAULT_PATH("libbitcoin" / BX_PROGRAM_NAME ".cfg")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I only include #include <bitcoin/bitcoin.hpp> it complies without any errorsg++ ... $(pkg-config --cflags --libs libbitcoin-explorer)?.pro file:
CONFIG += c++11 link_pkgconfig debug static PKGCONFIG += libbitcoin-explorer(edited)
export PKG_CONFIG_PATH=/path/to/libbitcoin/lib/pkgconfigCONFIG += c++11 link_pkgconfig debug static
PKGCONFIG += libbitcoin-explorer
libbitcoin-explorer is installed in /usr/local/lib and I exported PKG_CONFIG_PATH like this:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
I still get the same compiler error.
I suspect that it doesn't find the file bx.cfg because the compiler error points to this line in /usr/local/include/bitcoin/command.hpp
#define BX_PROGRAM_NAME "bx"
#define BX_HELP_VARIABLE "help"
#define BX_CONFIG_VARIABLE "config"
BC_DECLARE_CONFIG_DEFAULT_PATH("libbitcoin" / BX_PROGRAM_NAME ".cfg")
Do I have to set SYSCONFDIR to the location of the bx.cfg file?version3 (prod), check out this call: https://github.com/libbitcoin/libbitcoin-explorer/blob/version3/src/commands/fetch-utxo.cpp#L69bx fetch-utxo on the command line and can't find the result that you need, maybe exactly what you need isn't yet supported.21:51:16.324975 DEBUG [server] Failed to receive query from [0000000000] bad data stream
00:51:33.198868 FATAL [blockchain] Failure writing transaction to store, is now corrupted: operation fail ed
mainnet1/testnet1: [23268097.168760] bs[28861]: segfault at ffffffffffffffff ip 000055982a15e3ce sp 00007f2e2a7fba20 error 7 in bs[55982a05a000+383000] [23268097.291379] bs[20330]: segfault at ffffffffffffffff ip 00005574d05393ce sp 00007ef5c27fba20 error 7 in bs[5574d0435000+383000] mainnet2/testnet2: [23266887.882841] bs[1094]: segfault at ffffffffffffffff ip 000055890e4b7cc9 sp 00007fefaf7fd9e0 error 7 in bs[55890e38a000+55d000] [23266888.087727] bs[13956]: segfault at ffffffffffffffff ip 000055f8aa369cc9 sp 00007efc1e7fb9e0 error 7 in bs[55f8aa23c000+55d000]
"Error code 7 (0x7) is 4 + 2 + 1, a user-mode write to a read-only mapping, and is what you get if you attempt to write to a string constant in C": taken from https://utcc.utoronto.ca/~cks/space/blog/linux/KernelSegfaultMessageMeaning