Commit graph

269 commits

Author SHA1 Message Date
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
Wladimir J. van der Laan
6ac0b3be2d build: Add -static for mingw builds
This avoids a dependency on libssp-0.dll when built with
-fstack-protector-all.
2014-01-22 10:21:34 +01:00
Philip Kaufmann
4e57e23833 enable full GCC Stack-smashing protection for all OSes
- change our hardening options to use -fstack-protector-all even for
  Windows builds, as we recently switched to a newer compiler suite
- also removes an obsolete workaround for GCC 4.5
  (https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/691722), which
  required to first set -fno-stack-protector, before -fstack-protector-all
2014-01-22 09:30:34 +01:00
Wladimir J. van der Laan
fe14e8d790 build: Change package name to Bitcoin Core
Affects the name of the package as shown in installers
and such.

Also rebrand the windows installer.
2014-01-21 19:58:10 +01:00
Wladimir J. van der Laan
2f87b38e2e Adapt Windows installer for 64 bit 2014-01-21 15:25:25 +01:00
Luke Dashjr
e18e1001eb configure: Minor grammatical changes to be more clear 2014-01-18 21:10:52 +00:00
Luke Dashjr
a9dbcf036b configure: Change --with[out]-qt to --with[out]-gui and add --with[out]-cli and --with[out]-daemon to support more build configurations 2014-01-18 20:11:05 +00:00
Luke Dashjr
f47299038d Bugfix: Correct captitalisation of Qt 2014-01-18 20:10:07 +00:00
Luke Dashjr
f930341d81 configure: Internal changes to make building bitcoind and bitcoin-cli optional 2014-01-18 19:54:50 +00:00
Luke Dashjr
4a290b526c Cleanup LevelDB library dependencies 2014-01-18 19:47:21 +00:00
Luke Dashjr
9b4e03b27b Bugfix: Undefine _FORTIFY_SOURCE before redefining it, to avoid warnings on compilers that define it by default 2014-01-18 19:41:10 +00:00
Luke Dashjr
123e4f878e Bugfix: configure: Allow user-provided CXXFLAGS to override default optimisation, debug, and warning flags 2014-01-18 19:41:06 +00:00
Wladimir J. van der Laan
490d6a3046
Merge pull request #3545
1cbbeb6 gitian: Add openssl to linux deps (Wladimir J. van der Laan)
64be7f7 gitian: Build boost dependency for linux (Wladimir J. van der Laan)
7eb99a8 gitian: Reduce build time for boost windows dependency (Wladimir J. van der Laan)
714cdec build: Pass BOOST_CPPFLAGS to sleep implementation test (Wladimir J. van der Laan)
0d40f5a build: Allow providing extra libs for Boost Chrono (Wladimir J. van der Laan)
e4b991e build: Auto-detect whether -DBOOST_TEST_DYN_LINK is needed (Wladimir J. van der Laan)
2014-01-18 16:02:31 +01:00
Wladimir J. van der Laan
714cdecb03 build: Pass BOOST_CPPFLAGS to sleep implementation test
Makes sure that `-pthread` and other flags required for boost
compilation are passed.
2014-01-16 12:45:03 +01:00
Wladimir J. van der Laan
0d40f5a6be build: Allow providing extra libs for Boost Chrono
Pass BOOST_CHRONO_EXTRALIBS to give extra dependency
libraries for Boost Chrono which are not auto-detected.
2014-01-16 12:44:59 +01:00
Wladimir J. van der Laan
e4b991e56d build: Auto-detect whether -DBOOST_TEST_DYN_LINK is needed
Use AC_LINK_IFELSE to auto-detect whether boost test is linked
dynamically, instead of assuming based on target.
2014-01-16 11:58:36 +01:00
Christopher Latham
720731d281 Update configure.ac
Added ubuntu 13.10 and libboost1.54-all-dev incompatibility instruction to the existing no boost_sleep warning.
2014-01-14 16:51:44 -05:00
Wladimir J. van der Laan
5bab55898d
qt: Update copyright year in about dialog to 2014 2014-01-14 09:21:27 +01:00
Wladimir J. van der Laan
b7f4b6d35d GUI for --disable-wallet compiles and -disablewallet mode
There is not much in the GUI to be done without wallet,
though it's possible to change options, watch the sync process,
and use the debug console.

So embed the debug console in the main window.
2014-01-11 12:36:20 +01:00
Cory Fields
2691cbc4b3 qt5: Force macports default include path to be searched last
Allows outside includes to take precedence. In particular, this allows for
a specified Qt to be used without clashing with macports' headers.
2014-01-10 16:30:33 -05:00
Cory Fields
c8ba8ef654 qt5: split out qt config and add qt5 support
Qt5 detection is a big ugly mess, but at least we can fence it off.
2014-01-10 16:30:33 -05:00
Cory Fields
b878b763cb build: fix syntax error on older m4/autoconf.
Fixes #3358. This affects preinstalled autotools on osx 10.6.
2013-12-11 16:27:56 -05:00
Wladimir J. van der Laan
6893d74e15
Merge pull request #3322
26d1b65 src/Makefile.am: Simplify clean of leveldb (Josh Triplett)
a26a367 configure.ac: Check for miniupnpc headers, not just -lminiupnpc (Josh Triplett)
82ccb05 autogen.sh: Stop passing --verbose to autoreconf (Josh Triplett)
e12dafd autogen.sh: Use long options to autoreconf, for self-documentation (Josh Triplett)
19b9add autogen.sh: Support running from outside the source directory (Josh Triplett)
97d285a autogen.sh: Use set -e to fail if any command fails (Josh Triplett)
f80b723 autogen.sh: Add a /bin/sh shebang. (Josh Triplett)
2013-12-08 13:56:12 +01:00
Wladimir J. van der Laan
4f9e993bc9 Add --disable-wallet option to build system
Make it possible to build Bitcoin without wallet
(and thus without BDB) so that it only functions as node.
2013-12-04 12:46:13 +01:00
Josh Triplett
a26a367629 configure.ac: Check for miniupnpc headers, not just -lminiupnpc
This protects against broken systems which have libminiupnpc.a or
libminiupnpc.so installed but don't have the miniupnpc headers.
2013-11-27 18:16:16 -08:00
Florin
c89d59c38a Remove '/': prefix always starts with '/'
brew --prefix retruns a fully qualified path, so using -L/$prefix results in a path with two leading '/'.
2013-11-22 02:07:08 +01:00
Wladimir J. van der Laan
6ad44f5693 configure: lupdate is not needed for Qt build
Don't require lupdate to build with Qt. Like xgettext it is only
needed to update translations, not for normal builds.

This fixes the gitian build (broken by fcfbf547d).
2013-11-14 08:59:43 +01:00
Wladimir J. van der Laan
d6f690f7da Use C99 printf statements in mingw
Otherwise, format specifiers such as %llu will not work on XP or
earlier.
This bug was introduced with 51ed9ec9.
http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
2013-11-13 17:02:27 +01:00
Luke Dashjr
fcfbf547d3 configure: Automatically disable bitcoin-qt by default, if dependencies are not met 2013-11-11 13:09:59 +01:00
Brandon Dahler
51ed9ec971 Cleanup code using forward declarations.
Use misc methods of avoiding unnecesary header includes.
Replace int typedefs with int##_t from stdint.h.
Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
Normalize QT_VERSION ifs where possible.
Resolve some indirect dependencies as direct ones.
Remove extern declarations from .cpp files.
2013-11-10 09:36:28 -06:00
Matt Corallo
47b9374e39 Make large-reorg tests optional in block-tester 2013-10-28 01:16:41 -04:00
Philip Kaufmann
96b9603c01 misc spelling / space / style fixes 2013-10-15 12:13:54 +02:00
Pieter Wuille
6865127551 Merge pull request #3015 from theuni/win32-version-info
Win32 version info
2013-09-29 06:49:23 -07:00
Cory Fields
c589f5f2bd build: add libcrypt32 dep for new mingw. Also ensure that libgcc/libstdc++ are static-linked regardless of the toolchain config 2013-09-25 17:15:57 -10:00
Cory Fields
5ceb9c9637 win32: only check for windres for win32, and fail if missing 2013-09-18 17:58:53 -04:00
Jeff Garzik
2e9c8aed31 configure.ac: remove unneeded OSX flags 2013-09-18 08:21:39 -04:00
Jeff Garzik
8bd6d19a92 configure.ac: remove debug/release concept, prefer autotools default CXXFLAGS 2013-09-18 07:58:05 -04:00
Cory Fields
152e51c7af included-tests: generate binary data from test files for inclusion into test binaries
This change moves test data into the binaries rather than reading them from
the disk at runtime.

Advantages:
- Tests become distributable
- Cross-compile friendly. Build on one machine and execute in an arbitrary
  location on another.
- Easier testing for backports. Users can verify that tests pass without having
  to track down corresponding test data.
- More trustworthy test results and easier quality assurance as tests make
  fewer assumptions about their environment.
- Tests could theoretically run at client/daemon startup and exit on failure.

Disadvantages:
- Required 'hexdump' build-dependency. This is a standard bsd tool that should
  be usable everywhere. It is likely already installed on all build-machines.
- Tests can no longer be fudged after build by altering test-data.
2013-09-16 12:53:11 -04:00
Cory Fields
035ddf6f6b autotools: check for lupdate/xgettext 2013-09-14 12:11:38 -04:00
Luke Dashjr
9a09c0091c configure: Prefer specific known-good versions of Qt metacompiler tools 2013-09-10 22:26:09 +00:00
Luke Dashjr
941dba1783 configure: Check common include subdirectories for bdb headers, and refuse to use any version other than 4.8 by default 2013-09-10 22:26:00 +00:00
Jeff Garzik
12564aa166 configure.ac: remove superfluous bracket
Reported-by: Cory Fields
2013-09-07 19:42:32 -04:00
Cory Fields
35b8af9226 autotools: switch to autotools buildsystem 2013-09-05 21:31:03 -04:00