Bitcoind
從原始碼 Ubuntu 17.10 編譯比特幣核心
嘿,從原始碼編譯通常一切都很好,直到我更新到 Ubuntu 17.10
我已經使用 –disable-wallet 進行了配置,並且正在使用最新的 master 分支
chris@chris-GE60-2PL:~/bitcoin$ sudo make Making all in src make[1]: Entering directory '/home/chris/bitcoin/src' make[2]: Entering directory '/home/chris/bitcoin/src' make[3]: Entering directory '/home/chris/bitcoin' cd . && /bin/bash ./config.status src/config/bitcoin-config.h config.status: creating src/config/bitcoin-config.h config.status: src/config/bitcoin-config.h is unchanged make[3]: Leaving directory '/home/chris/bitcoin' make[3]: Entering directory '/home/chris/bitcoin' make[3]: Leaving directory '/home/chris/bitcoin' make[3]: Entering directory '/home/chris/bitcoin/src/secp256k1' make[3]: Leaving directory '/home/chris/bitcoin/src/secp256k1' CXX libbitcoin_util_a-clientversion.o AR libbitcoin_util.a CXXLD bitcoind CXXLD bitcoin-cli CXXLD bitcoin-tx CXXLD test/test_bitcoin CXXLD bench/bench_bitcoin CXX qt/qt_libbitcoinqt_a-moc_bitcoingui.o qt/moc_bitcoingui.cpp: In static member function ‘static void BitcoinGUI::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’: qt/moc_bitcoingui.cpp:217:21: error: ‘class BitcoinGUI’ has no member named ‘setEncryptionStatus’; did you mean ‘setDockOptions’? case 6: _t->setEncryptionStatus((*reinterpret_cast< int(*)> (_a[1]))); break; ^~~~~~~~~~~~~~~~~~~ setDockOptions qt/moc_bitcoingui.cpp:218:21: error: ‘class BitcoinGUI’ has no member named ‘setHDStatus’; did you mean ‘setStatusBar’? case 7: _t->setHDStatus((*reinterpret_cast< int(*)>(_a[1]))); break; ^~~~~~~~~~~ setStatusBar qt/moc_bitcoingui.cpp:219:33: error: ‘class BitcoinGUI’ has no member named ‘handlePaymentRequest’ case 8: { bool _r = _t- >handlePaymentRequest((*reinterpret_cast< const SendCoinsRecipient(*)> (_a[1]))); ^~~~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:221:21: error: ‘class BitcoinGUI’ has no member named ‘incomingTransaction’ case 9: _t->incomingTransaction((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])), (*reinterpret_cast< const CAmount(*)>(_a[3])),(*reinterpret_cast< const QString(*)>(_a[4])),(*reinterpret_cast< const QString(*)> (_a[5])),(*reinterpret_cast< const QString(*)>(_a[6]))); break; ^~~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:222:22: error: ‘class BitcoinGUI’ has no member named ‘gotoOverviewPage’ case 10: _t->gotoOverviewPage(); break; ^~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:223:22: error: ‘class BitcoinGUI’ has no member named ‘gotoHistoryPage’ case 11: _t->gotoHistoryPage(); break; ^~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:224:22: error: ‘class BitcoinGUI’ has no member named ‘gotoReceiveCoinsPage’ case 12: _t->gotoReceiveCoinsPage(); break; ^~~~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:225:22: error: ‘class BitcoinGUI’ has no member named ‘gotoSendCoinsPage’ case 13: _t->gotoSendCoinsPage((*reinterpret_cast< QString(*)>(_a[1]))); break; ^~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:226:22: error: ‘class BitcoinGUI’ has no member named ‘gotoSendCoinsPage’ case 14: _t->gotoSendCoinsPage(); break; ^~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:227:22: error: ‘class BitcoinGUI’ has no member named ‘gotoSignMessageTab’ case 15: _t->gotoSignMessageTab((*reinterpret_cast< QString(*)>(_a[1]))); break; ^~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:228:22: error: ‘class BitcoinGUI’ has no member named ‘gotoSignMessageTab’ case 16: _t->gotoSignMessageTab(); break; ^~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:229:22: error: ‘class BitcoinGUI’ has no member named ‘gotoVerifyMessageTab’ case 17: _t->gotoVerifyMessageTab((*reinterpret_cast< QString(*)>(_a[1]))); break; ^~~~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:230:22: error: ‘class BitcoinGUI’ has no member named ‘gotoVerifyMessageTab’ case 18: _t->gotoVerifyMessageTab(); break; ^~~~~~~~~~~~~~~~~~~~ qt/moc_bitcoingui.cpp:231:22: error: ‘class BitcoinGUI’ has no member named ‘openClicked’; did you mean ‘optionsClicked’? case 19: _t->openClicked(); break; ^~~~~~~~~~~ optionsClicked Makefile:7129: recipe for target 'qt/qt_libbitcoinqt_a-moc_bitcoingui.o' failed make[2]: *** [qt/qt_libbitcoinqt_a-moc_bitcoingui.o] Error 1 make[2]: Leaving directory '/home/chris/bitcoin/src' Makefile:9361: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/chris/bitcoin/src' Makefile:746: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1
make clean
然後重建。如果這不起作用,請重新配置 (
./autogen.sh
和./configure
),然後make clean
再重新配置,然後make
.
建構一個帶標籤的版本通常比從可能有額外更改的 master 頂部建構更好。
最近有一些依賴性變化[ 1 ]。
在
/bitcoin
目錄中,您需要:sudo apt install zlib1g-dev git clean -fdx
進入主分支:
git checkout master
拉下目前的主人,包括標籤。根據您的配置方式,如何執行此操作會有所不同,但可能很簡單
git pull origin --tags
然後,您絕對應該查看帶標籤的版本。目前最高標記版本是 v0.16.0 - 您可以檢查存在哪些標記
git tag
- 我通常在分支中這樣做:git checkout v0.16.0 -b v016
然後,按照
/bitcoin/doc/*.md
. 例如,Ubuntu 17.04 在build-unix.md
rel:
[ 1 ] github.com - “好的,我已經確定了問題。這是因為依賴項之一……” - <https://github.com/bitcoin/bitcoin/issues/12515#issuecomment-368283657>