Build fail in bitcoin core on macOS #52

issue promag openend this issue on April 6, 2021
  1. promag commented at 7:46 am on April 6, 2021: none

    Trying to build bitcoin/bitcoin@a3d7a9864b on macOS results in the following error:

      0  ipc-echo git:(pr/ipc-echo) make
      1Making all in src
      2  CXX      ipc/capnp/libbitcoin_ipc_a-echo.capnp.proxy-client.o
      3In file included from ipc/capnp/echo.capnp.proxy-client.c++:3:
      4In file included from ./ipc/capnp/echo.capnp.proxy-types.h:6:
      5./ipc/capnp/echo.capnp.proxy.h:17:35: error: use of undeclared identifier 'interfaces'
      6    static constexpr auto impl = &interfaces::Echo::echo;
      7                                  ^
      8./ipc/capnp/echo.capnp.proxy.h:57:103: error: use of undeclared identifier 'interfaces'
      9struct ProxyClient<ipc::capnp::messages::Echo> : public ProxyClientCustom<ipc::capnp::messages::Echo, interfaces::Echo>
     10                                                                                                      ^
     11./ipc/capnp/echo.capnp.proxy.h:60:11: error: 'ProxyClientCustom' is not a class, namespace, or enumeration
     12    using ProxyClientCustom::ProxyClientCustom;
     13          ^
     14/usr/local/include/mp/proxy.h:77:7: note: 'ProxyClientCustom' declared here
     15class ProxyClientCustom : public ProxyClientBase<Interface, Impl>
     16      ^
     17/usr/local/include/mp/proxy.h:163:14: error: implicit instantiation of undefined template 'mp::FunctionTraits<const auto>'
     18    : public FunctionTraits<decltype(ProxyMethod<MethodParams>::impl)>
     19             ^
     20/usr/local/include/mp/proxy.h:173:41: note: in instantiation of template class 'mp::ProxyMethodTraits<ipc::capnp::messages::Echo::EchoParams, void>' requested here
     21struct ProxyClientMethodTraits : public ProxyMethodTraits<MethodParams>
     22                                        ^
     23./ipc/capnp/echo.capnp.proxy.h:65:14: note: in instantiation of template class 'mp::ProxyClientMethodTraits<ipc::capnp::messages::Echo::EchoParams>' requested here
     24    typename M1::Result echo(M1::Param<0> echo);
     25             ^
     26/usr/local/include/mp/proxy.h:123:8: note: template is declared here
     27struct FunctionTraits;
     28       ^
     29In file included from ipc/capnp/echo.capnp.proxy-client.c++:3:
     30In file included from ./ipc/capnp/echo.capnp.proxy-types.h:6:
     31./ipc/capnp/echo.capnp.proxy.h:65:34: error: no template named 'Param' in 'mp::ProxyClientMethodTraits<ipc::capnp::messages::Echo::EchoParams>'
     32    typename M1::Result echo(M1::Param<0> echo);
     33                             ~~~~^
     34./ipc/capnp/echo.capnp.proxy.h:69:103: error: use of undeclared identifier 'interfaces'
     35struct ProxyServer<ipc::capnp::messages::Echo> : public ProxyServerCustom<ipc::capnp::messages::Echo, interfaces::Echo>
     36                                                                                                      ^
     37./ipc/capnp/echo.capnp.proxy.h:72:11: error: 'ProxyServerCustom' is not a class, namespace, or enumeration
     38    using ProxyServerCustom::ProxyServerCustom;
     39          ^
     40/usr/local/include/mp/proxy.h:115:8: note: 'ProxyServerCustom' declared here
     41struct ProxyServerCustom : public ProxyServerBase<Interface, Impl>
     42       ^
     43In file included from ipc/capnp/echo.capnp.proxy-client.c++:3:
     44In file included from ./ipc/capnp/echo.capnp.proxy-types.h:6:
     45./ipc/capnp/echo.capnp.proxy.h:74:31: error: unknown type name 'DestroyContext'
     46    kj::Promise<void> destroy(DestroyContext call_context) override;
     47                              ^
     48./ipc/capnp/echo.capnp.proxy.h:75:28: error: unknown type name 'EchoContext'
     49    kj::Promise<void> echo(EchoContext call_context) override;
     50                           ^
     51./ipc/capnp/echo.capnp.proxy.h:79:18: error: use of undeclared identifier 'interfaces'
     52struct ProxyType<interfaces::Echo>
     53                 ^
     54In file included from ipc/capnp/echo.capnp.proxy-client.c++:4:
     55In file included from /usr/local/include/mp/proxy-types.h:8:
     56/usr/local/include/mp/proxy-io.h:33:37: warning: parameter 'connection' shadows member inherited from type 'InvokeContext' [-Wshadow-field]
     57    ClientInvokeContext(Connection& connection, ThreadContext& thread_context)
     58                                    ^
     59/usr/local/include/mp/proxy-io.h:27:17: note: declared here
     60    Connection& connection;
     61                ^
     62/usr/local/include/mp/proxy-io.h:160:16: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
     63        return std::move(logger);
     64               ^
     65/usr/local/include/mp/proxy-io.h:160:16: note: remove std::move call here
     66        return std::move(logger);
     67               ^~~~~~~~~~      ~
     68ipc/capnp/echo.capnp.proxy-client.c++:10:1: error: no type named 'Result' in 'mp::ProxyClientMethodTraits<ipc::capnp::messages::Echo::EchoParams>'; did you mean 'echo_fields::Result'?
     69ProxyClient<ipc::capnp::messages::Echo>::M1::Result ProxyClient<ipc::capnp::messages::Echo>::echo(M1::Param<0> echo) {
     70^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     71echo_fields::Result
     72./ipc/capnp/echo.capnp.proxy.h:43:8: note: 'echo_fields::Result' declared here
     73struct Result
     74       ^
     75ipc/capnp/echo.capnp.proxy-client.c++:10:94: error: redefinition of 'echo' as different kind of symbol
     76ProxyClient<ipc::capnp::messages::Echo>::M1::Result ProxyClient<ipc::capnp::messages::Echo>::echo(M1::Param<0> echo) {
     77                                                                                             ^
     78./ipc/capnp/echo.capnp.proxy.h:65:25: note: previous definition is here
     79    typename M1::Result echo(M1::Param<0> echo);
     80                        ^
     81ipc/capnp/echo.capnp.proxy-client.c++:10:103: error: no member named 'Param' in 'mp::ProxyClientMethodTraits<ipc::capnp::messages::Echo::EchoParams>'
     82ProxyClient<ipc::capnp::messages::Echo>::M1::Result ProxyClient<ipc::capnp::messages::Echo>::echo(M1::Param<0> echo) {
     83                                                                                                  ~~~~^
     84ipc/capnp/echo.capnp.proxy-client.c++:10:112: error: use of undeclared identifier 'echo'; did you mean 'ecvt'?
     85ProxyClient<ipc::capnp::messages::Echo>::M1::Result ProxyClient<ipc::capnp::messages::Echo>::echo(M1::Param<0> echo) {
     86                                                                                                               ^~~~
     87                                                                                                               ecvt
     88/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdlib.h:201:7: note: 'ecvt' declared here
     89char    *ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */
     90         ^
     91ipc/capnp/echo.capnp.proxy-client.c++:10:117: error: expected ';' after top level declarator
     92ProxyClient<ipc::capnp::messages::Echo>::M1::Result ProxyClient<ipc::capnp::messages::Echo>::echo(M1::Param<0> echo) {
     93                                                                                                                    ^
     94                                                                                                                    ;
     95In file included from ipc/capnp/echo.capnp.proxy-client.c++:4:
     96/usr/local/include/mp/proxy-types.h:1365:23: error: no member named 'm_context' in 'mp::ProxyClient<ipc::capnp::messages::Echo>'
     97    if (!proxy_client.m_context.connection) {
     98         ~~~~~~~~~~~~ ^
     99ipc/capnp/echo.capnp.proxy-client.c++:8:5: note: in instantiation of function template specialization 'mp::clientInvoke<mp::ProxyClient<ipc::capnp::messages::Echo>, capnp::Request<ipc::capnp::messages::Echo::DestroyParams, ipc::capnp::messages::Echo::DestroyResults> (ipc::capnp::messages::Echo::Client::*)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::echo_fields::Context, 17>> >' requested here
    100    clientInvoke(*this, &ipc::capnp::messages::Echo::Client::destroyRequest, MakeClientParam<Accessor<echo_fields::Context, FIELD_IN | FIELD_BOXED>>());
    101    ^
    102In file included from ipc/capnp/echo.capnp.proxy-client.c++:4:
    103/usr/local/include/mp/proxy-types.h:1370:64: error: no member named 'm_context' in 'mp::ProxyClient<ipc::capnp::messages::Echo>'
    104        g_thread_context.thread_name = ThreadName(proxy_client.m_context.connection->m_loop.m_exe_name);
    105                                                  ~~~~~~~~~~~~ ^
    106/usr/local/include/mp/proxy-types.h:1381:22: error: no member named 'm_context' in 'mp::ProxyClient<ipc::capnp::messages::Echo>'
    107        proxy_client.m_context.connection->m_loop.logPlain()
    108        ~~~~~~~~~~~~ ^
    109/usr/local/include/mp/proxy-types.h:1385:54: error: no member named 'm_context' in 'mp::ProxyClient<ipc::capnp::messages::Echo>'
    110    ClientInvokeContext invoke_context{*proxy_client.m_context.connection, g_thread_context};
    111                                        ~~~~~~~~~~~~ ^
    112fatal error: too many errors emitted, stopping now [-ferror-limit=]
    1132 warnings and 20 errors generated.
    114make[2]: *** [ipc/capnp/libbitcoin_ipc_a-echo.capnp.proxy-client.o] Error 1
    115make[1]: *** [all-recursive] Error 1
    116make: *** [all-recursive] Error 1
    

    I’ve followed 805eb73 build and install instructions.

    On the bitcoin folder, I’ve made a fresh clone and configure.

  2. ryanofsky commented at 11:19 am on April 6, 2021: collaborator

    Thanks for reporting this!

    Trying to build bitcoin/bitcoin@a3d7a98 on macOS results in the following error:

    I am able to reproduce this, and this is caused by #43. The reason it happens is that the version of https://github.com/bitcoin/bitcoin/pull/19160 built here is a few months old, originally pushed 2020-11-24, and not compatible with the current version of libmultiprocess after #43.

    There are three ways to fix it:

    1. Update https://github.com/bitcoin/bitcoin/pull/19160 pull from a3d7a9864b1 pr/ipc-echo.19 to pr/ipc-echo.24 or newer.

    2. Downgrade libmultiprocess from the version you have installed to an older version preceding PR #43

    3. Apply the following changes manually:

     0git diff pr/ipc-echo.19..pr/ipc-echo.24 src/ipc/capnp/*.capnp
     1diff --git a/src/ipc/capnp/echo.capnp b/src/ipc/capnp/echo.capnp
     2index cedf6f2718e..1bdd81321ca 100644
     3--- a/src/ipc/capnp/echo.capnp
     4+++ b/src/ipc/capnp/echo.capnp
     5@@ -8,6 +8,8 @@ using Cxx = import "/capnp/c++.capnp";
     6 $Cxx.namespace("ipc::capnp::messages");
     7 
     8 using Proxy = import "/mp/proxy.capnp";
     9+$Proxy.include("interfaces/echo.h");
    10+$Proxy.include("ipc/capnp/echo.capnp.h");
    11 
    12 interface Echo $Proxy.wrap("interfaces::Echo") {
    13     destroy [@0](/bitcoin-core-multiprocess/contributor/0/) (context :Proxy.Context) -> ();
    14diff --git a/src/ipc/capnp/init.capnp b/src/ipc/capnp/init.capnp
    15index 06f767b02c5..78f1c7f8cd9 100644
    16--- a/src/ipc/capnp/init.capnp
    17+++ b/src/ipc/capnp/init.capnp
    18@@ -9,6 +9,8 @@ $Cxx.namespace("ipc::capnp::messages");
    19 
    20 using Echo = import "echo.capnp";
    21 using Proxy = import "/mp/proxy.capnp";
    22+$Proxy.include("ipc/capnp/init.h");
    23+$Proxy.includeTypes("ipc/capnp/init-types.h");
    24 
    25 interface Init $Proxy.wrap("interfaces::Init") {
    26     construct [@0](/bitcoin-core-multiprocess/contributor/0/) (threadMap: Proxy.ThreadMap) -> (threadMap :Proxy.ThreadMap);
    
  3. promag commented at 11:31 am on April 6, 2021: none
    🤦 I thought I was on the latest version, not sure what happened as I usually fetch the latest version. Sorry for the noise!
  4. promag closed this on Apr 6, 2021

  5. ryanofsky commented at 11:52 am on April 6, 2021: collaborator
    Not noise at all! Definitely could have provided clearer build errors here. I filed https://github.com/chaincodelabs/libmultiprocess/issues/54 to track this.
  6. bitcoin-core locked this on Jun 25, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-04 19:30 UTC

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