Commit graph

492 commits

Author SHA1 Message Date
Luke Dashjr 8ac34140d5 configure: bitcoin-tx doesn't need libevent, so don't pull it in 2019-01-12 13:10:22 +00:00
MarcoFalke fad058a79f
build: Allow to configure --with-sanitizers=fuzzer 2019-01-05 19:06:03 +01:00
Emil Engler ae5594d51b [Trivial] Update license year range to 2019
Update year range
2018-12-31 04:27:59 +01:00
MarcoFalke 23a1fa0248
Merge #14564: Adjust configure so that only bip70 is disabled when protobuf is missing instead of the GUI
58c5cc9ce7 Adjust configure so that only bip70 is disabled when protobuf is missing instead of the GUI (James Hilliard)

Pull request description:

  This change ensures that the GUI is still built even if protobuf is missing unless --enable-bip70 is passed to configure. If protobuf is present bip70 support will be compiled in unless --disable-bip70 is passed.

Tree-SHA512: 432d2fbefec5436503d8aa8994e4efaf760d88bfd5249af031b502b356852e8fd56362f86420f9ffe78498649079d0f1b68c327960b215d83c275800626ad275
2018-12-06 13:50:52 -05:00
James Hilliard 58c5cc9ce7 Adjust configure so that only bip70 is disabled when protobuf is missing instead of the GUI 2018-11-10 14:39:35 -07:00
Andrew Chow 04b0bc7425 build: include rc number in version number 2018-10-30 15:02:26 -04:00
Andrew Chow 895e6bbb22 build: if VERSION_BUILD is non-zero, include it in the package version
When the build number (CLIENT_VERSION_BUILD) is non-zero, we want
to include that in the package version number so the resulting binaries
are named with the correct version.
2018-10-30 14:51:33 -04:00
Wladimir J. van der Laan 9dcf6c0dfe build: Add --disable-bip70 configure option
This patch adds a --disable-bip70 configure option that disables BIP70
payment request support. When disabled, this removes the dependency of
the GUI on OpenSSL and Protobuf.
2018-10-09 03:36:14 -06:00
Luke Dashjr 92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx 2018-09-13 11:48:23 +00:00
Wladimir J. van der Laan 7c7bb6e772
Merge #14127: build: avoid getifaddrs when unavailable
9256f7d13f build: avoid getifaddrs when unavailable (Cory Fields)

Pull request description:

  These changes from @theuni help building when targeting platforms that don't always have getifaddrs available like Android < 24

Tree-SHA512: dbfeb83297bd6f00b7991f53eef8a04948d2d739bf47c0524d9ae5335b843b8a5c06ff98c109fe5e6192665e6d0cf58700b8aa7e2a0b410281d3c052881973ff
2018-09-10 18:08:05 +02:00
Cory Fields 9256f7d13f
build: avoid getifaddrs when unavailable 2018-09-01 15:25:03 +02:00
Chris Stewart b2f49bd732 Integration of property based testing into Bitcoin Core
update copyright headers

attempt to fix linting errors

Fixing issue with make check classifying generator files as actual unit tests

Wrapping gen files in ENABLE_PROPERTY_TESTS macro

Make macro better
2018-08-27 08:51:51 -05:00
MarcoFalke 3bd25c010c
Merge #13899: build: Enable -Wredundant-decls where available. Remove redundant redeclarations.
d56b73f217 Remove redundant extern (practicalswift)
f04bb1361c Enable -Wredundant-decls (gcc) if available (practicalswift)
a9e90e5002 Remove redundant redeclaration of rescanblockchain(...) in same scope (practicalswift)

Pull request description:

  Remove redundant redeclaration of `rescanblockchain` and enable `-Wredundant-decls` (gcc) where available to avoid accidental redundant redeclarations.

  ```
   CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
  wallet/rpcwallet.cpp:4764:17: warning: redundant redeclaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’ in same scope [-Wredundant-decls]
   extern UniValue rescanblockchain(const JSONRPCRequest& request);
                   ^~~~~~~~~~~~~~~~
  wallet/rpcwallet.cpp:3929:10: note: previous declaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’
   UniValue rescanblockchain(const JSONRPCRequest& request)
            ^~~~~~~~~~~~~~~~
  ```

Tree-SHA512: b9af95fa53f494c3f6702e485956b66b042d2ff7578b4a53bf28e91aa844cdcf5d7ac3e2e710948eed566007324e81317304b8eabf2d4ea284cd6acd77f8ffcd
2018-08-13 09:55:35 -04:00
Wladimir J. van der Laan 58efc49b95
build: bump version to 0.17.99
Now that 0.17 branch has been split off, master is 0.17.99 (pre-0.18).

Also clean out release notes.

Tree-SHA512: bb20025d3ead3346afc7a6a51af715783e705e1de9d1b90ced6423d8969d64e42b72d06a1eb853083b11e9cfe674775266792ae2cd18ed6c858938e125edab03
2018-08-13 15:38:28 +02:00
practicalswift f04bb1361c Enable -Wredundant-decls (gcc) if available 2018-08-06 23:53:01 +02:00
Luke Dashjr 4207c1b35c configure: Initialise assembly enable_* variables 2018-07-28 19:34:49 +00:00
Luke Dashjr afe0875577 configure: Skip assembly support checks, when assembly is disabled 2018-07-28 19:34:36 +00:00
Luke Dashjr d8ab8dc12d configure: Invert --enable-asm help string since default is now enabled 2018-07-28 19:33:37 +00:00
Wladimir J. van der Laan 2dc5ab6378
Merge #13482: Remove boost::program_options dependency
f447a0a707 Remove program options from build system (Chun Kuan Lee)
11588c639e Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from #12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
2018-07-20 16:45:44 +02:00
Chun Kuan Lee f447a0a707 Remove program options from build system 2018-07-18 02:48:34 +00:00
Cory Fields 768981c93d build: add missing leveldb defines
src/leveldb/build_detect_platform shows how upstream defines them.

These platform may not be able to fully build or run Bitcoin, but defining all
known to leveldb saves future hassle.

Now that all possible platforms are enumerated, specifying an unknown one is an
error.
2018-07-13 16:47:19 -04:00
Wladimir J. van der Laan dcb154e5aa
Merge #13177: GCC-7 and glibc-2.27 back compat code
253f592909 Add stdin, stdout, stderr to ignored export list (Chun Kuan Lee)
fc6a9f2ab1 Use IN6ADDR_ANY_INIT instead of in6addr_any (Cory Fields)
908c1d7745 GCC-7 and glibc-2.27 compat code (Chun Kuan Lee)

Pull request description:

  The `__divmoddi4` code was modified from https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c . I manually find the older glibc version of log2f by objdump, use `.symver` to specify the certain version.

Tree-SHA512: e8d875652003618c73e019ccc420e7a25d46f4eaff1c7a1a6bfc1770b3b46f074b368b2cb14df541b5ab124cca41dede4e28fe863a670589b834ef6b8713f9c4
2018-07-12 17:46:29 +02:00
Wladimir J. van der Laan 3a3eabef40
Merge #13386: SHA256 implementations based on Intel SHA Extensions
66b2cf1ccf Use immintrin.h everywhere for intrinsics (Pieter Wuille)
4c935e2eee Add SHA256 implementation using using Intel SHA intrinsics (Pieter Wuille)
268400d318 [Refactor] CPU feature detection logic for SHA256 (Pieter Wuille)

Pull request description:

  Based on #13191.

  This adds SHA256 implementations that use Intel's SHA Extension instructions (using intrinsics). This needs GCC 4.9 or Clang 3.4.

  In addition to #13191, two extra implementations are provided:
  * (a) A variable-length SHA256 implementation using SHA extensions.
  * (b) A 2-way 64-byte input double-SHA256 implementation using SHA extensions.

  Benchmarks for 9001-element Merkle tree root computation on an AMD Ryzen 1800X system:
  * Using generic C++ code (pre-#10821): 6.1ms
  * Using SSE4 (master, #10821): 4.6ms
  * Using 4-way SSE4 specialized for 64-byte inputs (#13191): 2.8ms
  * Using 8-way AVX2 specialized for 64-byte inputs (#13191): 2.1ms
  * Using 2-way SHA-NI specialized for 64-byte inputs (this PR): 0.56ms

  Benchmarks for 32-byte SHA256 on the same system:
  * Using SSE4 (master, #10821): 190ns
  * Using SHA-NI (this PR): 53ns

  Benchmarks for 1000000-byte SHA256 on the same system:
  * Using SSE4 (master, #10821): 2.5ms
  * Using SHA-NI (this PR): 0.51ms

Tree-SHA512: 2b319e33b22579f815d91f9daf7994a5e1e799c4f73c13e15070dd54ba71f3f6438ccf77ae9cbd1ce76f972d9cbeb5f0edfea3d86f101bbc1055db70e42743b7
2018-07-09 21:17:18 +02:00
Chun Kuan Lee 49d1f4cdde Detect if char equals int8_t 2018-07-01 15:37:28 +00:00
Pieter Wuille 66b2cf1ccf Use immintrin.h everywhere for intrinsics 2018-06-26 10:11:08 -07:00
Pieter Wuille 4c935e2eee Add SHA256 implementation using using Intel SHA intrinsics 2018-06-26 10:11:08 -07:00
practicalswift 94e52d13db Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used 2018-06-24 20:35:27 +02:00
Wladimir J. van der Laan 31145a3d7c
Merge #13480: Avoid copies in range-for loops and add a warning to detect them
d92204c900 build: add warning to detect hidden copies in range-for loops (Cory Fields)
466e16e0e8 cleanup: avoid hidden copies in range-for loops (Cory Fields)

Pull request description:

  Following-up on #13241, which was itself a follow-up of #12169.

  See title. Fixing these would otherwise be a continuous process, adding the warning should keep them from cropping up.

  Note that the warning seems to be Clang-only for now.

Tree-SHA512: ccfb769c3128b3f92c95715abcf21ee2496fe2aa384f80efead1529a28eeb56b98995b531b49a089f8142601389e63f7bb935963d724eacde4f5e1b4a024934b
2018-06-24 16:36:40 +02:00
Cory Fields d92204c900 build: add warning to detect hidden copies in range-for loops 2018-06-15 13:40:07 -04:00
Wladimir J. van der Laan bad068ad9f build: Build system changes to support only Qt5 2018-06-13 18:15:47 +02:00
Wladimir J. van der Laan 8eb76f3958
Merge #13445: build: Reset default -g -O2 flags when enable debug
9882d1f044 Reset default -g -O2 flags when enable debug (Chun Kuan Lee)

Pull request description:

  The default CXXFLAGS is -g -O2, this should not appear when enable debug.
  fixes #13432

Tree-SHA512: 79447f3e1fab9e6cd12f5ca49b3d42187e856e0c159ed01140ea93d6ef1fbb1af3d65b338308566330491052c0177d12abe26796513502ddde31692665a0dbb4
2018-06-13 15:49:10 +02:00
Chun Kuan Lee 9882d1f044 Reset default -g -O2 flags when enable debug 2018-06-12 07:51:56 +00:00
Ben Woosley 51cd508e2f
When build fails due to lib missing, indicate which one
A failure of "lib missing" has limited utility.
2018-06-11 13:27:44 -07:00
Wladimir J. van der Laan 0de7cc848e
Merge #13191: Specialized double-SHA256 with 64 byte inputs with SSE4.1 and AVX2
4defdfab94 [MOVEONLY] Move unused Merkle branch code to tests (Pieter Wuille)
4437d6e1f3 8-way AVX2 implementation for double SHA256 on 64-byte inputs (Pieter Wuille)
230294bf5f 4-way SSE4.1 implementation for double SHA256 on 64-byte inputs (Pieter Wuille)
1f0e7ca09c Use SHA256D64 in Merkle root computation (Pieter Wuille)
d0c9632883 Specialized double sha256 for 64 byte inputs (Pieter Wuille)
57f34630fb Refactor SHA256 code (Pieter Wuille)
0df017889b Benchmark Merkle root computation (Pieter Wuille)

Pull request description:

  This introduces a framework for specialized double-SHA256 with 64 byte inputs. 4 different implementations are provided:
  * Generic C++ (reusing the normal SHA256 code)
  * Specialized C++ for 64-byte inputs, but no special instructions
  * 4-way using SSE4.1 intrinsics
  * 8-way using AVX2 intrinsics

  On my own system (AVX2 capable), I get these benchmarks for computing the Merkle root of 9001 leaves (supported lengths / special instructions / parallellism):
  * 7.2 ms with varsize/naive/1way (master, non-SSE4 hardware)
  * 5.8 ms with size64/naive/1way (this PR, non-SSE4 capable systems)
  * 4.8 ms with varsize/SSE4/1way (master, SSE4 hardware)
  * 2.9 ms with size64/SSE4/4way (this PR, SSE4 hardware)
  * 1.1 ms with size64/AVX2/8way (this PR, AVX2 hardware)

Tree-SHA512: efa32d48b32820d9ce788ead4eb583949265be8c2e5f538c94bc914e92d131a57f8c1ee26c6f998e81fb0e30675d4e2eddc3360bcf632676249036018cff343e
2018-06-04 12:11:53 +02:00
Chun Kuan Lee 908c1d7745 GCC-7 and glibc-2.27 compat code 2018-06-02 19:18:41 +00:00
Pieter Wuille 4437d6e1f3 8-way AVX2 implementation for double SHA256 on 64-byte inputs 2018-05-29 14:18:05 -07:00
Pieter Wuille 230294bf5f 4-way SSE4.1 implementation for double SHA256 on 64-byte inputs 2018-05-29 14:18:05 -07:00
Cory Fields 9e305b56f5 build: split warnings out of CXXFLAGS
CXXFLAGS should not be modified anyway. Also, this will enable us to
selectively disable warnings.
2018-05-22 17:47:11 -04:00
Wladimir J. van der Laan cb088b1461
Merge #13005: Make --enable-debug to pick better options
9e49db2 Make --enable-debug to pick better options (Evan Klitzke)

Pull request description:

  Cherry-picked (and rebased) 94189645e67f364c4445d62e2b00c282d885cbbf from the "up for grabs" PR: "[build] Make --enable-debug pick better options" (#12695).

  See previous review in #12695.

Tree-SHA512: a93cdadcf13e2ef8519acb1ce4f41ce95057a388347bb0a86a5c164dc7d0b0d14d4bb2a466082d5a100b8d50de65c605c40abaed555e8ea77c99e28800a34439
2018-05-14 15:33:03 +02:00
Chun Kuan Lee 457c2da2ac Remove python2 from configure.ac 2018-05-01 19:03:28 +08:00
Wladimir J. van der Laan 3e53004339 test: add rpcauth-test to AC_CONFIG_LINKS to fix out-of-tree make check
Add rpcauth-test (introduced #13056) to AC_CONFIG_LINKS, like the other
directly called python scripts, to fix out-of-tree `make check`.
2018-04-25 16:37:10 +02:00
Evan Klitzke 9e49db2426 Make --enable-debug to pick better options
Various changes:

 * Don't check $GCC and $GXX
 * Prefer -Og instead of -O0
 * If -g3 isn't available, use -g

This also incidentally fixes compiler warnings with GCC and glibc when using
--enable-debug, as the old default values mixed poorly with the hardening flags.
2018-04-17 10:37:43 +02:00
Akio Nakamura 2eb5036c33 macOS: Prevent Xcode 9.3 build warnings
This PR solves #12867 (needs to run autogen.sh && ./configure)

clang (Apple LLVM version 9.1.0 (clang-902.0.39.1)) warns unused
argument '-pie' during compilation.
So we check for warnings in the test using $CXXFLAG_WERROR.

Windows is alse default-pie and was special-cased because it also
warned, but we can also eliminate that case if warnings are caught.
2018-04-13 10:26:05 +09:00
practicalswift 01189ab9ae build: Show enabled sanitizers in configure output 2018-04-06 11:08:20 +02:00
Evan Klitzke 6feb46c372
Add --with-sanitizers option to configure
This enables the use of different compiler sanitizers, coresponding to
the -fsanitize option in GCC and Clang.
2018-03-28 12:33:04 -07:00
Vasil Dimov 8ae413235d
Remove redundant checks for MSG_* from configure.ac
It is redundant to check for the presence of MSG_NOSIGNAL macro in
configure.ac, define HAVE_MSG_NOSIGNAL and then check whether the later
is defined in the source code. Instead we can check directly whether
MSG_NOSIGNAL is defined. Same for MSG_DONTWAIT.

In addition to that, the checks we had in configure.ac produce a
compiler warning about unused variable and thus could fail if
-Werror is present and erroneously proclaim that the macros are
not available.
2018-03-15 20:02:00 +01:00
Vasil Dimov 71129e0265
Do not check for main() in libminiupnpc
main() { main(); } causes "infinite recursion" compilation warning
which with -Werror fails the check.
2018-03-15 19:59:11 +01:00
Wladimir J. van der Laan 05042d38ba
Merge #12666: configure: UniValue 1.0.4 is required for pushKV(, bool)
8172d3a configure: UniValue 1.0.4 is required for pushKV(, bool) (Luke Dashjr)

Pull request description:

  The breaking changes (#12193) are already merged, so this blocks 0.17.0.

  It depends on jgarzik/univalue#42 or jgarzik/univalue#50 being merged and released in UniValue 1.0.4.

Tree-SHA512: 3a21bbc72d6632bd07ee60ad7780b9ee95908357bcf59b4795b693d8a5d8c88943d6451482f11916ff5417e3bdbb9916062f87d0d73e79f50eb95ddabe21f943
2018-03-14 15:22:23 +01:00
Luke Dashjr 8172d3aadb configure: UniValue 1.0.4 is required for pushKV(, bool) 2018-03-10 22:14:04 +00:00
Wladimir J. van der Laan f13d756cdd
Merge #12373: Build: Add build support for profiling.
cfaac2a60 Add build support for 'gprof' profiling. (murrayn)

Pull request description:

  Support for profiling build: `./configure --enable-profiling`

Tree-SHA512: ea983cfce385f1893bb4ab7f94ac141b7d620951dc430da3bbc92ae1357fb05521eac689216e66dc87040171a8a57e76dd7ad98036e12a2896cfe5ab544347f0
2018-03-06 20:21:44 +01:00
murrayn cfaac2a60f Add build support for 'gprof' profiling. 2018-02-26 20:54:16 -08:00
Jonas Schnelli daa84b3354
Merge #12029: Build: Add a makefile target for Doxygen documentation
a777244e4 Build: Add a makefile target for Doxygen documentation (Andrea Comand)

Pull request description:

  You can now build the doxygen documentation with `make docs` and clean it with `make clean-docs`.

  Fixes: #11949

Tree-SHA512: f2361ec7f771227367dd04bba1a444b44e59f13901463a678a5f2f579a10a56d67db2e29552e754e312a1c472a31593b6af189cbaac5cd351a428c57baf5ace7
2018-02-17 18:49:24 +11:00
MarcoFalke 1b06ed136f
Merge #12283: Fix typos
1340eda3b7 Fix typos (practicalswift)

Pull request description:

  Fix typos.

Tree-SHA512: 533a136831387ef26e9a74ba078437496bee38cc026da73fa9e6f6e7f4d5665eccac24cf3ef05e6d3af1329a1214f5ce71b039ddb8378b074e6d4408b8701f95
2018-02-02 05:35:51 -05:00
Wladimir J. van der Laan 4602dc704a
build: Bump version to 0.16.99
Also clean out release notes.

Tree-SHA512: c4d5b52c089e14438be37381e1b0dab3711cc72aa8d345d1024169fff0055f3d021c8ca9d46fb794110694ebcbf7cbca0a12619f650873c9d381530adea7100e
2018-01-30 14:08:53 +01:00
fanquake 11c5827ca7
[build] Add NETBSD leveldb target to configure.ac 2018-01-30 07:48:30 +08:00
practicalswift 1340eda3b7 Fix typos 2018-01-28 13:21:25 +01:00
Andrea Comand a777244e48 Build: Add a makefile target for Doxygen documentation
You can now build the doxygen documentation with `make docs` and clean it with `make clean-docs`.

Fixes: #11949
2018-01-25 19:43:19 +01:00
Akira Takizawa c9439e735a [Trivial] Update license year range to 2018 2018-01-01 04:33:09 +09:00
Varunram 3eb4d4595c
[build] Warn that only libconsensus can be built without boost 2017-12-18 14:32:22 +08:00
Cory Fields f7f7e2cd34 threads: add a thread_local autoconf check 2017-11-27 15:01:47 -08:00
Pieter Wuille ef8a634358
Merge #10866: Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if available.
76ea17c79 Add mutex requirement for AddToCompactExtraTransactions(…) (practicalswift)
4616c825a Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror) (practicalswift)
7e319d639 Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost. (Matt Corallo)

Pull request description:

  * Add mutex requirement for `AddToCompactExtraTransactions(…)`.
  * Use `-Wthread-safety-analysis` if available.
  * Rebased on top of https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923 - now includes: Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost.

Tree-SHA512: fb7365f85daa2741c276a1c899228181a8d46af51db7fbbdffceeaff121a3eb2ab74d7c8bf5e7de879bcc5042d00d24cb4649c312d51caba45a3f6135fd8b38f
2017-11-07 10:36:58 -08:00
practicalswift 4616c825a4 Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror) 2017-11-06 17:41:02 +01:00
fanquake 223a4aabd3
[build] Don't fail when passed --disable-lcov and lcov isn't available 2017-11-05 14:10:33 +08:00
MarcoFalke fae60e3386 qa: Fix lcov for out-of-tree builds 2017-10-02 13:30:39 +02:00
Wladimir J. van der Laan 38a54a50fa
Merge #11164: Fix boost headers included as user instead of system headers
5ac072caa Fix boost headers included as user instead of system headers (Dan Raviv)

Pull request description:

  In most of the project, boost headers are included as system headers.
  Fix the few inconsistent places where they aren't.

Tree-SHA512: 280af33a7bdc9d68a15b729fa88e1e7627e20a054b8d52a12cc5350c1ac9e9c90fb09f0aa97a00960969f75bcf3403dc52b834c94448b814efa63bfaf3b82663
2017-09-05 22:27:17 +02:00
Wladimir J. van der Laan 538cc0ca8b build: Mention use of asm in summary 2017-08-28 11:19:56 +02:00
Wladimir J. van der Laan ce5381e7fe build: Rename --enable-experimental-asm to --enable-asm and enable by default
Now that 0.15 is branched off, enable assembler SHA256 optimizations by default.
2017-08-28 11:06:11 +02:00
Dan Raviv 5ac072caa2 Fix boost headers included as user instead of system headers
In most of the project, boost headers are included as system headers.
Fix the few inconsistent places where they aren't.
2017-08-26 21:09:00 +03:00
Gregory Sanders 844b73e486 disable jni in builds 2017-08-15 10:27:20 -07:00
Wladimir J. van der Laan f6283b4719
build: bump version to 0.15.99
Now that 0.15 branch has been split off, master is 0.15.99 (pre-0.16).

Also clean out release notes.

Tree-SHA512: 160f712fae7bfc51e49e36a27ab01f5c243b79a19a70312df95f9bc5cb8067c70aa88911f741fd1625bee549a70655eaea24d98f6049d98c3c14ee1b3143f4cb
2017-08-14 17:28:30 +02:00
Wladimir J. van der Laan 318392ca7c
Merge #10301: Check if sys/random.h is required for getentropy.
ee2d10a Check if sys/random.h is required for getentropy on OSX. (James Hilliard)

Pull request description:

  This should check and include sys/random.h if required for osx as mentioned [here](https://github.com/bitcoin/bitcoin/pull/9821#issuecomment-290936636).

Tree-SHA512: e9491f67f2e8b2e6bcdbcbb8063295e844d5627daf5336e3e17b4a8027d888fa65a08e4580a745abdc35ffd8d86b4fc7434daaac172c4a06ab7566a2ed0bfb92
2017-08-07 17:24:55 +02:00
Cory Fields 9baca41985 build: always attempt to enable targeted sse42 cxxflags
This avoids a counter-intuitive drop in performance when manually adjusting the
flags.
2017-08-04 15:43:04 -04:00
James Hilliard ee2d10ad0c Check if sys/random.h is required for getentropy on OSX. 2017-07-27 15:34:09 +03:00
Pieter Wuille 6b8d872e5e Protect SSE4 code behind a compile-time flag 2017-07-20 09:03:53 -07:00
Pieter Wuille b4d03be3ca
Merge #10766: Building Environment: Set ARFLAGS to cr
912da1dcc Use AC_ARG_VAR to set ARFLAGS. (René Nyffenegger)

Pull request description:

  Override the default of ARFLAGS of `cru` to `cr`.

  When building, ar produces a warning for each archive, for example
  ```
    AR       libbitcoin_server.a
  /usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')

  ```
  Since `u` is the default anyway, it cannot hurt to remove it.

Tree-SHA512: 7466764f847b70f0f67db25dac87a7794477abf1997cb946682f394fe80ae86ac3ed52cbadb35f0c18a87467755bde5a5158430444cd26fb60fa363cc7bd486d
2017-07-16 11:56:13 -07:00
René Nyffenegger 912da1dcc8 Use AC_ARG_VAR to set ARFLAGS.
The user can set ARFLAGS in the ./configure step with
  ./configure ARFLAGS=...
If he chooses not to do so, ARFLAGS will be set to cr.
2017-07-15 22:30:58 +02:00
Cory Fields d34d77a51b build: verify that the assembler can handle crc32 functions
Also, enable crc32 even if -msse4.2 wasn't added by us, as long as it works.
This allows custom flags (such as -march=native) to work as expected.
2017-07-13 12:49:05 -04:00
Wladimir J. van der Laan 8c2098ad12
Merge #10565: [coverage] Remove subtrees and benchmarks from coverage report
d5711f4 Filter subtrees and and benchmarks from coverage report (Andrew Chow)
405b86a Replace lcov -r commands with faster way (Andrew Chow)
c8914b9 Have `make cov` optionally include branch coverage statistics (Andrew Chow)

Tree-SHA512: 9c349a7baeb7430ea586617c52f91177df58e3546d6dc573e26815ddb79e30ab1873542d85ac1daca5e1fb2c6d6c8965824b42d027b6b0496a744af57b095852
2017-06-22 20:57:11 +02:00
Wladimir J. van der Laan a4fe07714d
Merge #10544: Update to LevelDB 1.20
3ee3d04 Add extra LevelDB source to Makefile (MarcoFalke)
2424989 leveldb: enable runtime-detected crc32 instructions (Cory Fields)
cf44e4c Squashed 'src/leveldb/' changes from a31c8aa40..196962ff0 (Pieter Wuille)

Tree-SHA512: 19ade77e3f6265507b3ab7b9aa5150d378aa0751e24ac7a61567b0f720a566cedc6c3d3336da17a3bd2b5d068ee86600d96a15228f78bd20ccf98c8fc9041a91
2017-06-13 19:48:13 +02:00
Cory Fields 2424989e4f leveldb: enable runtime-detected crc32 instructions 2017-06-09 19:25:36 -07:00
Andrew Chow c8914b9dbb Have make cov optionally include branch coverage statistics
Added an option to configure to allow for branch coverage statistics gathering.

Disabled logprint macro when coverage testing is on so that unnecessary branches are not analyzed.
2017-06-07 14:19:01 -07:00
MarcoFalke 75e898c094
Merge #10331: Share config between util and functional tests
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery)
95836c5 Use shared config file for functional and util tests (John Newbery)
89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery)
e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery)
ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery)

Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f
2017-06-06 23:55:24 +02:00
John Newbery 8ad5bdef78 Merge bctest.py into bitcoin-util-test.py
bctest.py is only used as an import by bitcoin-util-test.py. There's no
value in keeping it as a separate module, so let's merge them into a
single module to keep building and packaging simpler.

bitcoin-test-util is importable as a module, so if any future modules
really want to import the code from bctest.py, they can import
bitcoin-test-util and call the bctest functions by name.
2017-06-06 16:42:38 -04:00
Cory Fields cf390dff89 build: silence gcc7's implicit fallthrough warning
This is a well-intentioned but realistically annoying warning. Unfortunately,
it's too easy for a warning in one header to cause dozens of repeated warnings.
2017-05-31 11:54:06 -04:00
John Newbery 95836c5eba Use shared config file for functional and util tests
The functional tests and util tests both require a config file that is
generated by ./configure. This commit merges those two config
files into a single configuration file that can be shared by both tests.

The config from config.ini is put into a Namespace object to maintain
the interface with bctest.py. A future commit could change this
interface to use a dictionary instead of a namespace.
2017-05-03 14:18:30 -04:00
John Newbery 89fcd3586c Use an .ini config file for environment vars in bitcoin-util-test.py 2017-05-03 14:18:14 -04:00
Wladimir J. van der Laan 342b9bc390
Merge #9792: FastRandomContext improvements and switch to ChaCha20
4fd2d2f Add a FastRandomContext::randrange and use it (Pieter Wuille)
1632922 Switch FastRandomContext to ChaCha20 (Pieter Wuille)
e04326f Add ChaCha20 (Pieter Wuille)
663fbae FastRandom benchmark (Pieter Wuille)
c21cbe6 Introduce FastRandomContext::randbool() (Pieter Wuille)

Tree-SHA512: 7fff61e3f6d6dc6ac846ca643d877b377db609646dd401a0e8f50b052c6b9bcd2f5fc34de6bbf28f04afd1724f6279ee163ead5f37d724fb782a00239f35db1d
2017-04-24 14:28:49 +02:00
Pieter Wuille 394ccf76ad Make Boost use std::atomic internally 2017-04-20 08:10:26 -07:00
Wladimir J. van der Laan 168a7034f5 doc: Make build system insert version in Doxyfile 2017-04-05 09:40:56 +02:00
Wladimir J. van der Laan 2c83911401 build: Disable Wshadow warning
This warning was enabled by default in #8808 but it's a
[continuing](https://github.com/bitcoin/bitcoin/pull/9911#issuecomment-285171447)
[source](https://github.com/bitcoin/bitcoin/pull/10089#issuecomment-289369688) of
[annoyance](https://github.com/bitcoin/bitcoin/pull/9911#issuecomment-285179129) for me
and other developers. I'm sick of sounding like a broken record, so disable it again.
2017-04-01 14:16:55 +02:00
Wladimir J. van der Laan 625488ace5 util: Work around (virtual) memory exhaustion on 32-bit w/ glibc
glibc-specific: On 32-bit systems set the number of arenas to 1. By
default, since glibc 2.10, the C library will create up to two heap
arenas per core. This is known to cause excessive virtual address space
usage in our usage. Work around it by setting the maximum number of
arenas to 1.
2017-03-30 09:45:41 +02:00
Pieter Wuille 4fd2d2fc97 Add a FastRandomContext::randrange and use it 2017-03-29 11:26:08 -07:00
John Newbery 63d66ba20a Move src/test/bitcoin-util-test.py to test/util/bitcoin-util-test.py 2017-03-20 10:40:31 -04:00
John Newbery 5b0bff4581 Rename --enable-extended-rpc-tests to --enable-extended-functional-tests 2017-03-20 10:40:31 -04:00
John Newbery a9bd622a65 Rename test/pull-tester/rpc-tests.py to test/functional/test_runner.py 2017-03-20 10:40:31 -04:00
John Newbery c28ee91db0 Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
John Newbery 00902c48cd Rename qa directory to test 2017-03-20 10:40:31 -04:00
Wladimir J. van der Laan e141aa4ba6 Add mallocinfo mode to getmemoryinfo RPC
This adds a mode argument to `getmemoryinfo`. By default the output
will remain the same. However if a mode argument of `mallocinfo` is
provided the result of glibc `malloc_info` (if available) will
be returned as a string, as-is.

This is useful for tracking heap usage over time or troubleshooting
memory fragmentation issues.
2017-03-20 10:30:18 +01:00
Wladimir J. van der Laan 5073100f27 build: Fix typo s/HAVE_DONTWAIT/HAVE_MSG_DONTWAIT
Introduced in #9921.

Thanks to Pavol Rusnak for spotting this one.
2017-03-16 17:38:35 +01:00
Wladimir J. van der Laan c459d509b7 build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
Instead of the WIN32-specific workaround, detect lack of `MSG_DONTWAIT`
in the build system. This allows other platforms without `MSG_DONTWAIT`
to work too.
2017-03-05 09:29:37 +00:00
Wladimir J. van der Laan 75d012e8c7
Merge #8808: Do not shadow variables (gcc set)
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík)
9de90bb Do not shadow variables (gcc set) (Pavel Janík)

Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
2017-03-03 15:48:53 +01:00
Wladimir J. van der Laan d19d45a1e6
Merge #9821: util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD
7e6dcd9 random: Add fallback if getrandom syscall not available (Wladimir J. van der Laan)
7cad849 sanity: Move OS random to sanity check function (Wladimir J. van der Laan)
aa09ccb squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly (Wladimir J. van der Laan)
224e6eb util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD (Wladimir J. van der Laan)

Tree-SHA512: 9fd408b1316c69de86674f342339b2f89192fd317c8c036b5df4320f828fa263c7966146bfc1904c51137ee4a26e4cb0f560b2cd05e18cde4d808b9b92ad15c4
2017-03-01 12:41:53 +01:00
Wladimir J. van der Laan 692c9eddba
Merge #9831: build: force a c++ standard to be specified
9829c54 build: force a c++ standard to be specified (Cory Fields)
2017-02-23 19:03:14 +01:00
Cory Fields 205830a37b build: add --enable-werror option
This turns some compiler warnings into errors. Useful for c-i.
2017-02-23 01:06:04 -05:00
Cory Fields 9829c54de2 build: force a c++ standard to be specified
Newer compilers may switch to newer standards by default. For example, gcc6
uses std=gnu++14 by default.
2017-02-22 13:37:35 -05:00
Wladimir J. van der Laan 224e6eb089 util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD
These are available in sandboxes without access to files or
devices. Also [they are safer and more straightforward](https://en.wikipedia.org/wiki/Entropy-supplying_system_calls)
to use than `/dev/urandom` as reading from a file has quite a few edge
cases:

- Linux: `getrandom(buf, buflen, 0)`. [getrandom(2)](http://man7.org/linux/man-pages/man2/getrandom.2.html)
  was introduced in version 3.17 of the Linux kernel.
- OpenBSD: `getentropy(buf, buflen)`. The [getentropy(2)](http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2)
  function appeared in OpenBSD 5.6.
- FreeBSD and NetBSD: `sysctl(KERN_ARND)`. Not sure when this was added
  but it has existed for quite a while.

Alternatives:

- Linux has sysctl `CTL_KERN` / `KERN_RANDOM` / `RANDOM_UUID`
  which gives 16 bytes of randomness. This may be available
  on older kernels, however [sysctl is deprecated on Linux](https://lwn.net/Articles/605392/)
  and even removed in some distros so we shouldn't use it.

Add tests for `GetOSRand()`:

- Test that no error happens (otherwise `RandFailure()` which aborts)
- Test that all 32 bytes are overwritten (initialize with zeros, try multiple times)

Discussion:

- When to use these? Currently they are always used when available.
  Another option would be to use them only when `/dev/urandom` is not
  available. But this would mean these code paths receive less testing,
  and I'm not sure there is any reason to prefer `/dev/urandom`.

Closes: #9676
2017-02-21 20:57:34 +01:00
Cory Fields b602fe0f73 build: warn about variable length arrays 2017-02-21 11:56:07 -05:00
MarcoFalke 7ff4a538a8
Merge #9657: Improve rpc-tests.py
a6a3e58 Various review markups for rpc-tests.py improvements (John Newbery)
3de3ccd Refactor rpc-tests.py (John Newbery)
afd38e7 Improve rpc-tests.py arguments (John Newbery)
91bffff Use argparse in rpc_tests.py (John Newbery)
1581ecb Use configparser in rpc-tests.py (John Newbery)
2017-02-18 15:29:40 +01:00
Wladimir J. van der Laan f87e8f5392
build: bump version to 0.14.99
Now that 0.14 branch has been split off, master is 0.14.99 (pre-0.15).

Also clean out release notes.
2017-02-17 17:27:18 +01:00
John Newbery 1581ecbc33 Use configparser in rpc-tests.py
Remove the use of wildcard imports in rpc-tests.py and replace with
configparser.
2017-01-31 18:03:14 -08:00
Lauda be31a2b363 [Trivial] Update license year range to 2017
The same as #7363.
2017-01-23 23:46:06 +01:00
Wladimir J. van der Laan 7014506415
Merge #9475: Let autoconf detect presence of EVP_MD_CTX_new
0388afe Let autoconf detect presence of EVP_MD_CTX_new (Luke Dashjr)
2017-01-05 10:28:47 +01:00
Luke Dashjr 0388afe69d Let autoconf detect presence of EVP_MD_CTX_new
Fixes LibreSSL compatibility
2017-01-04 18:37:37 +00:00
Jonas Schnelli 53442af0aa
Merge #9412: build: Fix 'make deploy' for OSX
2fb98f6 Fix bug in dmg builder so that it actually reads in the configuration file (Don Patterson)
b01667c Mention RSVG dependency when creating the disk image on OSX (Jonas Schnelli)
09aefb5 build: Fix 'make deploy' for OSX (Cory Fields)
2017-01-02 09:43:15 +01:00
Douglas Roark e2b5c98cef Fix linker error when configured with --enable-lcov 2016-12-28 21:47:51 -08:00
Jonas Schnelli b01667c778
Mention RSVG dependency when creating the disk image on OSX 2016-12-23 10:09:49 +01:00
Cory Fields 09aefb5177
build: Fix 'make deploy' for OSX
Native OSX uses system tools rather than 3rd party dependencies. rsvg-convert
is still required, though.
2016-12-23 09:48:52 +01:00
Pavel Janík ad1ae7ae2e Check and enable -Wshadow by default. 2016-12-05 11:41:52 +01:00
Alex Morcos 30b620c48a remove obsolete run-bitcoind-for-test.sh 2016-12-04 15:44:41 -05:00
Pieter Wuille 2efcfa5acf
Merge #9260: Mrs Peacock in The Library with The Candlestick (killed main.{h,cpp})
76faa3c Rename the remaining main.{h,cpp} to validation.{h,cpp} (Matt Corallo)
e736772 Move network-msg-processing code out of main to its own file (Matt Corallo)
87c35f5 Remove orphan state wipe from UnloadBlockIndex. (Matt Corallo)
2016-12-02 18:25:40 -08:00
Matt Corallo 76faa3cdfe Rename the remaining main.{h,cpp} to validation.{h,cpp} 2016-12-02 09:42:51 -08:00
Matt Corallo 10ae7a7b23 Revert "Use async name resolving to improve net thread responsiveness"
This reverts commit caf6150e97.

getaddrinfo_a has a nasty tendency to segfault internally in its
background thread, on every version of glibc I tested, especially
under helgrind.

See https://sourceware.org/bugzilla/show_bug.cgi?id=20874
2016-12-01 14:32:44 -08:00
Wladimir J. van der Laan a8b2a82618
Merge #9156: Add compile and link options echo to configure
d8274bc Add compile and link options echo to configure (Jonas Schnelli)
2016-11-17 16:05:56 +01:00
Jonas Schnelli d8274bcd00
Add compile and link options echo to configure 2016-11-16 12:02:05 +01:00
Cory Fields 70266e9829 build: fix qt5.7 build under macOS
OBJCXX's std flags don't get defined by our cxx macro. Rather than hard-coding
to c++11, just force OBJCXX to be the same as CXX unless the user specified
otherwise.
2016-11-15 16:12:17 -05:00
Wladimir J. van der Laan f445d88612
Revert "Check and enable -Wshadow by default."
This reverts commit fd5654cab1.

This is still causing too many warnings for some compiler combinations,
forget it for now.
2016-11-09 21:28:11 +01:00
Wladimir J. van der Laan e0477f6d20
Merge #8794: Enable -Wshadow by default
359bac7 Add notes about variable names and shadowing (Pavel Janík)
fd5654c Check and enable -Wshadow by default. (Pavel Janík)
2016-11-09 14:12:19 +01:00
fanquake 6dd3723722
Set minimum required Boost to 1.47.0 2016-10-17 11:43:59 +08:00
Wladimir J. van der Laan fb24d7eeb4
Merge #8813: bitcoind: Daemonize using daemon(3)
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)
2016-09-30 18:19:31 +02:00
Matthew King a92bf4af66 bitcoind: Daemonize using daemon(3)
Simplified version of #8278. Assumes that every OS that (a) is supported
by Bitcoin Core (b) supports daemonization has the `daemon()` function
in its C library.

- Removes the fallback path for operating systems that support
  daemonization but not `daemon()`. This prevents never-exercised code from
  ending up in the repository (see discussion here:
  https://github.com/bitcoin/bitcoin/pull/8278#issuecomment-242704745).

- Removes the windows-specific path. Windows doesn't support `daemon()`,
  so it don't support daemonization there, automatically.

Original code by Matthew King, adapted by Wladimir van der Laan.
2016-09-26 13:37:44 +02:00
Wladimir J. van der Laan 4e1567acff
Merge #8249: Enable (and check for) 64-bit ASLR on Windows
62c2915 build: supply `-Wl,--high-entropy-va` (Wladimir J. van der Laan)
9a75d29 devtools: Check for high-entropy ASLR in 64-bit PE executables (Wladimir J. van der Laan)
2016-09-26 13:34:38 +02:00
Wladimir J. van der Laan 62c291596b build: supply -Wl,--high-entropy-va
This should enable high-entropy ASLR on 64-bit targets, for better
mitigation of exploits.
2016-09-26 12:57:55 +02:00
Pavel Janík fd5654cab1 Check and enable -Wshadow by default. 2016-09-22 16:36:03 +02:00
Wladimir J. van der Laan 7e9ab9555c
Merge #8608: Install manpages via make install, also add some autogenerated manpages
d19583f improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc)
09546ca regenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc)
ae6e754 change help string --enable-man to --disable-man (nomnombtc)
a32c102 add conditional for --enable-man, default is yes (nomnombtc)
dc84b6f add doc/man to subdir if configure flag --enable-man is set (nomnombtc)
00dba72 add doc/man/Makefile.am to include manpages (nomnombtc)
eb5643b add autogenerated manpages by help2man (nomnombtc)
6edf2fd add gen-manpages.sh description to README.md (nomnombtc)
d2cd9c0 add script to generate manpages with help2man (nomnombtc)
2016-09-13 10:34:55 +02:00
Wladimir J. van der Laan 7f8b677aeb
Merge #8563: Add configure check for -latomic
878faac Add configure check for -latomic (Anthony Towns)
2016-09-09 08:58:39 +02:00
Wladimir J. van der Laan 883175f5d3 build: Updates for OpenBSD
- LevelDB platform was not guessed correctly (it ended up defining
  `-DOS_OPENBSD59` instead of `-DOS_OPENBSD`)

- On OpenBSD there is no convenience link from `python3.5` to `python3`:
  add detection for other python interpreter names.

- If it has to guess the LevelDB OS, print a autoconf warning so that
  the user can check.
2016-08-28 16:12:10 +02:00
nomnombtc ae6e754928 change help string --enable-man to --disable-man 2016-08-28 02:46:36 +02:00
nomnombtc a32c102fb1 add conditional for --enable-man, default is yes 2016-08-27 01:12:41 +02:00
Anthony Towns 878faacd7b Add configure check for -latomic 2016-08-23 16:55:15 +10:00
Wladimir J. van der Laan 733035bdb7
Merge #8504: test: Remove java comparison tool
eb0c52e travis: Remove hostname hack (Wladimir J. van der Laan)
3c5251d test: Remove java comparison tool (Wladimir J. van der Laan)
2016-08-17 13:12:23 +02:00
Wladimir J. van der Laan 936c1448ed build: Remove check for openssl/ec.h
We don't use any elliptic curves from OpenSSL anymore, nor include this
header anywhere but optionally in the tests of secp256k1 (which has
its own autoconf setup).

Reported by sinetek on IRC.
2016-08-16 11:19:55 +02:00
Wladimir J. van der Laan 3c5251daeb test: Remove java comparison tool 2016-08-13 16:04:29 +02:00
Wladimir J. van der Laan efce84d888
Merge #8293: Bugfix: Allow building libbitcoinconsensus without any univalue
8a270b2 Bugfix: Allow building libbitcoinconsensus without any univalue (Luke Dashjr)
2016-08-13 15:28:30 +02:00
Wladimir J. van der Laan fe1780ed3e
Merge #8492: configure: Allow building bench_bitcoin by itself
216d796 configure: Allow building bench_bitcoin by itself (Luke Dashjr)
2016-08-13 15:13:02 +02:00
Luke Dashjr 8a270b25fc Bugfix: Allow building libbitcoinconsensus without any univalue 2016-08-09 05:30:59 +00:00
Luke Dashjr 216d796ce0 configure: Allow building bench_bitcoin by itself 2016-08-09 05:10:16 +00:00
fanquake a615386552
[depends] ZeroMQ 4.1.5 2016-07-21 16:20:17 +08:00
Wladimir J. van der Laan 6c0336c772
build: bump version to 0.13.99
Now that 0.13 branch has been split off, master is 0.13.99 (pre-0.14).
2016-07-18 12:22:18 +02:00
Wladimir J. van der Laan 67caef6730
Merge #8314: Fix pkg-config issues for 0.13
b556bed build: fix Windows builds without pkg-config (Cory Fields)
0c928cb build: Fix Qt5PlatformSupport check without pkg-config (Cory Fields)
2016-07-08 15:08:43 +02:00
Cory Fields b556beda26 build: fix Windows builds without pkg-config
- guard PKG_PROG_PKG_CONFIG with an m4_ifdef. If not building for windows,
  require it
- add nops as necessary in case the ifdef reduces the if/then to nothing
- AC_SUBST some missing _LIBS. These were split out over time, but not all were
  properly substituted. They continued to work if pkg-config is installed
  because it does the AC_SUBST itself
2016-07-07 14:18:12 -04:00
Cory Fields cf2ef786a1 build: require boost for bench 2016-07-06 17:31:54 -04:00
Cory Fields 9d25362087 build: add armhf/aarch64 gitian builds
- create a script to handle split debug. This will also eventually need to check
  targets, and use dsymutil for osx.
- update config.guess/config.sub for bdb for aarch64.
- temporarily disable symbol checks for arm/aarch64
- quit renaming to linux32/linux64 and use the host directly

This also adds a hack to work around an Ubuntu bug in the gcc-multilib package:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults-armhf-cross/+bug/1347820

The problem is that gcc-multilib conflicts with the aarch toolchain.
gcc-multilib installs a symlink that points
/usr/include/asm -> /usr/include/x86_64-linux-gnu/asm.

Without this link, gcc -m32 can't find asm/errno.h (and others), since
/usr/include/x86_64-linux-gnu isn't in its default include path. But
/usr/include/i386-linux-gnu is (though it doesn't exist on disk).

So work around the problem by linking
/usr/include/i386-linux-gnu/asm -> /usr/include/x86_64-linux-gnu/asm.

The symlink fix is actually quite reasonable, but echoing the password into
sudo is nasty, and should probably be addressed in gitian itself. It makes more
sense to enable passwordless sudo for the build user by default.
2016-06-10 05:34:50 -04:00
Cory Fields ab95d5df3d build: a few ugly hacks to get the rpc tests working out-of-tree
- Link pull-tester/rpc-tests.py to the build dir
- Add the build-dir's config to the python path so that tests can find it
- The tests themselves are in srcdir
- Clean up __pycache__ in 'make clean'
2016-06-01 20:31:55 -04:00
Cory Fields de98290155 build: No need to check for leveldb atomics
They're guaranteed with c++11
2016-04-30 17:46:35 -04:00
Wladimir J. van der Laan 06162f19d7
Merge #7165: build: Enable C++11 in build, require C++11 compiler
7df9224 doc: Add note about new build/test requirements to release notes (Wladimir J. van der Laan)
2aacc72 build: update ax_cxx_compile_stdcxx to serial 4 (Wladimir J. van der Laan)
a398549 depends: use c++11 (Cory Fields)
67969af build: Enable C++11 build, require C++11 compiler (Wladimir J. van der Laan)
2016-04-28 10:51:49 +02:00
Cory Fields 63b3111f84 build: quiet annoying warnings without adding new ones
Disabling warnings can be tricky, because doing so can cause a different
compiler to create new warnings about unsupported disable flags. Also, some
warnings don't surface until they're paired with another warning (gcc). For
example, adding "-Wno-foo" won't cause any trouble, but if there's a legitimate
warning emitted, the "unknown option -Wno-foo" will show up as well.

Work around this in 2 ways:

1. When checking to see if -Wno-foo is supported, check for "-Wfoo" instead.
2. Enable -Werror while checking 1.

If "-Werror -Wfoo" compiles, "-Wno-foo" is almost guaranteed to be supported.

-Werror itself is also checked. If that fails to compile by itself, it likely
means that the user added a flag that adds a warning. In that case, -Werror
won't be used while checking, and the build may be extra noisy. The user would
need to fix the bad input flag.

Also, silence 2 more additional warnings that can show up post-c++11.
2016-04-27 01:17:14 -04:00
Wladimir J. van der Laan 67969af09f build: Enable C++11 build, require C++11 compiler
Implements #6211.
2016-04-26 16:15:02 +02:00
randy-waterhouse 89c844df14 Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e03. 2016-04-26 19:43:14 +12:00
Cory Fields a4625acbf8 leveldb: integrate leveldb into our buildsystem
leveldb's buildsystem causes us a few problems:
- breaks out-of-tree builds
- forces flags used for some tools
- limits cross builds

Rather than continuing to add wrappers around it, simply integrate it into our
build.
2016-04-19 14:37:15 -04:00
Cory Fields 0dbf6e4b40 build: define base filenames for use elsewhere in the buildsystem
Unfortunately, the target namees defined at the Makefile.am level can't be used
for *.in substitution. So these new defines will have to stay synced up with
those targets.

Using the new variables for the deploy targets in the main Makefile.am will
ensure that they stay in sync, otherwise build tests will fail.
2016-04-11 04:01:23 +00:00
Wladimir J. van der Laan f063863d1f build: Remove unnecessary executables from gitian release
This removes the following executables from the binary gitian release:

- test_bitcoin-qt[.exe]
- bench_bitcoin[.exe]

@jonasschnelli and me discussed this on IRC a few days ago - unlike the
normal `bitcoin_tests` which is useful to see if it is safe to run
bitcoin on a certain OS/environment combination, there is no good reason
to include these. Better to leave them out to reduce the download
size.

Sizes from the 0.12 release:
```
2.4M bitcoin-0.12.0/bin/bench_bitcoin.exe
 22M bitcoin-0.12.0/bin/test_bitcoin-qt.exe
```
2016-04-03 15:11:44 +02:00
Wladimir J. van der Laan 28ad4d9fc2
Merge #7477: Fix quoting of copyright holders in configure.ac.
72fd008 Fix quoting of copyright holders in configure.ac. (Daniel Kraft)
2016-03-31 14:28:45 +02:00
Wladimir J. van der Laan 18f05c765c build: python 3 compatibility
Ubuntu 16.04 "xenial xerus" does not come with Python 2.x by default.
It is possible to install a python-2.7 package, but this has its own
problem: no `python` or `python2` symlink (see #7717).

This fixes the following scripts to work with python 3:
- `make check` (bctest,py, bitcoin-util-test.py)
- `make translate` (extract_strings_qt.py)
- `make symbols-check` (symbol-check.py)
- `make security-check` (security-check.py)

Explicitly call the python commands using $(PYTHON) instead
of relying on the interpreter line at the top of the scripts.
2016-03-29 17:20:16 +02:00
Daniel Kraft 72fd008e7f Fix quoting of copyright holders in configure.ac.
The old configure.ac did not work for a copyright holders string
containing commas due to insufficient quoting.  The new one allows this.
While this is, of course, not of direct consequence to the current code
(where the string is "Bitcoin Core"), it should still be fixed now that
the string is actually factored out.
2016-02-07 14:06:07 +01:00
Wladimir J. van der Laan 152a8216cc
Merge #7349: Build against system UniValue when available
42407ed build-unix: Update UniValue build conditions (Luke Dashjr)
cdcad9f LDADD dependency order shuffling (Luke Dashjr)
62f7f2e Bugfix: Always include univalue in DIST_SUBDIRS (Luke Dashjr)
2356515 Change default configure option --with-system-univalue to "no" (Luke Dashjr)
5d3b29b doc: Add UniValue to build instructions (Luke Dashjr)
ab22705 Build against system UniValue when available (Luke Dashjr)
2adf7e2 Bugfix: The var is LIBUNIVALUE,not LIBBITCOIN_UNIVALUE (Luke Dashjr)
2016-02-04 17:43:19 +01:00
Luke Dashjr a68bb9f5e7 Merge branch 'master' into single_prodname 2016-02-03 05:41:13 +00:00
Luke Dashjr 23565157ba Change default configure option --with-system-univalue to "no" 2016-01-28 05:31:41 +00:00
Luke Dashjr cddffaf5e6 Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly 2016-01-28 04:52:52 +00:00
Luke Dashjr 29598e41a5 Move PACKAGE_URL to configure.ac 2016-01-28 04:37:34 +00:00
Cory Fields a8ce872118 release: always link librt for glibc back-compat builds
glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to
link in anyway for back-compat.

Fixes #7420
2016-01-26 23:07:04 -05:00
Cory Fields f3d3eaf78e release: add check-symbols and check-security make targets
These are not added to the default checks because some of them depend on
release-build configs.
2016-01-26 23:07:04 -05:00
Luke Dashjr 3cae14056a Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere 2016-01-19 08:42:05 +00:00
Wladimir J. van der Laan 2350ab28fb
Merge pull request #7363
bd34174 Update license year range to 2016 (Prayag Verma)
2016-01-18 10:30:22 +01:00
Prayag Verma bd34174ebc Update license year range to 2016 2016-01-17 23:38:11 +05:30
Luke Dashjr ab22705a7b Build against system UniValue when available 2016-01-15 04:34:06 +00:00
Cory Fields c0cf48d1ac c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally
Due to include ordering, defining in one place was not enough to ensure correct
usage. Use global defines so that we don't have to worry abou this ordering.

Also add a comment in configure about the test.
2016-01-08 13:32:00 -05:00
Cory Fields 76ac35f36d c++11: detect and correct for boost builds with an incompatible abi
This is ugly, but temporary. boost::filesystem will likely be dropped soon
after c++11 is enabled. Otherwise, we could simply roll our own copy_file. I've
fixed this at the buildsystem level for now in order to avoid mixing in
functional changes.

Explanation:
If boost (prior to 1.57) was built without c++11, it emulated scoped enums
using c++98 constructs. Unfortunately, this implementation detail leaked into
the abi. This was fixed in 1.57.

When building against that installed version using c++11, the headers pick up
on the native c++11 scoped enum support and enable it, however it will fail to
link. This can be worked around by disabling c++11 scoped enums if linking will
fail.

Add an autoconf test to determine incompatibility. At build-time, if native
enums are being used (a c++11 build), and force-disabling them causes a
successful link, we can be sure that there's an incompatibility and enable the
work-around.
2016-01-05 17:17:29 -05:00
Luke Dashjr 917b1d03cf Set copyright holders displayed in notices separately from the package name
This helps avoid accidental removal of upstream copyright names
2015-12-22 12:29:18 +00:00
Cory Fields de619a37fd depends: Pass PYTHONPATH along to configure 2015-12-22 04:37:46 +00:00
Luke Dashjr e611b6e329 macdeploy: Use rsvg-convert rather than cairosvg 2015-12-22 04:37:45 +00:00
Luke Dashjr 63bcdc5227 More complicated package name substitution for Mac deployment 2015-12-22 03:24:21 +00:00
Wladimir J. van der Laan c12ff995f7
Now that 0.12 has been branched, master is 0.12.99
... in preparation for 0.13
2015-12-03 12:07:01 +01:00
Pieter Wuille 48edf5746a Update key.cpp to new secp256k1 API 2015-11-13 00:12:53 +01:00
Cory Fields 17c4d9d164 build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2015-11-09 22:50:31 -05:00
Wladimir J. van der Laan dbacc69b4f build: If both Qt4 and Qt5 are installed, use Qt5
If both Qt4 and Qt5 development headers are installed, use Qt5. Building
against Qt5 should be encouraged as that is where active development
happens.
2015-11-04 16:19:28 +01:00
Wladimir J. van der Laan b2ce2c1f0f
Merge pull request #6870
040c0ea Init: Cleanup error and warning strings (MarcoFalke)
6782f58 [trivial] Latest config.guess (MarcoFalke)
bf68191 [trivial] rpcnet: fix typo (MarcoFalke)
95f4291 [trivial] Rewrite help text for feature enabled by default (MarcoFalke)
2015-10-29 13:30:42 +01:00
dexX7 45d4ff0c20
Add config option to enable extended RPC tests for code coverage
When using lcov to gather code coverage data, the configuration option
`--enable-extended-rpc-tests` may be used to enable extended RPC tests.
2015-10-23 22:09:19 +02:00
dexX7 8e3a27bbbf
Require Python for RPC tests, when using lcov
Because Python is (going to be) used to run the RPC tests, when
gathering coverage data with lcov, it is explicitly checked, whether
Python is really available.
2015-10-23 22:09:17 +02:00
MarcoFalke 95f4291185 [trivial] Rewrite help text for feature enabled by default
c.f #6748
2015-10-22 17:01:53 +02:00
Wladimir J. van der Laan b7d78fd0bd
Merge pull request #6733
7072c54 Support very-fast-running benchmarks (Gavin Andresen)
535ed92 Simple benchmarking framework (Gavin Andresen)
2015-10-06 16:34:23 +02:00
Wladimir J. van der Laan bdece5068b
Merge pull request #6743
dd28089 autotools: move checking for zmq library to common area in configure.ac (Johnathan Corgan)
2015-10-06 10:04:55 +02:00
Wladimir J. van der Laan a75c67364d
Merge pull request #6744
bb24835 build: disable -Wself-assign (Wladimir J. van der Laan)
2015-10-05 13:43:16 +02:00
Wladimir J. van der Laan e10a4ab904
Merge pull request #6748
9ee5ac8 Rewrite help texts for features enabled by default. (Pavel Janík)
2015-10-05 13:41:04 +02:00
Wladimir J. van der Laan ea709970e0 build: Remove unnecessary chmods after #6616
Don't chmod a repository-included file in the configure script, and
`tests_config.py` is a module that doesn't need to be executable.
2015-10-05 13:32:51 +02:00
Johnathan Corgan dd28089fa2 autotools: move checking for zmq library to common area in configure.ac
* Fixes #6679

* Tested with --disable-zmq
* Tested with and without pkgconfig
* Tested with and without zmq installed

Signed-off-by: Johnathan Corgan <johnathan@corganlabs.com>
2015-10-03 12:21:55 -07:00
Pavel Janík 9ee5ac82f6 Rewrite help texts for features enabled by default. 2015-10-02 07:44:36 +02:00
Wladimir J. van der Laan 5ab5dca6f1
Merge pull request #6616
5467820 Migrated rpc-tests.sh to all python rpc-tests.py (ptschip)
2015-10-01 23:06:02 +02:00
Wladimir J. van der Laan 19c7186425
Merge pull request #6739
96106f0 [Trivial] start the help texts with lowercase (paveljanik)
2015-10-01 22:47:05 +02:00
ptschip 5467820be5 Migrated rpc-tests.sh to all python rpc-tests.py
1) created rpc-tests.py
2) deleted rpc-tests.sh
3) travis.yml points to rpc-tests.py
4) Modified Makefile.am
5) Updated README.md
6) Added tests_config.py and deleted tests-config.sh
7) Modified configure.ac with script to set correct path in tests_config.py
2015-10-01 11:28:11 -07:00
Wladimir J. van der Laan bb24835aed build: disable -Wself-assign
Prevent these warnings in clang 3.6:

    ./serialize.h:96:9: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long') to itself [-Wself-assign]
        obj = (obj);
        ~~~ ^  ~~~
2015-10-01 18:38:54 +02:00