Commit Graph

157 Commits

Author SHA1 Message Date
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
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