From 4543015b01046e46589d78c04d1eaa4776ddbd70 Mon Sep 17 00:00:00 2001 From: igorvoltaic Date: Wed, 23 May 2018 11:32:44 +0300 Subject: [PATCH] lets get rid of this message: 'section __textcoal_nt is deprecated' --- README-mac.md | 40 ++++++++++++++++++++++++++++++++------ darwin.host.mk.patch | 4 ++-- darwin.mk.patch | 8 ++++---- depends/builders/darwin.mk | 8 ++++---- depends/hosts/darwin.mk | 4 ++-- libsnark.mk.patch | 2 +- toolchain-info.sh | 2 +- zcutil/build-mac.sh | 6 +++--- 8 files changed, 51 insertions(+), 23 deletions(-) diff --git a/README-mac.md b/README-mac.md index c085cb617..f3dd5e281 100644 --- a/README-mac.md +++ b/README-mac.md @@ -1,4 +1,6 @@ -First off you need Apple's Xcode (at least version 7, preferably 8.x) and the Xcode Command Line Tools: +## Install for Mac OS X + +First off you need Apple's Xcode (at least version 7, preferably 8.x or later) and the Xcode Command Line Tools: https://itunes.apple.com/us/app/xcode/id497799835?mt=12 @@ -11,25 +13,51 @@ And this is the list of brew packages you'll need installed: ```shell brew tap discoteq/discoteq; brew install flock brew install autoconf autogen automake -brew tap homebrew/versions; brew install homebrew/versions/gcc5 +brew install gcc@6 brew install binutils brew install protobuf brew install coreutils brew install wget ``` +or + +```shell +brew tap discoteq/discoteq; brew install flock autoconf autogen automake gcc@6 binutils protobuf coreutils wget +``` + Get all that installed, then run: ```shell -git clone https://github.com/j-cimb-barker/komodo.git +git clone https://github.com/jl777/komodo.git cd komodo -git checkout dev ./zcutil/build-mac.sh +./zcutil/fetch-params.sh ``` To build a distributable version of komodo then run the makeDistrib.sh script after building. -When you are done building, you need to do a few things in the [Configuration](https://github.com/zcash/zcash/wiki/1.0-User-Guide#configuration) section of the Zcash User Guide differently because we are on the Mac. All instances of `~/.zcash` need to be replaced by `~/Library/Application\ Support/Zcash` -The fetch-params.sh script, however, has already been altered to fetch the proving keys into the correct directory to conform to Mac specific naming conventions. +When you are done building, you need to create `Komodo.conf` the Mac way. + +```shell +mkdir ~/Library/Application\ Support/Komodo +touch ~/Library/Application\ Support/Komodo/Komodo.conf +nano ~/Library/Application\ Support/Komodo/Komodo.conf +``` + +Add the following lines to the Komodo.conf file: + +```shell +rpcuser=dontuseweakusernameoryougetrobbed +rpcpassword=dontuseweakpasswordoryougetrobbed +txindex=1 +addnode=5.9.102.210 +addnode=78.47.196.146 +addnode=178.63.69.164 +addnode=88.198.65.74 +addnode=5.9.122.241 +addnode=144.76.94.38 +addnode=89.248.166.91 +``` Happy Building diff --git a/darwin.host.mk.patch b/darwin.host.mk.patch index 426702563..deeb7a810 100644 --- a/darwin.host.mk.patch +++ b/darwin.host.mk.patch @@ -5,8 +5,8 @@ OSX_SDK_VERSION=10.9 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk LD64_VERSION=241.9 -! darwin_CC=gcc-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -! darwin_CXX=g++-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +! darwin_CC=gcc-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +! darwin_CXX=g++-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) diff --git a/darwin.mk.patch b/darwin.mk.patch index 80bc5b2d9..fdfd7bc38 100644 --- a/darwin.mk.patch +++ b/darwin.mk.patch @@ -2,8 +2,8 @@ --- ../../komodo-jl777/depends/builders/darwin.mk 2017-01-03 09:48:21.646034937 +0000 *************** *** 1,5 **** -! build_darwin_CC = gcc-5 -! build_darwin_CXX = g++-5 +! build_darwin_CC = gcc-6 +! build_darwin_CXX = g++-6 build_darwin_AR: = $(shell xcrun -f ar) build_darwin_RANLIB: = $(shell xcrun -f ranlib) build_darwin_STRIP: = $(shell xcrun -f strip) @@ -21,8 +21,8 @@ ! build_darwin_DOWNLOAD = wget --timeout=$(DOWNLOAD_CONNECT_TIMEOUT) --tries=$(DOWNLOAD_RETRIES) -nv -O #darwin host on darwin builder. overrides darwin host preferences. -! darwin_CC= gcc-5 -! darwin_CXX= g++-5 +! darwin_CC= gcc-6 +! darwin_CXX= g++-6 darwin_AR:=$(shell xcrun -f ar) darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index 0028d3f6f..f9b066fcf 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -1,5 +1,5 @@ -build_darwin_CC = gcc-5 -build_darwin_CXX = g++-5 +build_darwin_CC = gcc-6 +build_darwin_CXX = g++-6 build_darwin_AR: = $(shell xcrun -f ar) build_darwin_RANLIB: = $(shell xcrun -f ranlib) build_darwin_STRIP: = $(shell xcrun -f strip) @@ -10,8 +10,8 @@ build_darwin_SHA256SUM = shasum -a 256 build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -f -o #darwin host on darwin builder. overrides darwin host preferences. -darwin_CC= gcc-5 -darwin_CXX= g++-5 +darwin_CC= gcc-6 +darwin_CXX= g++-6 darwin_AR:=$(shell xcrun -f ar) darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 70211078b..5eaeddc26 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -2,8 +2,8 @@ OSX_MIN_VERSION=10.8 OSX_SDK_VERSION=10.11 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk LD64_VERSION=253.9 -darwin_CC=gcc-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -darwin_CXX=g++-5 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CC=gcc-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) +darwin_CXX=g++-6 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) darwin_CFLAGS=-pipe darwin_CXXFLAGS=$(darwin_CFLAGS) diff --git a/libsnark.mk.patch b/libsnark.mk.patch index f43ea2188..28a60c8b6 100644 --- a/libsnark.mk.patch +++ b/libsnark.mk.patch @@ -14,7 +14,7 @@ - ifeq ($(build_os),darwin) - define $(package)_build_cmds -- CC=gcc-5 CXX=g++-5 CXXFLAGS="-arch x86_64 -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=0 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT +- CC=gcc-6 CXX=g++-6 CXXFLAGS="-arch x86_64 -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=0 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT - endef - else define $(package)_build_cmds diff --git a/toolchain-info.sh b/toolchain-info.sh index 3322755f0..0bb39c19b 100755 --- a/toolchain-info.sh +++ b/toolchain-info.sh @@ -1,6 +1,6 @@ #!/bin/bash -tools=("gcc-5" "g++-5" "otool" "nm") +tools=("gcc-6" "g++-6" "otool" "nm") echo "Platform: `uname -a`" echo "-------------------------------------" diff --git a/zcutil/build-mac.sh b/zcutil/build-mac.sh index cf2af5a2a..138508cb5 100755 --- a/zcutil/build-mac.sh +++ b/zcutil/build-mac.sh @@ -1,6 +1,6 @@ #!/bin/bash -export CC=gcc-5 -export CXX=g++-5 +export CC=gcc-6 +export CXX=g++-6 export LIBTOOL=libtool export AR=ar export RANLIB=ranlib @@ -44,7 +44,7 @@ make "$@" -C ./depends/ V=1 NO_QT=1 NO_PROTON=1 ./autogen.sh CPPFLAGS="-I$PREFIX/include -arch x86_64" LDFLAGS="-L$PREFIX/lib -arch x86_64 -Wl,-no_pie" \ -CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc5/5.4.0/include/c++/5.4.0 -I$PREFIX/include -fwrapv -fno-strict-aliasing -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \ +CXXFLAGS='-arch x86_64 -I/usr/local/Cellar/gcc\@6/6.4.0_2/include/c++/6.4.0/ -I$PREFIX/include -fwrapv -fno-strict-aliasing -Werror -g -Wl,-undefined -Wl,dynamic_lookup' \ ./configure --prefix="${PREFIX}" --with-gui=no "$HARDENING_ARG" "$LCOV_ARG" make "$@" V=1 NO_GTEST=1 STATIC=1