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.
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
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.
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.
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.
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.
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.
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
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.
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.
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.
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>
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.
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.
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...)
- 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