Commit graph

492 commits

Author SHA1 Message Date
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
Wladimir J. van der Laan bb882d04e8
Merge pull request #6732
a3874c7 doc: no longer require use of openssl in OpenBSD build guide (Wladimir J. van der Laan)
5978388 build: remove libressl check (Wladimir J. van der Laan)
2015-10-01 18:12:36 +02:00
Wladimir J. van der Laan 5978388476 build: remove libressl check
Now that BIP66 passed, OpenSSL is no longer directly part of the
consensus. What matters is that DER signatures are correctly parsed, and
secp256k1 crypto is implemented correctly (as well as the other
functions we use from OpenSSL, such as random number generation)

This means that effectively, using LibreSSL is not a larger risk than
using another version of OpenSSL.

Remove the specific check for LibreSSL.

Includes the still-relevant part of #6729: make sure CHECK_HEADER is
called using the right CXXFLAGS, not CFLAGS (as AC_LANG is c++).
2015-10-01 14:44:27 +02:00
Jonas Schnelli 9623e93473 [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2015-10-01 10:49:57 +02:00
Gavin Andresen 535ed9223d
Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)

Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.

The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.

See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'

To compile and run benchmarks:
  cd src; make bench

Sample output:

Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2015-09-30 09:24:42 -04:00
paveljanik 96106f0f30 [Trivial] start the help texts with lowercase 2015-09-30 08:40:20 +02:00
Johnathan Corgan 6cebd5d854 zmq: require version 4.x or newer of libzmq
Signed-off-by: Johnathan Corgan <johnathan@corganlabs.com>
2015-09-29 10:18:07 -07:00
Jeff Garzik 0143a1f228
configure.ac: Revert autotools-auto-updated 2.69 autoconf requirement
Also, autotools reformatted the AC_ARG_ENABLE erroneously as well.
2015-09-16 10:25:51 -04:00
Jeff Garzik ca5e2a1864
Merge pull request #6317 2015-09-16 09:40:53 -04:00
Jeff Garzik e6a14b64d6 Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
Continues Johnathan Corgan's work.
Publishing multipart messages

Bugfix: Add missing zmq header includes

Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
2015-09-16 11:01:35 +01:00
Wladimir J. van der Laan 3140ef9249 build: build-system changes for libevent 2015-09-02 18:38:41 +02:00
Cory Fields d9add71951 build: fix libressl detection
Checking libcrypto for a function after we've already found a (possibly
different) libcrypto is not what we want to do here.

pkg-config might've found a cross lib while AC_CHECK_LIB may find a different
or native one.

Run a link-test against the lib that's already been found instead.
2015-07-31 23:16:13 -04:00
Gavin Andresen 83b48c8971
configure --enable-debug changes
Three changes to how configure --enable-debug behaves:

1. Preserve user-passed CXXFLAGS/CFLAGS
2. Compile with -DDEBUG_LOCKORDER
3. Add -DDEBUG -DDEBUG_LOCKORDER to CPPFLAGS (since they are preprocessor options)
2015-07-15 14:05:50 -04:00
Wladimir J. van der Laan b6668209aa build: Remove -DBOOST_SPIRIT_THREADSAFE
Now that boost spirit is no longer used, `-DBOOST_SPIRIT_THREADSAFE`
doesn't need to be passed to the compiler anymore.
2015-06-21 14:09:34 +02:00
Wladimir J. van der Laan d9a94b7009
Merge pull request #6244
a5a81f7 configure: Detect (and reject) LibreSSL (Luke Dashjr)
2015-06-10 08:08:59 +02:00
Andriy Voskoboinyk 0640a5eb60 Add an alternate location of endian.h header 2015-06-07 04:54:20 +03:00
Luke Dashjr a5a81f7354 configure: Detect (and reject) LibreSSL 2015-06-06 14:23:38 +00:00
Wladimir J. van der Laan 7fd5b801ff
build: disable optional use of gmp in internal secp256k1 build
Until secp256k1 is used for verification there is no reason for Bitcoin
Core's secp256k1 to link against gmp, even if available. Pass a flag to
configure to override the bignum implementation.

This fixes a crash at runtime on ppc64 reported by @gmaxwell.
2015-06-01 11:14:44 +02:00
Wladimir J. van der Laan 3e8ccc765a
Now that 0.11 has been branched, master is 0.11.99
... in preparation for 0.12
2015-06-01 10:34:19 +02:00
Cory Fields ca66717d89
build: make libboost_chrono mandatory
previously it was only used with certain boost versions. Now all versions
require it.
2015-05-14 10:37:19 -04:00
Jonas Schnelli 3727cbb0a2 change AC_PACKAGE_BUGREPORT from info@bitcoin.org to github issue tracker URL
Mentioned by wumpus:
http://bitcoinstats.com/irc/bitcoin-dev/logs/2015/05/02#l1430543664

Details here:
http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Initializing-configure.html
2015-05-02 10:17:53 +02:00
Wladimir J. van der Laan 4414f5ffe1 build: Endian compatibility
- Detect endian instead of stopping configure on big-endian
- Add `byteswap.h` and `endian.h` header for compatibility with
  Windows and other operating systems that don't come with them
- Update `crypto/common.h` functions to use compat
  endian header
2015-03-06 15:54:53 +01:00
Wladimir J. van der Laan f8e68f7bfb
Merge pull request #5819
d23b0a2 depends: always use static qt5 for linux (Cory Fields)
3448b13 build: fix typo in configure help (Cory Fields)
c95ac83 gitian: fix x86_64 build with static libstdc++ (Cory Fields)
0671516 build: change reduce exports/static libstdc++ options for gitian and travis (Cory Fields)
aa36730 build: remove libstdc++ backwards-compat (Cory Fields)
3ee028f build: disable reduced exports by default (Cory Fields)
2015-03-03 16:27:50 +01:00
Cory Fields 16a58a8644 keys: remove libsecp256k1 verification until it's actually supported
This was added a while ago for testing purposes, but was never intended to be
used. Remove it until upstream libsecp256k1 decides that verification is
stable/ready.
2015-03-02 11:31:43 -05:00
Cory Fields 3448b132c4 build: fix typo in configure help 2015-02-23 20:18:54 -05:00
Cory Fields aa3673064c build: remove libstdc++ backwards-compat
Backwards-compatibility for libstdc++ is not limited to straightforward abi
changes. Symbol visibility also needs to be taken into consideration, and
that really can't be addressed simply.

Instead, just static-link libstdc++ for backwards-compat.
2015-02-23 17:56:15 -05:00
Cory Fields 3ee028f131 build: disable reduced exports by default
This is really a packager's option. While it's helpful to encourage devs to
test this option for daily builds, it's not reliable in several real-world
use-cases. Some older libstdc++ runtimes (freebsd 9, debian wheezy, for
example) fail to properly catch exceptions due to mismatched type_info.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 for more info.
2015-02-23 17:48:57 -05:00
randy-waterhouse e7cfcc8f7e Remove custom pkg.m4 script. 2015-01-21 12:10:35 +13:00
Wladimir J. van der Laan 204d41a821
Merge pull request #5542
2ecd294 Bugfix: configure: Correctly detect "nothing to build" condition (Luke Dashjr)
b7a4ecc Bugfix: Only check for boost when building code that requires it (Luke Dashjr)
a19eeac Bugfix: configure: Check for openssl/ec.h (Luke Dashjr)
fe925e2 Use EXTRA_LIBRARIES instead of noinst_LIBRARIES so we can avoid building unused code (Cory Fields)
2015-01-08 09:32:36 +01:00
Luke Dashjr 2ecd2941ed Bugfix: configure: Correctly detect "nothing to build" condition 2015-01-07 20:19:56 +00:00
Luke Dashjr b7a4ecc153 Bugfix: Only check for boost when building code that requires it 2015-01-07 20:19:05 +00:00
Luke Dashjr a19eeaced8 Bugfix: configure: Check for openssl/ec.h 2015-01-07 15:59:54 +00:00
Wladimir J. van der Laan edbc9045cb
Bump project-wide COPYRIGHT_YEAR to 2015
There is still a redundancy here between configure.ac and
clientversion.h.
2015-01-02 10:53:13 +01:00
Wladimir J. van der Laan cf875367d2
Merge pull request #5334
eef747b libbitcoinconsensus: Add pkg-config support (Luke Dashjr)
2014-12-19 18:05:04 +01:00
Wladimir J. van der Laan d7492304e9
Now that 0.10 has been branched, master is 0.10.99 2014-12-11 16:03:46 +01:00
Pavel Janík 4c69ebed44 Add /opt/local/include/db48 only if it exists. 2014-11-30 09:56:20 +01:00
Wladimir J. van der Laan 91eaedd4ce
Merge pull request #5370
b7f2cdc build: disable static lib stripping during osx make install-strip (Cory Fields)
2014-11-26 11:07:25 +01:00
Cory Fields b7f2cdc8a9 build: disable static lib stripping during osx make install-strip 2014-11-25 18:41:27 -05:00
Pavel Janík 494f6e7d35 Check for strnlen and provide it if it is not found. 2014-11-24 10:28:24 +01:00
Luke Dashjr eef747bba8 libbitcoinconsensus: Add pkg-config support 2014-11-20 21:23:34 +00:00
Cory Fields 9eb5a5fbef build: pad header for osx libs
This ensures that users of the lib will be able to mangle the paths to work
in their bundles.
2014-11-19 22:31:11 -05:00
Cory Fields 9ed8979e29 build: fix static dll link for mingw
dll's are no longer dynamically linked to libgcc/libstdc++/libssp
2014-11-19 22:31:11 -05:00
Cory Fields 19df238a7b build: shared lib build should work reasonably well now 2014-11-19 22:31:10 -05:00
Cory Fields cdd36c6c5c build: add --with-libs so that libs are optional 2014-11-19 22:31:10 -05:00
Cory Fields f36a40f7fd build: check visibility attributes 2014-11-19 22:08:27 -05:00
Cory Fields 811a765bef build: mingw needs libssp for hardening with dlls 2014-11-19 22:08:27 -05:00
Cory Fields e0077de5de build: make a distinction between static app ldflags and static lib ldflags
For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
2014-11-19 22:08:27 -05:00
Cory Fields f9e40fb075 revert part of 9eda1620b
This probably would've broken native OSX builds
2014-11-18 18:06:47 +01:00
Cory Fields 0dc8613864 build: fixup configure to not export anything 2014-11-18 18:06:47 +01:00
Pieter Wuille cf61b5441b Don't use bashisms in configure 2014-11-18 18:06:46 +01:00
Pieter Wuille 07a9901703 Always build and link libsecp256k1 2014-11-18 18:06:46 +01:00
kiwigb eefb766c77 Rearrange initial config checks: AC, AM, compiler, libtool.
Removed some repeated and unused prog checks.
2014-11-06 14:30:59 +13:00
Cory Fields 7667850dbf tests: replace the old (unused since Travis) tests with new rpc test scripts 2014-10-31 00:05:55 -04:00
Cory Fields 1723862e82 build: fix libtool's refusal to link static libs into a dll 2014-10-14 20:45:20 -04:00
Cory Fields 28d412ff20 build: quit abusing LIBS for Windows builds.
Similar to the INCLUDES changes in 6b099402b4, split out LIBS into individual
entries for more fine-grained control.

Also add MINIUPNPC_LIBS which was missing before, and hook it up to
executables.
2014-10-13 21:21:27 -04:00
Cory Fields a7d1f035ae build: fix dynamic boost check when --with-boost= is used 2014-10-10 13:00:50 -04:00
Wladimir J. van der Laan ca067dc937
Merge pull request #5053
27368e7 Homebrew lang fix (Dominyk Tiller)
2014-10-07 09:58:21 +02:00
Dominyk Tiller 27368e7626 Homebrew lang fix
Very small tweak to correct the language on Homebrew's sandboxing process.

Discussed in [this commit](9fedafba4b).
2014-10-06 21:36:24 +01:00
Luke Dashjr b77b4eda8d Bugfix: Replace bashisms with standard sh to fix build on non-BASH systems 2014-10-03 23:45:26 +00:00
Cory Fields 9fedafba4b build: Fix OSX build when using Homebrew and qt5
Qt5 is bottled, so configure won't find it without some help. Use
brew to find out its prefix.

Also, qt5 added the host_bins variable to pkg-config, use it.
2014-10-01 19:26:29 -04:00
Cory Fields 41d67c78bf tests: fix python test-runner for windows
Windows needed a few fixups to get the tests running:
1. bitcoin-tx needs a file extension in Windows. Take this opportunity to
   add an env file, which pulls variables out of our build config. This can
   be extended as needed, for now it's very simple.
2. After #1, split the args out of the exec key in the test data.
3. Correct the line-endings from windows stdout
2014-09-30 16:26:22 -04:00
randy-waterhouse e2a98d270d Update obsolete AC macros. 2014-09-16 23:17:20 +12:00
randy-waterhouse e54381117a Add warnings for autogen.sh. Fix AC_CONFIG_SRCDIR. 2014-09-16 23:17:20 +12:00
randy-waterhouse 52a5f90360 Create the common location for all m4 autotool build scripts, build-aux/m4.
Update .gitignore.
2014-09-16 11:55:15 +02:00
Wladimir J. van der Laan 107922663b
Merge pull request #4767
b144a74 depends: bump miniupnpc to 1.9.20140701. (Cory Fields)
f628127 depends: bump openssl to 1.0.1i (Cory Fields)
9f7f504 build: add -DMINIUPNP_STATICLIB for new version (Cory Fields)
2014-09-01 10:28:33 +02:00
Wladimir J. van der Laan 539abc4729
build: Remove message about Ubuntu 13.10 when no boost sleep implementation found
It's only confusing people into thinking that they should mess with
boost versions, which should not be necessary to get bitcoind to work.

If there is a bug in the build system with autodetecting boost it needs
to be solved not worked around.
2014-08-29 13:02:23 +02:00
Cory Fields 9f7f504efc build: add -DMINIUPNP_STATICLIB for new version
libminiupnpc changed their required static define to the much more sane
"MINIUPNP_STATICLIB". Sadly, they don't respect the old "STATICLIB" for
back-compat. Define them both since the old one didn't seem to be conflicting
anywhere.

Also go ahead and split out the cppflags so that they can be applied only where
they're needed. This will help us to build dll's from our libs without having
their import/export declspecs poisoned.
2014-08-26 15:28:24 -04:00
Cory Fields 386efb7695 build: work around ccache/autotools warning-spamming bug
When using clang and ccache, builds spew lots of:
Clang: warning: argument unused during compilation

Upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=8118

This is harmless, bug annoying. If ccache is being used and the
-Qunused-arguments flag is supported (clang), use it.
2014-08-21 13:12:00 -04:00
Cory Fields e432a5f08d build: add option for reducing exports (v2)
This was committed previously as 4975ae172 and reverted, because the flags were
applied even if the checks didn't pass. This is the same commit, fixed up to
actually disable the functionality when necessary.

Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
2014-08-18 16:10:15 -04:00
Wladimir J. van der Laan fad23a210b
Revert "build: add option for reducing exports"
Revert #4663 for now. It still breaks the pulltester.

This reverts commit 4975ae1722.

Conflicts:
	configure.ac
2014-08-18 16:52:56 +02:00
randy-waterhouse c101c76907 build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes).
Help string consistency tweaks. Target sanity check fix.
2014-08-17 20:22:12 +12:00
Cory Fields 4975ae1722 build: add option for reducing exports
Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
2014-08-15 17:42:53 -04:00
Cory Fields 6b099402b4
build: fix automake warnings about the use of INCLUDES
While we're at it, reduce the use of LIBS as well. This makes dependencies
explicit.

Fixes building with (the not-yet-merged) libsecp256k1 as well.

Github-Pull: #4689
Rebased-By: Wladimir J. van der laan <laanwj@gmail.com>
Rebased-From: 909b347 c0e5dda
2014-08-15 10:42:10 +02:00
Wladimir J. van der Laan 4c61ba40b9 build: check for sys/prctl.h in the proper way
Use AC_CHECK_HEADERS to check for the header, and include it only
if detected and the subsequent HAVE_SYS_PRCTL_H is set.
2014-08-12 13:04:55 +02:00
Cory Fields 8021cf8dbc build: fix FDELT_TYPE configure check
This probably never worked properly. Confirmed working now with every compiler
I throw at it.
2014-08-08 15:20:14 -04:00
Cory Fields eccd58567d build: silence mingw fpic warning spew 2014-08-06 17:09:01 -04:00
Cory Fields a98356fee8 build: don't let libtool insert rpath into binaries 2014-08-06 15:14:30 -04:00
Cory Fields 460b32d7b1 build: fix broken boost chrono check on some platforms
If clock_gettime is implemented outside of libc (librt in this case), configure
would fail when testing boost. Since clock_gettime is not present on all OSs,
boost only uses it when it can. Check for it in librt and add it to LIBS if
found, but don't fail if it's not (since boost won't be expecting it in this
case).

Also, reverse the link order as necessary for static libs.

Note that it's possible that there are other similar cases for boost, which may
be handled the same way.
2014-07-22 09:21:09 -04:00
Cory Fields 2d89ea9781 build: fix whitespace in pkg-config variable
Useful for PKG_CONFIG="pkg-config --static"
2014-07-17 22:15:21 -04:00
Cory Fields ab123ad4d6 build: allow linux and osx to build against static qt5
This is the first part of a huge effort to rework the handling of dependencies.
To start, this change allows all supported platforms to build against a static
Qt. 5.2.1 and 5.3 have been successfully tested against osx64, win32, win64,
linux32, and linux64.

It also makes a small change to the windows config, to allow linking against
qt builds with or without built-in libjpeg/libpng/libpcre/libz.

The actual build processes to take advantage of these changes (for gitian and
pull-tester) are coming soon. Until then, this should be a no-op.
2014-07-17 22:13:40 -04:00
Cory Fields 575e70c0c6 build: fix win32 static linking after libtool merge
Libtool eats the -static flag rather than passing it along to the compiler. To
get the same effect, -all-static is used instead.
2014-07-08 15:53:53 -04:00
Wladimir J. van der Laan e81e2e8f7c
Merge pull request #4421
caf6150 Use async name resolving to improve net thread responsiveness (Huang Le)
2014-07-04 08:40:01 +02:00
Cory Fields 5566826635 secp256k1: Add build-side changes for libsecp256k1
Note: This is added to our existing automake targets rather than as a
libtool-style lib. The switch to libtool-style targets can come later if it
proves to not add any complications.
2014-07-01 12:27:19 -04:00
Cory Fields b150b09edc secp256k1: add libtool as a dependency 2014-07-01 12:27:15 -04:00
Huang Le caf6150e97 Use async name resolving to improve net thread responsiveness
In the LookupIntern(), things changed are:

  1. Call getaddrinfo_a() instead of getaddrinfo() if available, the former is a sync version of the latter;
  2. Try using inet_pton()/inet_addr() to convert the input text to a network addr structure at first, if success the extra name resolving thread inside getaddrinfo_a() could be avoided;
  3.  An interruption point added in the waiting loop for return from getaddrinfo_a(), which completes the improve for thread responsiveness.

A easy way to see the effect is to kick off a 'bitcoind stop' immediately after 'bitcoind -daemon', before the change it would take several, or even tens of, minutes on a bad network situation to wait for the running bitcoind to exit, now it costs only seconds.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-06-27 02:55:39 +08:00
Cory Fields f2647cc0e9 crypto: explicitly check for byte read/write functions
Don't depend on hard-coded platform lists
2014-06-21 19:47:43 +02:00
Cory Fields 54372482a8 build: move bitcoin-config.h to its own directory
This allows us to include its path without making other header includes valid.
2014-06-21 19:47:43 +02:00
Cory Fields 11404af34c sanity: autoconf check for sys/select.h 2014-06-16 17:21:34 -04:00
Cory Fields 65e8ba4dbe build: Switch to non-recursive make
Build logic moves from individual Makefile.am's to include files, which
the main src/Makefile.am includes. This avoids having to manage a gigantic
single Makefile.

TODO: Move the rules from the old Makefile.include to where they actually
belong and nuke the old file.
2014-06-05 16:05:17 -04:00
Wladimir J. van der Laan a60838d09a Replace non-threadsafe strerror
Log the name of the error as well as the error code if a network problem
happens. This makes network troubleshooting more convenient.

Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
2014-05-23 09:45:04 +02:00
Wladimir J. van der Laan e27c4110d9 Remove build-time no-IPv6 setting
The year is 2014. All supported operating systems have IPv6 support,
most certainly at build time (this doesn't mean that IPv6 is configured,
of course).

If noone is exercising the functionality to disable it, that means it
doesn't get tested, and IMO it's better to get rid of it.

(it's also not used consistently in RPC/boost and Net code...)
2014-05-01 12:15:36 +02:00
Cory Fields d5aab70490 build: add an option for enabling glibc back-compat
Using "./configure --enable-glibc-back-compat" will attempt to be
compatible with a target running glibc abi 2.9 and libstdc++ abi 3.4.
2014-04-10 22:28:26 -04:00
Cory Fields 01e5327cfc build: hook up "make deploy" for cross osx builds 2014-03-20 13:06:17 -04:00
Cory Fields b62bbb1ff0 build: if cross-compiling for an apple host, locate some additional tools
This should be safe to do for native builds too, but for now it's
specific to cross-builds to avoid possible regressions.
2014-03-20 13:06:16 -04:00
Wladimir J. van der Laan 1795c69aaa
Merge pull request #3833
f5f157b add --enable-debug for configure (daniel)
2014-03-10 12:34:53 +01:00
daniel f5f157b83f add --enable-debug for configure 2014-03-10 19:11:01 +08:00
Wladimir J. van der Laan ad6ae48939
build: Version bump to 0.9.99, disable IS_RELEASE
`master` is not a release. Use the same convention as before and label
these intermediate builds as x.x.99.
2014-03-04 13:33:39 +01:00
Midnight Magic 505867acae -Wl,-z,relro and -z,now were wiping out environmental LDFLAGS passed in by the user.
I moved them to HARDENING_* where they belong.
2014-02-05 11:24:42 -08:00
Wladimir J. van der Laan f9a2f08882 Bump version numbers for 0.9.0rc1 release 2014-01-29 16:09:11 +01:00
Wladimir J. van der Laan b77dfdc9e3 Typesafe strprintf/error/LogPrint functions
Switch to tinyformat-based formatting.

Tinyformat is a typesafe drop-in replacement for C99 printf functions:
https://github.com/c42f/tinyformat
2014-01-23 16:05:00 +01:00
Wladimir J. van der Laan 6746787a0c
Merge pull request #3560
fe14e8d build: Change package name to Bitcoin Core (Wladimir J. van der Laan)
6c980c7 build: Package docs/ and don't package source. (Wladimir J. van der Laan)
39db27c build: Add bitcoin-cli.exe to installer (Wladimir J. van der Laan)
2f87b38 Adapt Windows installer for 64 bit (Wladimir J. van der Laan)
f622232 gitian: Windows 64 bit support (Wladimir J. van der Laan)
2014-01-23 08:26:11 +01:00