Trying to compile on Mac

+1 vote

Hi,

I am pretty new to Multichain. Currently trying to compile on Mac (as no binary is available). 

Trying to execute 

./configure --with-gui=no --with-libs=no --with-miniupnpc=no
just can't find the configure script in the source. Can anyone help?
Thanks 
Patrick
asked Jan 11, 2018 by Patrick

1 Answer

+1 vote

This should be generated by the autogen.sh script in the step before you run that ./configure command - did you run that script?

answered Jan 12, 2018 by MultiChain
Thanks!

Actually, running autopen.sh wasn't mentioned on the Github page in the Mac section.

I went through compiler successfully. but ended with an error in Make:

rpc/rpcserver.cpp:551:49: error: too many template arguments for class template
      'basic_socket_acceptor'

I am not running as root (as make is creating in src from my understanding). Any idea? :-)

Thanks

Patrick
Thanks, looks like the autogen.sh line is in some branches (including the master) but not in others. We'll fix that.

As for the compile time error, this appears to be a result of recent changes in the Boost library. If you can compile with Boost 1.6.5 that is likely to help.
Thanks!

I have tried to install v 1.65 (as I do have 1.66) via brew install, but it returned a few errors. Not sure that it would be the best way to go now.

I tried to compile with v2.0 release and got the following errors:

json/json_spirit_ubjson.cpp:358:39: error: conversion from 'size_type'
      (aka 'unsigned long') to 'const
...
json/json_spirit_ubjson.cpp:446:37: error: conversion from 'size_type'
      (aka 'unsigned long') to 'const
...
1 warning and 2 errors generated.
make[1]: *** [json/libbitcoin_server_a-json_spirit_ubjson.o] Error 1
make: *** [all-recursive] Error 1




Thanks again

Patrick
There's a Mac fix branch that fixes some compilation errors with the json_spirit library - please try compiling that: https://github.com/MultiChain/multichain/tree/1.0.x-mac-fix
Thanks, I did try this option as well. But following your suggestion, I started from a clean distribution of the Mac-fix branch. I did follow all the steps and ended with 6 errors

rpc/rpcserver.cpp:551:49: error: too many template arguments for class template
      'basic_socket_acceptor'
  ...basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
     ^                               ~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: template is
      declared here
class basic_socket_acceptor
      ^
rpc/rpcserver.cpp:561:42: error: too many template arguments for class template
      'basic_socket_acceptor'
  ...basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
     ^                               ~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: template is
      declared here
class basic_socket_acceptor
      ^
rpc/rpcserver.cpp:584:49: error: too many template arguments for class template
      'basic_socket_acceptor'
  ...basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
     ^                               ~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: template is
      declared here
class basic_socket_acceptor
      ^
rpc/rpcserver.cpp:681:27: error: no matching constructor for initialization of
      'ssl::context'
    rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23);
                          ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/ssl/impl/context.ipp:63:10: note: candidate
      constructor not viable: requires single argument 'm', but 2 arguments were
      provided
context::context(context::method m)
         ^
/usr/local/include/boost/asio/ssl/context.hpp:36:7: note: candidate constructor
      (the implicit copy constructor) not viable: requires 1 argument, but 2
      were provided
class context
      ^
rpc/rpcserver.cpp:700:50: error: no member named 'impl' in
      'boost::asio::ssl::context'
        SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
                                ~~~~~~~~~~~~~~~  ^
rpc/rpcserver.cpp:760:13: error: no matching function for call to 'RPCListen'
            RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
            ^~~~~~~~~
6 errors generated.
make[1]: *** [rpc/libbitcoin_server_a-rpcserver.o] Error 1
make: *** [all-recursive] Error 1

Thanks for your help!
Those errors again look like they stem from compiling against a more recent version of Boost than the one MultiChain is currently build with.
Just uninstall boost and brew install boost@1.5.7 or 1.5.8
then run:
brew link boost@1.5.7 --force

It will fix this issue.
...