gitian: Build OpenSSL and Boost dependencies for linux#3545
gitian: Build OpenSSL and Boost dependencies for linux#3545laanwj merged 6 commits intobitcoin:masterfrom
Conversation
|
Nack on the boost changes. The user does not control whether we link against shared libs or static, the linker does. The linker can be explicitly told what to do by passing something like "LDFLAGS=-static". Having an option for it does not make sense. Instead, we should test with -DBOOST_TEST_DYN_LINK, and store the pass/fail result as a way of knowing whether we're shared or static. Basically, if it links with the define, use the define. As for librt, that should not be hard-coded, because it's implementation-specific and may or may not be in librt. AC_SEARCH_LIBS should be used instead. |
|
I'm not happy with the --with-static-boost either, but for me it was the only way to get it to work. Feel free to improve on it later. |
|
If you're trying to reduce build-time for boost, you should specify on the modules you want, that avoids building/installing the ones we don't use. Something like: |
|
I just explained how to make it work. Is there a rush here? |
|
Indeed, specifying the modules is a possibility to make the boost build even faster. I may do that later. We don't use the trigonometry and geometry and such modules and we likely never will for bitcoin :) No rush but I'm happy to see this working at all. I've been working for two days on gitian building stuff and I'm sick and tired of it. I suck at autotools and if there was a way to do the -DBOOST_TEST_DYN_LINK/-lrt stuff without touching configure.ac I'd have preferred that, but I didn't find a way. What you propose sounds like the better solution, no argument there... |
|
c665d663e0bae284a23076160e4ffa77450480489199955c0c8b561de577a464 bitcoin-deps-linux32-gitian-r2.tar.gz Do your builds match? |
|
1a0100fe7ad0fb77ed51b46dc8c82f25528023e8c2953fbab9b9ff6de54164f7 boost-linux32-1.55.0-gitian-r1.tar.gz |
|
99% chance tarballs won't match without: #3546 (comment) |
|
@wtogami I haven't focused on determinism of the intermediate outputs yet at all. Let's first make sure that the build works and produces correct executables. |
|
@laanwj |
|
Thanks for testing! |
|
Going to rebase and use a .zip for the built boost dependency as well. @theuni I've thought about the static boost link bit:
Edit: darn, .la files are simply ignored, libtool is not used for the autoconf tests. |
Use AC_LINK_IFELSE to auto-detect whether boost test is linked dynamically, instead of assuming based on target.
Pass BOOST_CHRONO_EXTRALIBS to give extra dependency libraries for Boost Chrono which are not auto-detected.
Makes sure that `-pthread` and other flags required for boost compilation are passed.
Build only the mt-s (multithreaded, static runtime link) variant of the library. This cuts the build time in half. Also prevent unpacked boost from ending up in output directory, checking and hashing all the source files as output files this takes a lot of time and is pointless.
Instead of using the boost provided by Ubuntu 12.04, build our own dependency like we do for Windows. This allows using a much newer version (1.55 versus 1.46) as well as building with `-fPIC` so that `-pie` can be used in the x86-64 build.
Build OpenSSL instead of using distribution-provided library.
|
Ok I added a check for I've also removed the option |
|
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/7f51b918109263501de1592e647ebf136e1cd5be for binaries and test log. |
|
2ee4dfb8c7351a95859b6b19f2568841326f1ae7f4b2c74ef7477bd0496261e9 bitcoin-deps-linux32-gitian-r2.zip 0f44759738bff1eaa1284e7f53e51b0679658c0161d9e085b4d5ea4fa70fdab8 boost-linux32-1.55.0-gitian-r1.zip ACK |
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)
|
@laanwj Any time you link a static lib you have to worry about dependencies of dependencies. It comes with the territory. It's been "solved" many times via libtool, pkgconfig, etc. In this case, as boost doesn't ship a .pc and we're not using libtool, so it's our responsibility to solve it. It's a major strike against boost in my opinion, but one that many projects are forced to deal with. Either way, the lib containing clock_gettime isn't harmful for any OS, so I really suggest adding that as a general dependency. It's almost guaranteed that we'll need those symbols eventually. |
After these changes, openssl and boost are built statically in the linux build and use the same versions as the win32 build.
elfread -dnow reportsbitcoind:
bitcoin-qt: