From 8d54d564fa58eb2c8fc6aabfbdf17972ea36c86c Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Tue, 7 Mar 2017 09:35:22 -0600 Subject: [PATCH 01/16] Update --- configure.ac | 3 ++- src/chainparams.cpp | 20 ++++++++++---------- src/rpcrawtransaction.cpp | 2 +- src/util.h | 1 + 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index b0952fc..e81c440 100644 --- a/configure.ac +++ b/configure.ac @@ -338,7 +338,8 @@ fi if test x$use_hardening != xno; then AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) - AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) + #AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) + AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"]) AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[ AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[ diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7b7a527..dd17a9e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -71,11 +71,11 @@ class CMainParams : public CChainParams { vSeeds.push_back(CDNSSeedData("96.67.25.134", "96.67.25.134")); - base58Prefixes[PUBKEY_ADDRESS] = list_of(28); - base58Prefixes[SCRIPT_ADDRESS] = list_of(6); - base58Prefixes[SECRET_KEY] = list_of(186); - base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E); - base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4); + base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,28); + base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,6); + base58Prefixes[SECRET_KEY] = std::vector(1,186); + base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container >(); + base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container >(); // Convert the pnSeeds array into usable address objects. for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++) @@ -133,11 +133,11 @@ class CTestNetParams : public CMainParams { vFixedSeeds.clear(); vSeeds.clear(); - base58Prefixes[PUBKEY_ADDRESS] = list_of(119); - base58Prefixes[SCRIPT_ADDRESS] = list_of(199); - base58Prefixes[SECRET_KEY] = list_of(247); - base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF); - base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94); + base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,119); + base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,199); + base58Prefixes[SECRET_KEY] = std::vector(1,247); + base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container >(); + base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container >(); } virtual Network NetworkID() const { return CChainParams::TESTNET; } }; diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index ffbb66c..e3d2dc6 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -296,7 +296,7 @@ Value listunspent(const Array& params, bool fHelp) CTxDestination address; if (ExtractDestination(pk, address)) { - const CScriptID& hash = boost::get(address); + const CScriptID& hash = boost::get(address); CScript redeemScript; if (pwalletMain->GetCScript(hash, redeemScript)) entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end()))); diff --git a/src/util.h b/src/util.h index 62e6df5..afd0e85 100644 --- a/src/util.h +++ b/src/util.h @@ -30,6 +30,7 @@ #endif #include +#include #include class CNetAddr; From fd076b26612015376fe43969520113f954af5abf Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Tue, 7 Mar 2017 12:21:24 -0600 Subject: [PATCH 02/16] Updated for Ubuntu v16.04 --- doc/build-unix.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index ab5fbad..ddb6bd6 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -1,6 +1,6 @@ UNIX BUILD NOTES ==================== -Some notes on how to build Bitcoin in Unix. +Some notes on how to build C-Note in Unix. To Build --------------------- @@ -9,7 +9,7 @@ To Build ./configure make -This will build bitcoin-qt as well if the dependencies are met. +This will build cnote-qt as well if the dependencies are met. Dependencies --------------------- @@ -59,12 +59,6 @@ for Ubuntu 12.04 and later: sudo apt-get install libboost-all-dev - db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). - You can add the repository using the following command: - - sudo add-apt-repository ppa:bitcoin/bitcoin - sudo apt-get update - Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev, but using these will break binary wallet compatibility, and is not recommended. @@ -83,7 +77,7 @@ To enable the change run sudo apt-get update -for other Ubuntu & Debian: +for other Ubuntu & Debian (Ubuntu 16.04 should follow "Berkeley DB" instructions below): sudo apt-get install libdb4.8-dev sudo apt-get install libdb4.8++-dev @@ -104,7 +98,7 @@ To build with Qt 4 you need the following: sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler -For Qt 5 you need the following: +For Qt 5 you need the following (Omit libqt5core5 AND add protobuf-compiler for Ubuntu 16.04): sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev @@ -112,7 +106,7 @@ libqrencode (optional) can be installed with: sudo apt-get install libqrencode-dev -Once these are installed, they will be found by configure and a bitcoin-qt executable will be +Once these are installed, they will be found by configure and a cnote-qt executable will be built by default. Notes @@ -228,4 +222,3 @@ In this case there is no dependency on Berkeley DB 4.8. Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC call not `getwork`. - From 0204672cb9646ffd2ed56938a9416177d2e722c4 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Tue, 7 Mar 2017 17:12:50 -0600 Subject: [PATCH 03/16] New --- compile-db.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 compile-db.sh diff --git a/compile-db.sh b/compile-db.sh new file mode 100644 index 0000000..d14d273 --- /dev/null +++ b/compile-db.sh @@ -0,0 +1,22 @@ +#!/bin/sh +BITCOIN_ROOT=$(pwd) + +# Pick some path to install BDB to, here we create a directory within the bitcoin directory +BDB_PREFIX="${BITCOIN_ROOT}/db4" +mkdir -p $BDB_PREFIX + +# Fetch the source and verify that it is not tampered with +wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' +echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c +# -> db-4.8.30.NC.tar.gz: OK +tar -xzvf db-4.8.30.NC.tar.gz + +# Build the library and install to our prefix +cd db-4.8.30.NC/build_unix/ +# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime +../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX +make install + +# Configure Bitcoin Core to use our own-built instance of BDB +cd $BITCOIN_ROOT +./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" \ No newline at end of file From d664acd6e5887e067bd232614df8c64881ffab2f Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Tue, 7 Mar 2017 17:51:04 -0600 Subject: [PATCH 04/16] Test --- compile-db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile-db.sh b/compile-db.sh index d14d273..758a740 100644 --- a/compile-db.sh +++ b/compile-db.sh @@ -19,4 +19,4 @@ make install # Configure Bitcoin Core to use our own-built instance of BDB cd $BITCOIN_ROOT -./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" \ No newline at end of file +./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" From 659fcdc1053bb2d4d86640d712f1b39c300ceba6 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Tue, 7 Mar 2017 18:40:26 -0600 Subject: [PATCH 05/16] Delete compile-db.sh --- compile-db.sh | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 compile-db.sh diff --git a/compile-db.sh b/compile-db.sh deleted file mode 100644 index 758a740..0000000 --- a/compile-db.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -BITCOIN_ROOT=$(pwd) - -# Pick some path to install BDB to, here we create a directory within the bitcoin directory -BDB_PREFIX="${BITCOIN_ROOT}/db4" -mkdir -p $BDB_PREFIX - -# Fetch the source and verify that it is not tampered with -wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' -echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c -# -> db-4.8.30.NC.tar.gz: OK -tar -xzvf db-4.8.30.NC.tar.gz - -# Build the library and install to our prefix -cd db-4.8.30.NC/build_unix/ -# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime -../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -make install - -# Configure Bitcoin Core to use our own-built instance of BDB -cd $BITCOIN_ROOT -./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" From 3dbf996e81e26bff3e3d43512909c099a87d61be Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 8 Mar 2017 07:58:11 -0600 Subject: [PATCH 06/16] new file --- compile-db.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 compile-db.sh diff --git a/compile-db.sh b/compile-db.sh new file mode 100755 index 0000000..12c0b28 --- /dev/null +++ b/compile-db.sh @@ -0,0 +1,26 @@ +#!/bin/sh +BITCOIN_ROOT=$(pwd) + +# Pick some path to install BDB to, here we create a directory within the bitcoin directory +BDB_PREFIX="${BITCOIN_ROOT}/db4" +mkdir -p $BDB_PREFIX + +# Fetch the source and verify that it is not tampered with +wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' +echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c +# -> db-4.8.30.NC.tar.gz: OK +tar -xzvf db-4.8.30.NC.tar.gz + +# Build the library and install to our prefix +cd db-4.8.30.NC/build_unix/ +# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime +../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX +make install + +# Configure Bitcoin Core to use our own-built instance of BDB +cd $BITCOIN_ROOT +./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" + +make + + From d11fb0909baf2ad07da20261d3d49ba7c1133c5f Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 8 Mar 2017 10:29:41 -0600 Subject: [PATCH 07/16] added conditional --- compile-db.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compile-db.sh b/compile-db.sh index 12c0b28..2af06a8 100755 --- a/compile-db.sh +++ b/compile-db.sh @@ -5,11 +5,13 @@ BITCOIN_ROOT=$(pwd) BDB_PREFIX="${BITCOIN_ROOT}/db4" mkdir -p $BDB_PREFIX -# Fetch the source and verify that it is not tampered with -wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' -echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c -# -> db-4.8.30.NC.tar.gz: OK -tar -xzvf db-4.8.30.NC.tar.gz +if [ ! -d "db-4.8.30.NC" ]; then + # Fetch the source and verify that it is not tampered with + wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' + echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c + # -> db-4.8.30.NC.tar.gz: OK + tar -xzvf db-4.8.30.NC.tar.gz +fi # Build the library and install to our prefix cd db-4.8.30.NC/build_unix/ @@ -22,5 +24,3 @@ cd $BITCOIN_ROOT ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" make - - From 0931a86253693a76fc77b55ec0781f3ec0437245 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Wed, 8 Mar 2017 11:14:32 -0600 Subject: [PATCH 08/16] Update build-unix.md --- doc/build-unix.md | 84 ++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 48 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index ddb6bd6..c996c20 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -2,14 +2,6 @@ UNIX BUILD NOTES ==================== Some notes on how to build C-Note in Unix. -To Build ---------------------- - - ./autogen.sh - ./configure - make - -This will build cnote-qt as well if the dependencies are met. Dependencies --------------------- @@ -33,13 +25,13 @@ turned off by default. See the configure options for upnp behavior desired: --enable-upnp-default UPnP support turned on by default at runtime Licenses of statically linked libraries: - Berkeley DB New BSD license with additional requirement that linked - software must be free open source + Berkeley DB New BSD license with additional requirement that linked software must be free open source Boost MIT-like license miniupnpc New (3-clause) BSD license - For the versions used in the release, see doc/release-process.md under *Fetch and build inputs*. + System requirements -------------------- @@ -47,6 +39,7 @@ C++ compilers are memory-hungry. It is recommended to have at least 1 GB of memory available when compiling Bitcoin Core. With 512MB of memory or less compilation will take much longer due to swap thrashing. + Dependency Build Instructions: Ubuntu & Debian ---------------------------------------------- Build requirements: @@ -77,15 +70,11 @@ To enable the change run sudo apt-get update -for other Ubuntu & Debian (Ubuntu 16.04 should follow "Berkeley DB" instructions below): - - sudo apt-get install libdb4.8-dev - sudo apt-get install libdb4.8++-dev - Optional: sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default) + Dependencies for the GUI: Ubuntu & Debian ----------------------------------------- @@ -98,9 +87,10 @@ To build with Qt 4 you need the following: sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler -For Qt 5 you need the following (Omit libqt5core5 AND add protobuf-compiler for Ubuntu 16.04): +For Qt 5 you need the following: - sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev + sudo apt-get install libqt5core5 (<--This wasn't required for 14.04 and 16.04) + sudo apt-get install libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode (optional) can be installed with: @@ -109,37 +99,26 @@ libqrencode (optional) can be installed with: Once these are installed, they will be found by configure and a cnote-qt executable will be built by default. -Notes ------ -The release is built with GCC and then "strip bitcoind" to strip the debug -symbols, which reduces the executable size by about 90%. - - -miniupnpc ---------- - tar -xzvf miniupnpc-1.6.tar.gz - cd miniupnpc-1.6 - make - sudo su - make install - Berkeley DB ----------- It is recommended to use Berkeley DB 4.8. If you have to build it yourself: -```bash +-- Contents of compile-db.sh which is located in the repository root ---------- +#!/bin/sh BITCOIN_ROOT=$(pwd) # Pick some path to install BDB to, here we create a directory within the bitcoin directory BDB_PREFIX="${BITCOIN_ROOT}/db4" mkdir -p $BDB_PREFIX -# Fetch the source and verify that it is not tampered with -wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' -echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c -# -> db-4.8.30.NC.tar.gz: OK -tar -xzvf db-4.8.30.NC.tar.gz +if [ ! -d "db-4.8.30.NC" ]; then + # Fetch the source and verify that it is not tampered with + wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' + echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c + # -> db-4.8.30.NC.tar.gz: OK + tar -xzvf db-4.8.30.NC.tar.gz +fi # Build the library and install to our prefix cd db-4.8.30.NC/build_unix/ @@ -149,18 +128,12 @@ make install # Configure Bitcoin Core to use our own-built instance of BDB cd $BITCOIN_ROOT -./configure (other args...) LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -``` +./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" -**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). +make +------------------------------------------------------------------------------- -Boost ------ -If you need to build Boost yourself: - - sudo su - ./bootstrap.sh - ./bjam install +**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). Security @@ -174,7 +147,6 @@ Hardening Flags: ./configure --enable-hardening ./configure --disable-hardening - Hardening enables the following features: * Position Independent Executable @@ -211,6 +183,7 @@ Hardening enables the following features: The STK RW- means that the stack is readable and writeable but not executable. + Disable-wallet mode -------------------- When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in @@ -222,3 +195,18 @@ In this case there is no dependency on Berkeley DB 4.8. Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC call not `getwork`. + + +Notes +----- +The release is built with GCC and then "strip bitcoind" to strip the debug +symbols, which reduces the executable size by about 90%. + +To Build +--------------------- + + ./autogen.sh + ./compile-db.sh + ./src/qt/cnote-qt + +This will build cnote-qt as well if the dependencies are met. From 8aee44e9e7420c2682864ab43e2bc831fb9f11fb Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Wed, 8 Mar 2017 11:17:44 -0600 Subject: [PATCH 09/16] Update build-unix.md --- doc/build-unix.md | 57 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index c996c20..b17949d 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -104,34 +104,35 @@ Berkeley DB ----------- It is recommended to use Berkeley DB 4.8. If you have to build it yourself: --- Contents of compile-db.sh which is located in the repository root ---------- -#!/bin/sh -BITCOIN_ROOT=$(pwd) - -# Pick some path to install BDB to, here we create a directory within the bitcoin directory -BDB_PREFIX="${BITCOIN_ROOT}/db4" -mkdir -p $BDB_PREFIX - -if [ ! -d "db-4.8.30.NC" ]; then - # Fetch the source and verify that it is not tampered with - wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' - echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c - # -> db-4.8.30.NC.tar.gz: OK - tar -xzvf db-4.8.30.NC.tar.gz -fi - -# Build the library and install to our prefix -cd db-4.8.30.NC/build_unix/ -# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime -../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -make install - -# Configure Bitcoin Core to use our own-built instance of BDB -cd $BITCOIN_ROOT -./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" - -make -------------------------------------------------------------------------------- + -- Contents of compile-db.sh which is located in the repository root ---------- + #!/bin/sh + BITCOIN_ROOT=$(pwd) + + # Pick some path to install BDB to, here we create a directory within the bitcoin directory + BDB_PREFIX="${BITCOIN_ROOT}/db4" + mkdir -p $BDB_PREFIX + + if [ ! -d "db-4.8.30.NC" ]; then + # Fetch the source and verify that it is not tampered with + wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' + echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c + # -> db-4.8.30.NC.tar.gz: OK + tar -xzvf db-4.8.30.NC.tar.gz + fi + + # Build the library and install to our prefix + cd db-4.8.30.NC/build_unix/ + # Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime + ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX + make install + + # Configure Bitcoin Core to use our own-built instance of BDB + cd $BITCOIN_ROOT + ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" + + make + ------------------------------------------------------------------------------- + **Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). From 13c0879eef8ff6465a475e557241c59438274d99 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Wed, 8 Mar 2017 14:31:27 -0600 Subject: [PATCH 10/16] Update build-unix.md From 0d05f57ef5c2eb617595aa4d727aaac6249e7177 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Wed, 8 Mar 2017 14:44:08 -0600 Subject: [PATCH 11/16] Update --- compile-db.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compile-db.sh b/compile-db.sh index 2af06a8..cf5a971 100755 --- a/compile-db.sh +++ b/compile-db.sh @@ -11,16 +11,16 @@ if [ ! -d "db-4.8.30.NC" ]; then echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c # -> db-4.8.30.NC.tar.gz: OK tar -xzvf db-4.8.30.NC.tar.gz -fi -# Build the library and install to our prefix -cd db-4.8.30.NC/build_unix/ -# Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime -../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -make install + # Build the library and install to our prefix + cd db-4.8.30.NC/build_unix/ + # Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime + ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX + make install + cd $BITCOIN_ROOT +fi # Configure Bitcoin Core to use our own-built instance of BDB -cd $BITCOIN_ROOT ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" make From de265d0ea042ee3e7e4e6fd3a59abd09ca36387e Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Wed, 8 Mar 2017 14:46:24 -0600 Subject: [PATCH 12/16] Updated --- doc/build-unix.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index b17949d..48eea83 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -118,16 +118,15 @@ It is recommended to use Berkeley DB 4.8. If you have to build it yourself: echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c # -> db-4.8.30.NC.tar.gz: OK tar -xzvf db-4.8.30.NC.tar.gz + # Build the library and install to our prefix + cd db-4.8.30.NC/build_unix/ + # Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime + ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX + make install + cd $BITCOIN_ROOT fi - - # Build the library and install to our prefix - cd db-4.8.30.NC/build_unix/ - # Note: Do a static build so that it can be embedded into the exectuable, instead of having to find a .so at runtime - ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX - make install - + # Configure Bitcoin Core to use our own-built instance of BDB - cd $BITCOIN_ROOT ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" make From e0be9c96ca52f28352ad8b9ab692fa1c4ee4a828 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Thu, 9 Mar 2017 09:14:40 -0600 Subject: [PATCH 13/16] Added stripping --- compile-db.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compile-db.sh b/compile-db.sh index cf5a971..4919652 100755 --- a/compile-db.sh +++ b/compile-db.sh @@ -24,3 +24,6 @@ fi ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" make +strip src/cnote-cli +strip src/cnoted +strip src/qt/cnote-qt From d28c425758e1f98b8bdbba824fd15661ba737d38 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Sun, 12 Mar 2017 11:04:26 -0500 Subject: [PATCH 14/16] Update --- configure.ac | 2 +- contrib/bitcoin-qt.pro | 438 +++++++++++++++++++++++++++++++++++++++-- src/leveldbwrapper.cpp | 2 +- 3 files changed, 421 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index e81c440..a295897 100644 --- a/configure.ac +++ b/configure.ac @@ -604,7 +604,7 @@ else AC_MSG_RESULT($use_upnp_default) AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state]) if test x$TARGET_OS = xwindows; then - CPPFLAGS="$CPPFLAGS -DSTATICLIB" + CPPFLAGS="$CPPFLAGS -DMINIUPNP_STATICLIB" fi else AC_MSG_RESULT(no) diff --git a/contrib/bitcoin-qt.pro b/contrib/bitcoin-qt.pro index 3a72d10..0600eed 100644 --- a/contrib/bitcoin-qt.pro +++ b/contrib/bitcoin-qt.pro @@ -1,21 +1,421 @@ -FORMS += \ - ../src/qt/forms/aboutdialog.ui \ - ../src/qt/forms/addressbookpage.ui \ - ../src/qt/forms/askpassphrasedialog.ui \ - ../src/qt/forms/coincontroldialog.ui \ - ../src/qt/forms/editaddressdialog.ui \ - ../src/qt/forms/helpmessagedialog.ui \ - ../src/qt/forms/intro.ui \ - ../src/qt/forms/openuridialog.ui \ - ../src/qt/forms/optionsdialog.ui \ - ../src/qt/forms/overviewpage.ui \ - ../src/qt/forms/receivecoinsdialog.ui \ - ../src/qt/forms/receiverequestdialog.ui \ - ../src/qt/forms/rpcconsole.ui \ - ../src/qt/forms/sendcoinsdialog.ui \ - ../src/qt/forms/sendcoinsentry.ui \ - ../src/qt/forms/signverifymessagedialog.ui \ - ../src/qt/forms/transactiondescdialog.ui \ +TEMPLATE = app +TARGET = cnote-qt +VERSION = 2.0.0.0 +INCLUDEPATH += src src/json src/qt +QT += network +DEFINES += ENABLE_WALLET +DEFINES += BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE +CONFIG += no_include_pwd +CONFIG += thread + +greaterThan(QT_MAJOR_VERSION, 4) { + QT += widgets + DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 +} + +# for boost 1.37, add -mt to the boost libraries +# use: qmake BOOST_LIB_SUFFIX=-mt +# for boost thread win32 with _win32 sufix +# use: BOOST_THREAD_LIB_SUFFIX=_win32-... +# or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8 + +# Dependency library locations can be customized with: +# BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH, +# BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively + +OBJECTS_DIR = build +MOC_DIR = build +UI_DIR = build + +# use: qmake "RELEASE=1" +contains(RELEASE, 1) { + # Mac: compile for maximum compatibility (10.5, 32-bit) + macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk + + !windows:!macx { + # Linux: static link + LIBS += -Wl,-Bstatic + } +} + +!win32 { +# for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection +QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 +QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1 +# We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable! +# This can be enabled for Windows, when we switch to MinGW >= 4.4.x. +} +# for extra security on Windows: enable ASLR and DEP via GCC linker flags +win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat +win32:QMAKE_LFLAGS += -static-libgcc -static-libstdc++ + +# use: qmake "USE_QRCODE=1" +# libqrencode (http://fukuchi.org/works/qrencode/index.en.html) must be installed for support +contains(USE_QRCODE, 1) { + message(Building with QRCode support) + DEFINES += USE_QRCODE + LIBS += -lqrencode +} + +# use: qmake "USE_UPNP=1" ( enabled by default; default) +# or: qmake "USE_UPNP=0" (disabled by default) +# or: qmake "USE_UPNP=-" (not supported) +# miniupnpc (http://miniupnp.free.fr/files/) must be installed for support +contains(USE_UPNP, -) { + message(Building without UPNP support) +} else { + message(Building with UPNP support) + count(USE_UPNP, 0) { + USE_UPNP=1 + } + DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB STATICLIB + INCLUDEPATH += $$MINIUPNPC_INCLUDE_PATH + LIBS += $$join(MINIUPNPC_LIB_PATH,,-L,) -lminiupnpc + win32:LIBS += -liphlpapi +} + +# use: qmake "USE_DBUS=1" or qmake "USE_DBUS=0" +linux:count(USE_DBUS, 0) { + USE_DBUS=1 +} +contains(USE_DBUS, 1) { + message(Building with DBUS (Freedesktop notifications) support) + DEFINES += USE_DBUS + QT += dbus +} + +contains(BITCOIN_NEED_QT_PLUGINS, 1) { + DEFINES += BITCOIN_NEED_QT_PLUGINS + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets +} + +INCLUDEPATH += src/leveldb/include src/leveldb/helpers +LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a +# SOURCES += src/txdb-leveldb.cpp +SOURCES += src/leveldbwrapper.cpp +!win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a +} else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi + genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a +} +genleveldb.target = $$PWD/src/leveldb/libleveldb.a +genleveldb.depends = FORCE +PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a +QMAKE_EXTRA_TARGETS += genleveldb +# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean + +# regenerate src/build.h +!windows|contains(USE_BUILD_INFO, 1) { + genbuild.depends = FORCE + genbuild.commands = cd $$PWD; /bin/sh share/genbuild.sh $$OUT_PWD/build/build.h + genbuild.target = $$OUT_PWD/build/build.h + PRE_TARGETDEPS += $$OUT_PWD/build/build.h + QMAKE_EXTRA_TARGETS += genbuild + DEFINES += HAVE_BUILD_INFO +} + +contains(USE_O3, 1) { + message(Building O3 optimization flag) + QMAKE_CXXFLAGS_RELEASE -= -O2 + QMAKE_CFLAGS_RELEASE -= -O2 + QMAKE_CXXFLAGS += -O3 + QMAKE_CFLAGS += -O3 +} + +*-g++-32 { + message("32 platform, adding -msse2 flag") + + QMAKE_CXXFLAGS += -msse2 + QMAKE_CFLAGS += -msse2 +} + +QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector + +# Input +DEPENDPATH += src src/json src/qt +HEADERS += \ + src/qt/bitcoingui.h \ + src/qt/transactiontablemodel.h \ + src/qt/addresstablemodel.h \ + src/qt/optionsdialog.h \ + src/qt/coincontroldialog.h \ + src/qt/coincontroltreewidget.h \ + src/qt/sendcoinsdialog.h \ + src/qt/addressbookpage.h \ + src/qt/signverifymessagedialog.h \ + src/qt/editaddressdialog.h \ + src/qt/bitcoinaddressvalidator.h \ + src/alert.h \ + src/addrman.h \ + src/base58.h \ + src/bignum.h \ + src/chainparams.h \ + src/checkpoints.h \ + src/compat.h \ + src/coincontrol.h \ + src/sync.h \ + src/util.h \ + src/hash.h \ + src/uint256.h \ + src/serialize.h \ + src/core.h \ + src/main.h \ + src/miner.h \ + src/net.h \ + src/key.h \ + src/db.h \ + src/txdb.h \ + src/txmempool.h \ + src/walletdb.h \ + src/script.h \ + src/init.h \ + src/mruset.h \ + src/json/json_spirit_writer_template.h \ + src/json/json_spirit_writer.h \ + src/json/json_spirit_value.h \ + src/json/json_spirit_utils.h \ + src/json/json_spirit_stream_reader.h \ + src/json/json_spirit_reader_template.h \ + src/json/json_spirit_reader.h \ + src/json/json_spirit_error_position.h \ + src/json/json_spirit.h \ + src/qt/clientmodel.h \ + src/qt/guiutil.h \ + src/qt/transactionrecord.h \ + src/qt/guiconstants.h \ + src/qt/optionsmodel.h \ + src/qt/monitoreddatamapper.h \ + src/qt/trafficgraphwidget.h \ + src/qt/transactiondesc.h \ + src/qt/transactiondescdialog.h \ + src/qt/bitcoinamountfield.h \ + src/wallet.h \ + src/keystore.h \ + src/qt/transactionfilterproxy.h \ + src/qt/transactionview.h \ + src/qt/walletmodel.h \ + src/rpcclient.h \ + src/rpcprotocol.h \ + src/rpcserver.h \ + src/qt/overviewpage.h \ + src/qt/csvmodelwriter.h \ + src/crypter.h \ + src/qt/sendcoinsentry.h \ + src/qt/qvalidatedlineedit.h \ + src/qt/bitcoinunits.h \ + src/qt/qvaluecombobox.h \ + src/qt/askpassphrasedialog.h \ + src/protocol.h \ + src/qt/notificator.h \ + src/qt/paymentserver.h \ + src/allocators.h \ + src/ui_interface.h \ + src/qt/rpcconsole.h \ + src/version.h \ + src/netbase.h \ + src/clientversion.h \ + src/threadsafety.h \ + src/tinyformat.h + +SOURCES += \ + src/qt/bitcoin.cpp \ + src/qt/bitcoingui.cpp \ + src/qt/transactiontablemodel.cpp \ + src/qt/addresstablemodel.cpp \ + src/qt/optionsdialog.cpp \ + src/qt/sendcoinsdialog.cpp \ + src/qt/coincontroldialog.cpp \ + src/qt/coincontroltreewidget.cpp \ + src/qt/addressbookpage.cpp \ + src/qt/signverifymessagedialog.cpp \ + src/qt/editaddressdialog.cpp \ + src/qt/bitcoinaddressvalidator.cpp \ + src/alert.cpp \ + src/chainparams.cpp \ + src/version.cpp \ + src/sync.cpp \ + src/txmempool.cpp \ + src/util.cpp \ + src/hash.cpp \ + src/netbase.cpp \ + src/key.cpp \ + src/script.cpp \ + src/core.cpp \ + src/main.cpp \ + src/miner.cpp \ + src/init.cpp \ + src/net.cpp \ + src/checkpoints.cpp \ + src/addrman.cpp \ + src/db.cpp \ + src/walletdb.cpp \ + src/qt/clientmodel.cpp \ + src/qt/guiutil.cpp \ + src/qt/transactionrecord.cpp \ + src/qt/optionsmodel.cpp \ + src/qt/monitoreddatamapper.cpp \ + src/qt/trafficgraphwidget.cpp \ + src/qt/transactiondesc.cpp \ + src/qt/transactiondescdialog.cpp \ + src/qt/bitcoinstrings.cpp \ + src/qt/bitcoinamountfield.cpp \ + src/wallet.cpp \ + src/keystore.cpp \ + src/qt/transactionfilterproxy.cpp \ + src/qt/transactionview.cpp \ + src/qt/walletmodel.cpp \ + src/rpcclient.cpp \ + src/rpcprotocol.cpp \ + src/rpcserver.cpp \ + src/rpcdump.cpp \ + src/rpcmisc.cpp \ + src/rpcnet.cpp \ + src/rpcmining.cpp \ + src/rpcwallet.cpp \ + src/rpcblockchain.cpp \ + src/rpcrawtransaction.cpp \ + src/qt/overviewpage.cpp \ + src/qt/csvmodelwriter.cpp \ + src/crypter.cpp \ + src/qt/sendcoinsentry.cpp \ + src/qt/qvalidatedlineedit.cpp \ + src/qt/bitcoinunits.cpp \ + src/qt/qvaluecombobox.cpp \ + src/qt/askpassphrasedialog.cpp \ + src/protocol.cpp \ + src/qt/notificator.cpp \ + src/qt/paymentserver.cpp \ + src/qt/rpcconsole.cpp \ + src/noui.cpp RESOURCES += \ - ../src/qt/bitcoin.qrc + src/qt/bitcoin.qrc + +FORMS += \ + src/qt/forms/coincontroldialog.ui \ + src/qt/forms/sendcoinsdialog.ui \ + src/qt/forms/addressbookpage.ui \ + src/qt/forms/signverifymessagedialog.ui \ + src/qt/forms/aboutdialog.ui \ + src/qt/forms/editaddressdialog.ui \ + src/qt/forms/transactiondescdialog.ui \ + src/qt/forms/overviewpage.ui \ + src/qt/forms/sendcoinsentry.ui \ + src/qt/forms/askpassphrasedialog.ui \ + src/qt/forms/rpcconsole.ui \ + src/qt/forms/optionsdialog.ui + +contains(USE_QRCODE, 1) { +HEADERS += src/qt/qrcodedialog.h +SOURCES += src/qt/qrcodedialog.cpp +FORMS += src/qt/forms/qrcodedialog.ui +} + +CODECFORTR = UTF-8 + +# for lrelease/lupdate +# also add new translations to src/qt/bitcoin.qrc under translations/ +TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) + +isEmpty(QMAKE_LRELEASE) { + win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe + else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease +} +isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale +# automatically build translations, so they can be included in resource file +TSQM.name = lrelease ${QMAKE_FILE_IN} +TSQM.input = TRANSLATIONS +TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm +TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +TSQM.CONFIG = no_link +QMAKE_EXTRA_COMPILERS += TSQM + +# "Other files" to show in Qt Creator +OTHER_FILES += \ + doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt-res.rc + +# platform specific defaults, if not overridden on command line +isEmpty(BOOST_LIB_SUFFIX) { + macx:BOOST_LIB_SUFFIX = -mt + windows:BOOST_LIB_SUFFIX = -mt +} + +isEmpty(BOOST_THREAD_LIB_SUFFIX) { + win32:BOOST_THREAD_LIB_SUFFIX = _win32$$BOOST_LIB_SUFFIX + else:BOOST_THREAD_LIB_SUFFIX = $$BOOST_LIB_SUFFIX +} + +isEmpty(BDB_LIB_PATH) { + macx:BDB_LIB_PATH = /opt/local/lib/db48 +} + +isEmpty(BDB_LIB_SUFFIX) { + macx:BDB_LIB_SUFFIX = -4.8 +} + +isEmpty(BDB_INCLUDE_PATH) { + macx:BDB_INCLUDE_PATH = /opt/local/include/db48 +} + +isEmpty(BOOST_LIB_PATH) { + macx:BOOST_LIB_PATH = /opt/local/lib +} + +isEmpty(BOOST_INCLUDE_PATH) { + macx:BOOST_INCLUDE_PATH = /opt/local/include +} + +windows:DEFINES += WIN32 +windows:RC_FILE = src/qt/res/bitcoin-qt-res.rc + +windows:!contains(MINGW_THREAD_BUGFIX, 0) { + # At least qmake's win32-g++-cross profile is missing the -lmingwthrd + # thread-safety flag. GCC has -mthreads to enable this, but it doesn't + # work with static linking. -lmingwthrd must come BEFORE -lmingw, so + # it is prepended to QMAKE_LIBS_QT_ENTRY. + # It can be turned off with MINGW_THREAD_BUGFIX=0, just in case it causes + # any problems on some untested qmake profile now or in the future. + DEFINES += _MT BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN + QMAKE_LIBS_QT_ENTRY = -lmingwthrd $$QMAKE_LIBS_QT_ENTRY +} + +macx:HEADERS += src/qt/macdockiconhandler.h +macx:OBJECTIVE_SOURCES += src/qt/macdockiconhandler.mm +macx:LIBS += -framework Foundation -framework ApplicationServices -framework AppKit +macx:DEFINES += MAC_OSX MSG_NOSIGNAL=0 +macx:ICON = src/qt/res/icons/bitcoin.icns +macx:TARGET = "CNote-Qt" +macx:QMAKE_CFLAGS_THREAD += -pthread +macx:QMAKE_LFLAGS_THREAD += -pthread +macx:QMAKE_CXXFLAGS_THREAD += -pthread +macx:QMAKE_INFO_PLIST = share/qt/Info.plist + +# Set libraries and includes at end, to use platform-defined defaults if not overridden +INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH +LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,) +LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX +# -lgdi32 has to happen after -lcrypto (see #681) +windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 +LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX +windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX + +contains(RELEASE, 1) { + !windows:!macx { + # Linux: turn dynamic linking back on for c/c++ runtime libraries + LIBS += -Wl,-Bdynamic + } +} + +!windows:!macx { + DEFINES += LINUX + LIBS += -lrt -ldl +} + +system($$QMAKE_LRELEASE -silent $$_PRO_FILE_) \ No newline at end of file diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp index fdae0b4..cedf63c 100644 --- a/src/leveldbwrapper.cpp +++ b/src/leveldbwrapper.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include void HandleError(const leveldb::Status &status) throw(leveldb_error) { if (status.ok()) From ce890d33928b0fd477b50acc57f59497a0fef695 Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Sun, 12 Mar 2017 13:29:45 -0500 Subject: [PATCH 15/16] Updated version to 2.1.0.3 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a295897..ac1b08f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 2) -define(_CLIENT_VERSION_MINOR, 0) +define(_CLIENT_VERSION_MINOR, 1) define(_CLIENT_VERSION_REVISION, 0) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 3) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2017) AC_INIT([C-Note],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@fastbit.com],[c-note]) From 60d388bde5846d3b7a7850c65a23ea5b27f05a3f Mon Sep 17 00:00:00 2001 From: jcaferjr Date: Mon, 13 Mar 2017 18:49:20 -0500 Subject: [PATCH 16/16] Update --- configure.ac | 3 +-- src/clientversion.h | 4 ++-- src/qt/bitcoingui.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index ac1b08f..9c47aac 100644 --- a/configure.ac +++ b/configure.ac @@ -338,8 +338,7 @@ fi if test x$use_hardening != xno; then AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"]) - #AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) - AX_CHECK_COMPILE_FLAG([-fPIC],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIC"]) + AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"]) AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[ AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[ diff --git a/src/clientversion.h b/src/clientversion.h index cf108c0..cc2af17 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -10,9 +10,9 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 2 -#define CLIENT_VERSION_MINOR 0 +#define CLIENT_VERSION_MINOR 1 #define CLIENT_VERSION_REVISION 0 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 3 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 23184cd..a4e9b4a 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -304,7 +304,7 @@ void BitcoinGUI::createActions(bool fIsTestnet) usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); - openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); + openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_DesktopIcon), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a c-note: URI or payment request")); showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);