MultiChain / multichain

Source code for multichaind, multichain-cli and multichain-util.
GNU General Public License v3.0
536 stars 259 forks source link

Build fails on OS X Sierra (1.0.2 & 2.0 alpha 1) #32

Closed alemenke closed 6 years ago

alemenke commented 7 years ago

Both 1.0.2 (https://github.com/MultiChain/multichain/commit/44bdabe09c1ecf5a3c295a92146e2409edd2fbe6) and 2.0 alpha 1 (https://github.com/MultiChain/multichain/commit/0a428c7f74e600e242a519e21bf1123cdd76a94c) fail to build on Mac OS X Sierra (w/ LLVM 9.0.0; boost 1.65.1 and boost 1.59) while 1.0.1 (https://github.com/MultiChain/multichain/commit/1de5d445b97d078b087af2888f267f20d72a491b) builds just fine.

It seems like the problem has been introduced in https://github.com/MultiChain/multichain/commit/ef18500e4ab559fdd7b6750a0a156c00907efce2 as the previous commit seems to build correctly.

See the two ambiguous type conversions below:

This-MacBook-Pro:multichain vagrant$ make
Making all in src
  CXX      json/libbitcoin_server_a-json_spirit_ubjson.o
json/json_spirit_ubjson.cpp:364:39: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=array_value.size();
                          ~~~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
json/json_spirit_ubjson.cpp:452:37: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=obj_value.size();
                          ~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
2 errors generated.
make[1]: *** [json/libbitcoin_server_a-json_spirit_ubjson.o] Error 1
make: *** [all-recursive] Error 1
gidgreen commented 7 years ago

Thanks - we'll look into this.

gidgreen commented 7 years ago

We've released a 1.0.x-mac-fix branch that hopefully fixes this – please let us know: https://github.com/MultiChain/multichain/tree/1.0.x-mac-fix

alemenke commented 6 years ago

That fixes it, thanks!

gidgreen commented 6 years ago

Great - thanks for letting us know.