Build util and common before building server #5112

pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:make changing 1 files +6 −4
  1. jtimon commented at 6:42 am on October 21, 2014: contributor
    If after compile one introduces errores in say, chainparams, make will compile main before founding the errors. This change doesn’t guarantee that the dependencies will compiled in the correct order, but it’s a short term solution for convenience.
  2. laanwj commented at 9:21 am on October 21, 2014: member

    I prefer to not enforce any specific build order to leave space for maximum parallelism.

    But I see that this just switches around the order which is fine by me. I’d only suggest to add a comment why it is this way, to avoid people changing it again.

  3. theuni commented at 4:56 pm on October 21, 2014: member

    ACK in principle, but this needs to be reordered for the bin targets as well. This fixes the general “make” and “make check” cases, but not the specific cases like “make bitcoind”. See below for (untested) changes needed in addition to yours.

    Also, this will work itself out soon anyway as we begin shifting libs around as a core lib starts to emerge, but I have no issue with rearranging before that. This way is arguably more correct anyway.

      0diff --git a/src/Makefile.am b/src/Makefile.am
      1index 155adfe..980361d 100644
      2--- a/src/Makefile.am
      3+++ b/src/Makefile.am
      4@@ -259,8 +259,8 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
      5
      6 # bitcoind binary #
      7 bitcoind_LDADD = \
      8-  $(LIBBITCOIN_SERVER) \
      9   $(LIBBITCOIN_COMMON) \
     10+  $(LIBBITCOIN_SERVER) \
     11   $(LIBBITCOIN_UNIVALUE) \
     12   $(LIBBITCOIN_UTIL) \
     13   $(LIBBITCOIN_CRYPTO) \
     14diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
     15index f8f4439..561e033 100644
     16--- a/src/Makefile.qt.include
     17+++ b/src/Makefile.qt.include
     18@@ -358,11 +358,11 @@ endif
     19 if TARGET_WINDOWS
     20   qt_bitcoin_qt_SOURCES += $(BITCOIN_RC)
     21 endif
     22-qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
     23+qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER)
     24 if ENABLE_WALLET
     25 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
     26 endif
     27-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
     28+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
     29   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
     30 if USE_LIBSECP256K1
     31   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
     32diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
     33index 23375be..b3ef9a8 100644
     34--- a/src/Makefile.qttest.include
     35+++ b/src/Makefile.qttest.include
     36@@ -26,11 +26,11 @@ endif
     37
     38 nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
     39
     40-qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
     41+qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER)
     42 if ENABLE_WALLET
     43 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
     44 endif
     45-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
     46+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
     47   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
     48   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
     49 if USE_LIBSECP256K1
     50diff --git a/src/Makefile.test.include b/src/Makefile.test.include
     51cory@cory-i7:~/dev/bitcoin/src(reducedeps3)$ git --no-pager diff Makefile.am Makefile.test.include Makefile.qttest.include Makefile.qt.include
     52diff --git a/src/Makefile.am b/src/Makefile.am
     53index 155adfe..980361d 100644
     54--- a/src/Makefile.am
     55+++ b/src/Makefile.am
     56@@ -259,8 +259,8 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
     57
     58 # bitcoind binary #
     59 bitcoind_LDADD = \
     60-  $(LIBBITCOIN_SERVER) \
     61   $(LIBBITCOIN_COMMON) \
     62+  $(LIBBITCOIN_SERVER) \
     63   $(LIBBITCOIN_UNIVALUE) \
     64   $(LIBBITCOIN_UTIL) \
     65   $(LIBBITCOIN_CRYPTO) \
     66diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
     67index f8f4439..561e033 100644
     68--- a/src/Makefile.qt.include
     69+++ b/src/Makefile.qt.include
     70@@ -358,11 +358,11 @@ endif
     71 if TARGET_WINDOWS
     72   qt_bitcoin_qt_SOURCES += $(BITCOIN_RC)
     73 endif
     74-qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
     75+qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER)
     76 if ENABLE_WALLET
     77 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
     78 endif
     79-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
     80+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
     81   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
     82 if USE_LIBSECP256K1
     83   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
     84diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
     85index 23375be..b3ef9a8 100644
     86--- a/src/Makefile.qttest.include
     87+++ b/src/Makefile.qttest.include
     88@@ -26,11 +26,11 @@ endif
     89
     90 nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
     91
     92-qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
     93+qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER)
     94 if ENABLE_WALLET
     95 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
     96 endif
     97-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
     98+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
     99   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
    100   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
    101 if USE_LIBSECP256K1
    102diff --git a/src/Makefile.test.include b/src/Makefile.test.include
    103index b20e226..deaf97b 100644
    104--- a/src/Makefile.test.include
    105+++ b/src/Makefile.test.include
    106@@ -79,7 +79,7 @@ endif
    107
    108 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
    109 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
    110-test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
    111+test_test_bitcoin_LDADD = $(LIBBITCOIN_COMMON) $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
    112   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
    113 if ENABLE_WALLET
    114 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
    
  4. laanwj commented at 8:14 am on October 22, 2014: member
    @theuni The order of libraries in the linking phase is important, if LIBBITCOIN_SERVER uses symbols from LIBBITCOIN_COMMON then they should be in that order. Right? I don’t think reordering them in the binaries is as harmless as @jtimon’s change.
  5. laanwj added the label Build system on Oct 22, 2014
  6. theuni commented at 3:44 am on October 24, 2014: member

    @laanwj Yes, of course. Ignore that comment.

    Building for specific targets will still go in the old order, but @jtimon’s change is still an improvement.

  7. jtimon force-pushed on Oct 27, 2014
  8. jtimon commented at 11:51 am on October 27, 2014: contributor
    Rebased with comment and a few additional ordering changes.
  9. Build util and common before building server 071473c55c
  10. in src/Makefile.am: in 8923c9f8b7 outdated
    46   libbitcoin_util.a \
    47+  libbitcoin_common.a \
    48   univalue/libbitcoin_univalue.a \
    49-  crypto/libbitcoin_crypto.a
    50+  libbitcoin_server.a \
    51+  libbitcoin_cli.a \
    


    sipa commented at 11:56 am on October 27, 2014:
    remove the \ here and add one after crypto.

    jtimon commented at 12:18 pm on October 27, 2014:
    Opps
  11. jtimon force-pushed on Oct 27, 2014
  12. laanwj merged this on Oct 27, 2014
  13. laanwj closed this on Oct 27, 2014

  14. laanwj referenced this in commit f35d71ed22 on Oct 27, 2014
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me