Browse Source

Mac build fixes

dev-mac
fekt 2 years ago
parent
commit
e313676562
  1. 2
      configure.ac
  2. 2
      depends/hosts/darwin.mk
  3. 11
      depends/packages/libgmp.mk
  4. 13
      src/init.cpp
  5. 4
      src/rpc/rawtransaction.cpp
  6. 11
      src/stratum.cpp
  7. 7
      src/util.cpp

2
configure.ac

@ -709,7 +709,7 @@ fi
# These packages don't provide pkgconfig config files across all # These packages don't provide pkgconfig config files across all
# platforms, so we use older autoconf detection mechanisms: # platforms, so we use older autoconf detection mechanisms:
AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing)) AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing))
AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)]) #AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)])
AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing)) AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)]) AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])

2
depends/hosts/darwin.mk

@ -8,7 +8,7 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro
darwin_CFLAGS=-pipe darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS) darwin_CXXFLAGS=$(darwin_CFLAGS)
darwin_release_CFLAGS=-O3 darwin_release_CFLAGS=-O1
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1 darwin_debug_CFLAGS=-O1

11
depends/packages/libgmp.mk

@ -9,12 +9,11 @@ $(package)_git_commit=42ba95387cdfd67399f7aac52fddb8d6e1258ee6
$(package)_dependencies= $(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared $(package)_config_opts=--enable-cxx --disable-shared
else ifeq ($(build_os),darwin) else ifeq ($(build_os),darwin)
$(package)_download_path=https://git.hush.is/duke/$(package)/archive $(package)_version=6.1.1
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz $(package)_download_path=https://git.hush.is/attachments
$(package)_download_file=$($(package)_git_commit).tar.gz $(package)_file_name=d613c855-cd92-4efb-b893-658496852019
$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c $(package)_download_file=d613c855-cd92-4efb-b893-658496852019
$(package)_git_commit=aece03c7b6967f91f3efdac8c673f55adff53ab1 $(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
$(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared $(package)_config_opts=--enable-cxx --disable-shared
else else
$(package)_version=6.1.1 $(package)_version=6.1.1

13
src/init.cpp

@ -1137,9 +1137,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if(fs::exists(asmap_path)) { if(fs::exists(asmap_path)) {
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() ); printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
} else { } else {
// Shit is fucked up, die an honorable death // Mac SD
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers"))); asmap_path = fs::path("/Applications/SilentDragon.app/Contents/MacOS/") / DEFAULT_ASMAP_FILENAME;
return false; printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
if(fs::exists(asmap_path)) {
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
} else {
// Shit is fucked up, die an honorable death
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
return false;
}
} }
} }
} }

4
src/rpc/rawtransaction.cpp

@ -453,8 +453,10 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp, const CPubKey& my
return strHex; return strHex;
UniValue result(UniValue::VOBJ); UniValue result(UniValue::VOBJ);
unsigned int serializeSize = GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
result.push_back(Pair("hex", strHex)); result.push_back(Pair("hex", strHex));
result.push_back(Pair("size", GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) )); result.push_back(Pair("size", serializeSize));
TxToJSONExpanded(tx, hashBlock, result, nHeight, nConfirmations, nBlockTime); TxToJSONExpanded(tx, hashBlock, result, nHeight, nConfirmations, nBlockTime);
return result; return result;
} }

11
src/stratum.cpp

@ -1997,10 +1997,13 @@ UniValue rpc_stratum_updatework(const UniValue& params, bool fHelp, const CPubKe
// throw JSONRPCError(RPC_INTERNAL_ERROR, "Something went wrong, plz try again!"); // throw JSONRPCError(RPC_INTERNAL_ERROR, "Something went wrong, plz try again!");
// } // }
uint64_t clientsSize = json_clients.size();
uint64_t subscriptionsSize = subscriptions.size();
obj.push_back(Pair("clients", json_clients)); obj.push_back(Pair("clients", json_clients));
obj.push_back(Pair("updated", json_clients.size())); obj.push_back(Pair("updated", clientsSize));
obj.push_back(Pair("skipped", skipped)); obj.push_back(Pair("skipped", skipped));
obj.push_back(Pair("total", subscriptions.size())); obj.push_back(Pair("total", subscriptionsSize));
return obj; return obj;
} }
@ -2126,9 +2129,9 @@ UniValue rpc_stratum_getclientscount (const UniValue& params, bool fHelp, const
+ HelpExampleCli("stratum_getclientscount", "") + HelpExampleCli("stratum_getclientscount", "")
+ HelpExampleRpc("stratum_getclientscount", "") + HelpExampleRpc("stratum_getclientscount", "")
); );
UniValue obj(UniValue::VOBJ); UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("total", subscriptions.size())); uint64_t subscriptionsSize = subscriptions.size();
obj.push_back(Pair("total", subscriptionsSize));
return obj; return obj;
}; };

7
src/util.cpp

@ -558,12 +558,12 @@ boost::filesystem::path GetDefaultDataDir()
tmppath = pathRet; tmppath = pathRet;
tmppath /= "Komodo"; tmppath /= "Komodo";
//TryCreateDirectory(tmppath); //TryCreateDirectory(tmppath);
if(fs::is_directory( tmppath / symbol) { if(fs::is_directory( tmppath / symbol)) {
// Found legacy dir, use that // Found legacy dir, use that
return tmppath / symbol; return tmppath / symbol;
} else { } else {
// For new clones, use Hush/HUSH3 // For new clones, use Hush/HUSH3
tmppath = pathRet / "Hush" / HUSH3; tmppath = pathRet / "Hush" / "HUSH3";
} }
return tmppath; return tmppath;
} }
@ -1036,11 +1036,8 @@ std::string LicenseInfo()
{ {
return "\n" + return "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" + FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" +
"\n" + "\n" +
FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" + FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" +

Loading…
Cancel
Save