Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS build for marmara and remove explicit reference to libcc.dl and build it as in komodo codebase #49

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/marmara_linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Marmara Linux CI
on:
pull_request:
types: [opened, synchronize, reopened]
schedule:
- cron: '0 0 * * 1'

jobs:

Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/marmara_mac_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ name: Marmara MacOS CI
on:
pull_request:
types: [opened, synchronize, reopened]
schedule:
- cron: '0 0 * * 1'

jobs:

macos-build:
name: MacOS Build
runs-on: macos-latest
runs-on: macos-latest-large

steps:
- uses: actions/checkout@v4
Expand All @@ -31,47 +29,49 @@ jobs:
- name: Install deps (macOS)
run: |
brew update
brew upgrade || true
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake
brew install gcc@8
brew install binutils
brew install protobuf
brew install coreutils
brew install wget
brew install python3
brew install gmp


# https://www.jessesquires.com/blog/2020/01/06/selecting-an-xcode-version-on-github-ci/
# https://github.com/actions/runner-images/issues/2619 (bsdtar issues)
# flag for some CC tests transactions - so DO NOT USE THIS CI ARTIFACTS IN PRODUCTION!!!
- name: Build (macOS)
run: |
# flag for some CC tests transactions - so DO NOT USE THIS CI ARTIFACTS IN PRODUCTION!!!
export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
./zcutil/build-mac-dtest.sh -j4
tar -czvf marmara-macos.tar.gz src/marmarad src/marmara-cli

gtar -czvf marmara-macos.tar.gz src/marmarad src/marmara-cli src/wallet-utility src/komodo-tx
# env:
# DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer

- name: Upload marmara-macos.tar.gz as artifact
uses: actions/upload-artifact@v4
with:
name: marmara-macos
path: ./marmara-macos.tar.gz
path: |
./marmara-macos.tar.gz

# macos-test-dice-token-reards-faucet-cc:
# macos-test-dice-token-rewards-faucet-cc:
# if: ${{ false }}

# name: Test (MacOS/Dice, Token, Faucet, Rewards)
# runs-on: macos-latest
# needs: macos-build

# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4

# - name: Install deps (Dice, Token, Faucet, Rewards CC)
# run: |
# brew install curl
# brew install python3 curl
# python3 -m pip install setuptools wheel
# python3 -m pip install slick-bitcoinrpc pytest wget jsonschema

# - name: Download komodo-macos.tar.gz
# uses: actions/download-artifact@v1
# uses: actions/download-artifact@v4
# with:
# name: komodo-macos

Expand Down Expand Up @@ -150,11 +150,11 @@ jobs:
# needs: macos-build

# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4

# - name: Install deps (ChannelsCC)
# run: |
# brew install curl
# brew install python3 curl
# python3 -m pip install setuptools wheel
# python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
# - name: Download komodo-macos.tar.gz
Expand Down Expand Up @@ -183,11 +183,11 @@ jobs:

# - name: Install deps (HeirCC)
# run: |
# brew install curl
# brew install python3 curl
# python3 -m pip install setuptools wheel
# python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
# - name: Download komodo-macos.tar.gz
# uses: actions/download-artifact@v1
# uses: actions/download-artifact@v4
# with:
# name: komodo-macos

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/marmara_win_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Marmara Win CI
on:
pull_request:
types: [opened, synchronize, reopened]
schedule:
- cron: '0 0 * * 1'

jobs:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ brew update
brew upgrade
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake
brew update && brew install gcc@8
brew update
brew install binutils
brew install protobuf
brew install coreutils
Expand Down
21 changes: 0 additions & 21 deletions darwin.host.mk.patch

This file was deleted.

40 changes: 0 additions & 40 deletions darwin.mk.patch

This file was deleted.

11 changes: 6 additions & 5 deletions depends/builders/darwin.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
build_darwin_CC = gcc-8
build_darwin_CXX = g++-8
build_darwin_CC:=$(shell xcrun -f clang) --sysroot $(shell xcrun --show-sdk-path)
build_darwin_CXX:=$(shell xcrun -f clang++) --sysroot $(shell xcrun --show-sdk-path)
build_darwin_AR: = $(shell xcrun -f ar)
build_darwin_RANLIB: = $(shell xcrun -f ranlib)
build_darwin_STRIP: = $(shell xcrun -f strip)
build_darwin_OTOOL: = $(shell xcrun -f otool)
build_darwin_NM: = $(shell xcrun -f nm)
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
build_darwin_SHA256SUM = shasum -a 256
build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -f -o
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o

#darwin host on darwin builder. overrides darwin host preferences.
darwin_CC= gcc-8
darwin_CXX= g++-8
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -fvisibility=hidden -fvisibility-inlines-hidden --sysroot $(shell xcrun --show-sdk-path)
darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -fvisibility=hidden -fvisibility-inlines-hidden -stdlib=libc++ --sysroot $(shell xcrun --show-sdk-path)
darwin_AR:=$(shell xcrun -f ar)
darwin_RANLIB:=$(shell xcrun -f ranlib)
darwin_STRIP:=$(shell xcrun -f strip)
darwin_LIBTOOL:=$(shell xcrun -f libtool)
darwin_OTOOL:=$(shell xcrun -f otool)
darwin_NM:=$(shell xcrun -f nm)
darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
darwin_native_binutils=
darwin_native_toolchain=
49 changes: 41 additions & 8 deletions depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
OSX_MIN_VERSION=10.12
OSX_SDK_VERSION=10.12
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
LD64_VERSION=253.9
darwin_CC=gcc-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
OSX_MIN_VERSION=10.15
OSX_SDK_VERSION=10.15.6
XCODE_VERSION=12.1
XCODE_BUILD_ID=12A7403
LD64_VERSION=609

OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers

# Flag explanations:
#
# -mlinker-version
#
# Ensures that modern linker features are enabled. See here for more
# details: https://github.com/bitcoin/bitcoin/pull/19407.
#
# -B$(build_prefix)/bin
#
# Explicitly point to our binaries (e.g. cctools) so that they are
# ensured to be found and preferred over other possibilities.
#
# -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1
#
# Forces clang to use the libc++ headers from our SDK and completely
# forget about the libc++ headers from the standard directories
#
# TODO: Once we start requiring a clang version that has the
# -stdlib++-isystem<directory> flag first introduced here:
# https://reviews.llvm.org/D64089, we should use that instead. Read the
# differential summary there for more details.
#
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1

darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)

darwin_release_CFLAGS=-O1
darwin_release_CFLAGS=-O2
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)

darwin_debug_CFLAGS=-O1
darwin_debug_CFLAGS=-g -O0
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)

darwin_native_binutils=native_cctools
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
darwin_native_toolchain=native_cctools
else
darwin_native_toolchain=
endif

darwin_cmake_system=Darwin
8 changes: 5 additions & 3 deletions depends/packages/bdb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags=-std=c++11
$(package)_cxxflags+=-std=c++11
endef

define $(package)_preprocess_cmds
Expand All @@ -25,7 +25,9 @@ endef

ifeq ($(build_os),darwin)
define $(package)_preprocess_cmds
sed -i -e "s/WinIoCtl.h/winioctl.h/g" src/dbinc/win_db.h
sed -i -e "s/WinIoCtl.h/winioctl.h/g" src/dbinc/win_db.h && \
sed -i.old 's/__atomic_compare_exchange\\(/__atomic_compare_exchange_db(/' src/dbinc/atomic.h && \
sed -i.old 's/atomic_init/atomic_init_db/' src/dbinc/atomic.h src/mp/mp_region.c src/mp/mp_mvcc.c src/mp/mp_fget.c src/mutex/mut_method.c src/mutex/mut_tas.c
endef
else ifeq ($(host_os),mingw32)
define $(package)_preprocess_cmds
Expand All @@ -39,4 +41,4 @@ endef

define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
endef
endef
1 change: 1 addition & 0 deletions depends/packages/libcurl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $(package)_sha256_hash=816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f
$(package)_config_opts=--with-openssl --disable-shared --enable-static --prefix=$(host_prefix)
$(package)_config_opts_linux=--host=x86_64-unknown-linux-gnu
$(package)_config_opts_mingw32=--enable-mingw --host=x86_64-w64-mingw32
$(package)_config_opts_darwin=--without-libidn2 --without-zstd --without-nghttp2 --without-librtmp --without-brotli
$(package)_cflags_darwin=-mmacosx-version-min=$(OSX_MIN_VERSION)
$(package)_conf_tool=./configure

Expand Down
2 changes: 1 addition & 1 deletion depends/packages/libsodium.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $(package)_config_opts=
define $(package)_set_vars
$(package)_build_env=DO_NOT_UPDATE_CONFIG_SCRIPTS=1
ifeq ($(build_os),darwin)
$(package)_build_env+=MACOSX_DEPLOYMENT_TARGET="10.11"
$(package)_build_env+=MACOSX_DEPLOYMENT_TARGET="$(OSX_MIN_VERSION)"
$(package)_cc=clang
$(package)_cxx=clang++
endif
Expand Down
13 changes: 0 additions & 13 deletions doc/man/verus-cli/linux/README.txt

This file was deleted.

17 changes: 0 additions & 17 deletions doc/man/verus-cli/mac/README.txt

This file was deleted.

21 changes: 0 additions & 21 deletions doc/man/verus-cli/windows/README.txt

This file was deleted.

Loading
Loading