Commit Graph

33 Commits

Author SHA1 Message Date
Thomas Winget 73e787a9ec sqlitecpp cmake nonsense 2021-10-06 19:36:46 -04:00
Jason Rhinelander 14cb314f70 Add patch for hidapi + autoconf 2.70+
Fixes the mac build, and will fix future linux build once distros start
shipping 2.70+.
2021-07-06 20:07:52 -03:00
Jason Rhinelander b0108481c9 Update boost download URL 2021-06-10 10:42:55 -03:00
Jason Rhinelander 96245f81d5 Undo version check on zmq patch
Apparently this isn't fixed in 4.3.4
2021-04-21 21:43:34 -03:00
Jason Rhinelander f470dddcff Fix broken curl hash
I put the .bz2 hash by mistake.
2021-04-21 01:19:33 -03:00
Jason Rhinelander c1cdf4cbaa Try again with cross compiler fix 2021-04-21 01:19:33 -03:00
Jason Rhinelander 5b5e8436d0 Boost build fixes
bootstrap.sh seems completely broken in boost 1.76.0 when you want to
use something other than the default compiler: it doesn't respect CXX
anymore, and if you give it --cxx to specify the CXX compiler it
produces a broken project-config.bjam file that prevents the project
from building.

Just skip that crap and build and use b2 ourselves.
2021-04-21 01:19:33 -03:00
Jason Rhinelander da50c398c1 Update bundled deps for static binaries
- openssl 1.1.1k
- libexpat 2.3.0
- libunbound 1.31.1
- boost 1.76.0
- readline 8.1
- sqlite 3.35.5
- eudev 3.2.10
- libusb 1.0.24
- libzmq 4.3.4
- curl 7.76.1
2021-04-21 01:19:33 -03:00
Jason Rhinelander eca6b6ad8d Disable Trezor by default
Trezor support currently doesn't work (Trezor's hardware wallet is
hard-coded for a Monero net-id), and this saves needing to muck around
with protobuf.
2021-01-08 18:15:25 -04:00
Jason Rhinelander c77278173c Update dependencies to latest stable versions
I tried to update protobuf as well, but it doesn't compile on mingw, so
leave it as-is for now.
2021-01-07 18:37:52 -04:00
Jason Rhinelander acaf12c013 Build hack for curl 2020-11-06 00:41:28 -04:00
Jason Rhinelander 119ed3770a ios build hack for unbound 2020-11-06 00:41:28 -04:00
Jason Rhinelander daaa8dbefd Lots of build hacks for iOS 2020-11-04 15:06:59 -04:00
Jason Rhinelander 749920e6c6 Force -fPIC for zlib 2020-11-04 12:11:20 -04:00
Jason Rhinelander 638a45f457 Update static deps library versions 2020-11-04 12:11:20 -04:00
Jason Rhinelander 7a533e19a3 Add android build to drone steps 2020-11-04 12:11:20 -04:00
Jason Rhinelander bb40433612 Android build infrastructure updates
- Various static deps updated needed for properly cross-compiling
libraries for android.
- disable LTO because it doesn't work reliably with the android NDK.
- allow building without miniupnpc, and default to not building it under
android.
- make sure we build translation tools on the native arch when
cross-compiling for android.
- don't build ncurses, libusb, hidapi when doing an android build
2020-11-04 12:11:20 -04:00
Jason Rhinelander fdc35d5114 Remove boost filesystem/date-time from deps 2020-10-24 12:46:26 -03:00
Jason Rhinelander 1dd98f3dae std::filesystem
Converts all use of boost::filesystem to std::filesystem.

For macos and potentially other exotic systems where std::filesystem
isn't available, we use ghc::filesystem instead (which is a drop-in
replacement for std::filesystem, unlike boost::filesystem).

This also greatly changes how we handle filenames internally by holding
them in filesystem::path objects as soon as possible (using
fs::u8path()), rather than strings, which avoids a ton of issues around
unicode filenames.  As a result this lets us drop the boost::locale
dependency on Windows along with a bunch of messy Windows ifdef code,
and avoids the need for doing gross boost locale codecvt calls.
2020-10-24 12:45:37 -03:00
Jason Rhinelander 026086613a Fix boost flags, enable LTO 2020-10-14 23:04:53 -03:00
Jason Rhinelander c4134a589e fix boost macosx target 2020-10-14 22:16:21 -03:00
Jason Rhinelander 68b0f93f5d Apply macosx target BS to static deps 2020-10-14 20:09:03 -03:00
Jason Rhinelander 4fd9a7dff5 Disable readline in static build 2020-10-02 01:02:48 -03:00
Jason Rhinelander 5ba6197d59 Update zeromq patches for mingw 2020-09-16 13:14:24 -03:00
Jason Rhinelander 83d9a95f44 Update submodules and static build deps to latest versions 2020-09-16 11:46:38 -03:00
Jason Rhinelander b7a7dfc080 Add zlib + curl to static deps 2020-08-07 17:14:03 -03:00
Jason Rhinelander dc9101d457 Set ZMQ_STATIC definition on the target rather than globally 2020-07-02 12:55:28 -03:00
Jason Rhinelander d667ff2edd Windows compilation fixes 2020-07-02 12:55:28 -03:00
Jason Rhinelander 718a9496fb Replace boost chrono & posix_time with stl chrono 2020-07-02 12:52:13 -03:00
Jason Rhinelander 37a341ff6b Remove boost regex dependencies
All boost::regex use is now replaced with std::regex.
2020-07-02 12:52:13 -03:00
Jason Rhinelander f226d1b180
Fix typo in static sqlite external target (#1184)
This could cause sqlite3 to not get built in time (found via lokinet,
which copied this, where this issue showed up).
2020-06-29 11:06:09 +10:00
Jason Rhinelander 5da3d2f7ef Drone: add static builds for mac/linux/windows
Adds static drone builds for linux (built on bionic), mac, and Windows
(built with mingw32).

The builds get uploaded to https://builds.lokinet.dev

The linux and mac builds use LTO (which takes longer, but significantly
reduces binary size).  The mingw32 build can probably also get there,
but currently fails with LTO when unbound tries linking against openssl
(it probably just needs a small patch to add magic -lwsock2 dep in the
right place in unbound).

The Mac binaries are built using a 10.13 deployment target.  (I'm not
100% sure that this is sufficient -- it's possible we might have to also
push the magic mac deployment flag to the built dependencies).
2020-06-15 12:49:34 -03:00
Jason Rhinelander 70b9fed4fd Static builds: make usable binaries from cmake
This adds a static dependency script for libraries like boost, unbound,
etc. to cmake, invokable with:

    cmake .. -DBUILD_STATIC_DEPS=ON

which downloads and builds static versions of all our required
dependencies (boost, unbound, openssl, ncurses, etc.).  It also implies
-DSTATIC=ON to build other vendored deps (like miniupnpc, lokimq) as
static as well.

Unlike the contrib/depends system, this is easier to maintain (one
script using nicer cmake with functions instead of raw Makefile
spaghetti code), and isn't concerned with reproducible builds -- this
doesn't rebuild the compiler, for instance.  It also works with the
existing build system so that it is simply another way to invoke the
cmake build scripts but doesn't require any external tooling.

This works on Linux, Mac, and Windows.

Some random comments on this commit (for preserving history):

- Don't use target_link_libraries on imported targets.  Newer cmake is
fine with it, but Bionic's cmake doesn't like it but seems okay with
setting the properties directly.

- This rebuilds libzmq and libsodium, even though there is some
provision already within loki-core to do so: however, the existing
embedded libzmq fails with the static deps because it uses libzmq's
cmake build script, which relies on pkg-config to find libsodium which
ends up finding the system one (or not finding any), rather than the one
we build with DownloadLibSodium.  Since both libsodium and libzmq are
faily simple builds it seemed easiest to just add them to the cmake
static build rather than trying to shoehorn the current code into the
static build script.

- Half of the protobuf build system ignores CC/CXX just because Google,
and there's no documentation anywhere except for a random closed bug
report about needing to set these other variables (CC_FOR_BUILD,
CXX_FOR_BUILD) instead, but you need to.  Thanks Google.

- The boost build is set to output very little because even the minimum
-d1 output level spams ~15k lines of output just for the headers it
installs.
2020-06-15 12:49:33 -03:00