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

fecv-3.1.5 #61

Merged
merged 32 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d204bbe
Update configure.ac
koh-gt Feb 18, 2024
d0cfc3b
depends: Delay expansion of per-package vars
koh-gt Feb 18, 2024
5afc1c6
depends: Pin clang search paths for darwin host
koh-gt Feb 18, 2024
29cb46a
depends: Remove -fuse-ld line
koh-gt Feb 18, 2024
894399d
depends: Quote to prevent word splitting in config.site
koh-gt Feb 18, 2024
8132a32
depends: Fully determine path for darwin_{CC,CXX} 1/2
koh-gt Feb 18, 2024
e1da52b
depends: Fully determine path for darwin_{CC,CXX} 2/2
koh-gt Feb 18, 2024
aa6c32b
depends: Fully determine path for darwin cctools 1/2
koh-gt Feb 18, 2024
50fc05c
depends: Fully determine path for darwin cctools 2/2
koh-gt Feb 18, 2024
3943fa3
Add comment about cache invalidation
koh-gt Feb 18, 2024
b6dc1fd
build: split native_cctools 1/5
koh-gt Feb 19, 2024
2dabf97
build: split native_cctools 2/5
koh-gt Feb 19, 2024
937082e
build: split native_cctools 3/5 - Create native_clang.mk
koh-gt Feb 19, 2024
7256261
build: split native_cctools 4/5 - Create native_libtapi.mk
koh-gt Feb 19, 2024
ef2b6c6
build: split native_cctools 5/5
koh-gt Feb 19, 2024
2971961
build: libtapi 1100.0.11 - Update native_libtapi.mk
koh-gt Feb 19, 2024
51ae338
build: Clang 10.0.1 1/3 - Update native_clang.mk
koh-gt Feb 19, 2024
2763f9a
build: Clang 10.0.1 2/3 - Update qt.mk
koh-gt Feb 19, 2024
f622279
build: native cctools 973.0.1, ld64 609 - 1/2
koh-gt Feb 19, 2024
39e5d8f
build: native cctools 973.0.1, ld64 609 - 2/2
koh-gt Feb 19, 2024
163064d
build: Xcode 12.1, macOS SDK 10.15.6 - 1/5 - Update 00_setup_env_mac.sh
koh-gt Feb 28, 2024
366f50f
build: Xcode 12.1, macOS SDK 10.15.6 - 1/5 - Update gitian-build.py
koh-gt Feb 28, 2024
a0c25a1
build: Xcode 12.1, macOS SDK 10.15.6 - 2/5 - Update gitian-osx.yml
koh-gt Feb 28, 2024
2fa3ab7
build: Xcode 12.1, macOS SDK 10.15.6 - 3/5 - Update darwin.mk
koh-gt Feb 28, 2024
fa3303e
build: Xcode 12.1, macOS SDK 10.15.6 - 4/5 - Update README.md
koh-gt Feb 28, 2024
6205605
build: Xcode 12.1, macOS SDK 10.15.6 - 5/5 - Update README.md
koh-gt Feb 28, 2024
ed502e1
build: no longer patch threading out of ld64 - 1/2 - Update native_c…
koh-gt Feb 28, 2024
6527104
build: no longer patch threading out of ld64 - 2/2 - Delete depends/p…
koh-gt Feb 28, 2024
d382b84
build: use -stdlib++-isystem with Clang 10 - Update darwin.mk
koh-gt Feb 28, 2024
c3a073e
build: use -isysroot over --sysroot on macOS - 1/3 -Update README.md
koh-gt Feb 28, 2024
64907a2
build: use -isysroot over --sysroot on macOS - 2/3 - Update darwin.mk
koh-gt Feb 28, 2024
0d848ae
build: use -isysroot over --sysroot on macOS - 3/3 - Update darwin.mk
koh-gt Feb 28, 2024
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
4 changes: 2 additions & 2 deletions ci/test/00_setup_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export CONTAINER_NAME=ci_macos_cross
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to macos (bionic is used in the gitian build as well)
export HOST=x86_64-apple-darwin18
export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python3-dev python3-setuptools xorriso"
export XCODE_VERSION=11.3.1
export XCODE_BUILD_ID=11C505
export XCODE_VERSION=12.1
export XCODE_BUILD_ID=12A7403
export RUN_UNIT_TESTS=false
export RUN_FUNCTIONAL_TESTS=false
export GOAL="deploy"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_REVISION, 5)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitian-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def main():
args.macos = 'm' in args.os

# Disable for MacOS if no SDK found
if args.macos and not os.path.isfile('gitian-builder/inputs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz'):
if args.macos and not os.path.isfile('gitian-builder/inputs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz'):
print('Cannot build for MacOS, SDK does not exist. Will build for other OSes')
args.macos = False

Expand Down
4 changes: 2 additions & 2 deletions contrib/gitian-descriptors/gitian-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ remotes:
- "url": "https://github.com/ferrite-project/ferrite.git"
"dir": "ferrite"
files:
- "Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz"
- "Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz"
script: |
set -e -o pipefail

Expand Down Expand Up @@ -92,7 +92,7 @@ script: |
BASEPREFIX="${PWD}/depends"

mkdir -p ${BASEPREFIX}/SDKs
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz

# Build dependencies for each host
for i in $HOSTS; do
Expand Down
25 changes: 21 additions & 4 deletions contrib/guix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,27 @@ find output/ -type f -print0 | sort -z | xargs -r0 sha256sum

* _**MAX_JOBS**_

Override the maximum number of jobs to run simultaneously, you might want to
do so on a memory-limited machine. This may be passed to `make` as in `make
--jobs="$MAX_JOBS"` or `xargs` as in `xargs -P"$MAX_JOBS"`. _(defaults to the
value of `nproc` outside the container)_
Set the depends tree cache for built packages. This is passed through to the
depends tree. Setting this to the same directory across multiple builds of the
depends tree can eliminate unnecessary building of packages.

* _**SDK_PATH**_

Set the path where _extracted_ SDKs can be found. This is passed through to
the depends tree. Note that this is should be set to the _parent_ directory of
the actual SDK (e.g. SDK_PATH=$HOME/Downloads/macOS-SDKs instead of
$HOME/Downloads/macOS-SDKs/Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers).

* _**JOBS**_

Override the number of jobs to run simultaneously, you might want to do so on
a memory-limited machine. This may be passed to:

- `guix` build commands as in `guix environment --cores="$JOBS"`
- `make` as in `make --jobs="$JOBS"`
- `xargs` as in `xargs -P"$JOBS"`

_(defaults to the value of `nproc` outside the container)_

* _**SOURCE_DATE_EPOCH**_

Expand Down
20 changes: 10 additions & 10 deletions contrib/macdeploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ When complete, it will have produced `Ferrite-Qt.dmg`.
### Step 1: Obtaining `Xcode.app`

Our current macOS SDK
(`Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`) can be
(`Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`) can be
extracted from
[Xcode_11.3.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip).
[Xcode_12.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip).
An Apple ID is needed to download this.

After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
Expand All @@ -31,25 +31,25 @@ approach (tested on Debian Buster) is outlined below:
apt install cpio
git clone https://github.com/bitcoin-core/apple-sdk-tools.git

# Unpack Xcode_11.3.1.xip and place the resulting Xcode.app in your current
# Unpack Xcode_12.1.xip and place the resulting Xcode.app in your current
# working directory
python3 apple-sdk-tools/extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i
python3 apple-sdk-tools/extract_xcode.py -f Xcode_12.1.xip | cpio -d -i
```

On macOS the process is more straightforward:

```bash
xip -x Xcode_11.3.1.xip
xip -x Xcode_12.1.xip
```

### Step 2: Generating `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app`
### Step 2: Generating `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz` from `Xcode.app`

To generate `Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz`, run
To generate `Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz`, run
the script [`gen-sdk`](./gen-sdk) with the path to `Xcode.app` (extracted in the
previous stage) as the first argument.

```bash
# Generate a Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz from
# Generate a Xcode-12.1-12A7403-extracted-SDK-with-libcxx-headers.tar.gz from
# the supplied Xcode.app
./contrib/macdeploy/gen-sdk '/path/to/Xcode.app'
```
Expand All @@ -60,7 +60,7 @@ Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple

Apple uses `clang` extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
`-target`, `-mmacosx-version-min`, and `--sysroot`, which are all necessary when
`-target`, `-mmacosx-version-min`, and `-isysroot`, which are all necessary when
building for macOS.

Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the
Expand All @@ -80,7 +80,7 @@ and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done

To complicate things further, all builds must target an Apple SDK. These SDKs are free to
download, but not redistributable. To obtain it, register for an Apple Developer Account,
then download [Xcode_11.3.1](https://download.developer.apple.com/Developer_Tools/Xcode_11.3.1/Xcode_11.3.1.xip).
then download [Xcode_12.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_12.1/Xcode_12.1.xip).

This file is many gigabytes in size, but most (but not all) of what we need is
contained only in a single directory:
Expand Down
44 changes: 32 additions & 12 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)

ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
# Make sure that cache is invalidated when switching between system and
# depends-managed, pinned clang
build_id_string+=system_clang
$(host_arch)_$(host_os)_id_string+=system_clang
endif
Expand Down Expand Up @@ -163,12 +165,6 @@ $(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)

include funcs.mk

binutils_path=$($($(host_arch)_$(host_os)_native_binutils)_prefixbin)
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
else
toolchain_path=
endif
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
Expand All @@ -179,15 +175,39 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
$(AT)touch $@

# $PATH is not preserved between ./configure and make by convention. Its
# modification and overriding at ./configure time is (as I understand it)
# supposed to be captured by the AC_{PROG_{,OBJ}CXX,PATH_{PROG,TOOL}} macros,
# which will expand the program names to their full absolute paths. The notable
# exception is command line overriding: ./configure CC=clang, which skips the
# program name expansion step, and works because the user implicitly indicates
# with CC=clang that clang will be available in $PATH at all times, and is most
# likely part of the user's system.
#
# Therefore, when we "seed the autoconf cache"/"override well-known program
# vars" by setting AR=<blah> in our config.site, either one of two things needs
# to be true for the build system to work correctly:
#
# 1. If we refer to the program by name (e.g. AR=riscv64-gnu-linux-ar), the
# tool needs to be available in $PATH at all times.
#
# 2. If the tool is _**not**_ expected to be available in $PATH at all times
# (such as is the case for our native_cctools binutils tools), it needs to
# be referred to by its absolute path, such as would be output by the
# AC_PATH_{PROG,TOOL} macros.
#
# Minor note: it is also okay to refer to tools by their absolute path even if
# we expect them to be available in $PATH at all times, more specificity does
# not hurt.
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
$(AT)@mkdir -p $(@D)
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
-e 's|@AR@|$(binutils_path)$(host_AR)|' \
-e 's|@RANLIB@|$(binutils_path)$(host_RANLIB)|' \
-e 's|@NM@|$(binutils_path)$(host_NM)|' \
-e 's|@STRIP@|$(binutils_path)$(host_STRIP)|' \
-e 's|@CC@|$(host_CC)|' \
-e 's|@CXX@|$(host_CXX)|' \
-e 's|@AR@|$(host_AR)|' \
-e 's|@RANLIB@|$(host_RANLIB)|' \
-e 's|@NM@|$(host_NM)|' \
-e 's|@STRIP@|$(host_STRIP)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
Expand Down
8 changes: 4 additions & 4 deletions depends/builders/darwin.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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_CC:=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path)
build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(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)
Expand All @@ -10,8 +10,8 @@ build_darwin_SHA256SUM=shasum -a 256
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=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --show-sdk-path)
darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ --sysroot $(shell xcrun --show-sdk-path)
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path)
darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -isysroot$(shell xcrun --show-sdk-path)
darwin_AR:=$(shell xcrun -f ar)
darwin_RANLIB:=$(shell xcrun -f ranlib)
darwin_STRIP:=$(shell xcrun -f strip)
Expand Down
72 changes: 36 additions & 36 deletions depends/config.site.in
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
depends_prefix="`dirname ${ac_site_file}`/.."
depends_prefix="`dirname "$ac_site_file"`/.."

cross_compiling=maybe
host_alias=@HOST@
ac_tool_prefix=${host_alias}-
host_alias="@HOST@"
ac_tool_prefix="${host_alias}-"

if test -z $with_boost; then
with_boost=$depends_prefix
if test -z "$with_boost"; then
with_boost="$depends_prefix"
fi
if test -z $with_qt_plugindir; then
with_qt_plugindir=$depends_prefix/plugins
if test -z "$with_qt_plugindir"; then
with_qt_plugindir="${depends_prefix}/plugins"
fi
if test -z $with_qt_translationdir; then
with_qt_translationdir=$depends_prefix/translations
if test -z "$with_qt_translationdir"; then
with_qt_translationdir="${depends_prefix}/translations"
fi
if test -z $with_qt_bindir && test -z "@no_qt@"; then
with_qt_bindir=$depends_prefix/native/bin
if test -z "$with_qt_bindir" && test -z "@no_qt@"; then
with_qt_bindir="${depends_prefix}/native/bin"
fi
if test -z $with_mpgen && test -n "@multiprocess@"; then
with_mpgen=$depends_prefix/native
if test -z "$with_mpgen" && test -n "@multiprocess@"; then
with_mpgen="${depends_prefix}/native"
fi

if test -z $with_qrencode && test -n "@no_qr@"; then
if test -z "$with_qrencode" && test -n "@no_qr@"; then
with_qrencode=no
fi

if test -z $enable_wallet && test -n "@no_wallet@"; then
if test -z "$enable_wallet" && test -n "@no_wallet@"; then
enable_wallet=no
fi

if test -z $enable_multiprocess && test -n "@multiprocess@"; then
if test -z "$enable_multiprocess" && test -n "@multiprocess@"; then
enable_multiprocess=yes
fi

if test -z $with_miniupnpc && test -n "@no_upnp@"; then
if test -z "$with_miniupnpc" && test -n "@no_upnp@"; then
with_miniupnpc=no
fi

if test -z $with_gui && test -n "@no_qt@"; then
if test -z "$with_gui" && test -n "@no_qt@"; then
with_gui=no
fi

if test -z $enable_zmq && test -n "@no_zmq@"; then
if test -z "$enable_zmq" && test -n "@no_zmq@"; then
enable_zmq=no
fi

if test x@host_os@ = xdarwin; then
if test "x@host_os@" = xdarwin; then
BREW=no
PORT=no
fi

PATH=$depends_prefix/native/bin:$PATH
PKG_CONFIG="`which pkg-config` --static"
PATH="${depends_prefix}/native/bin:${PATH}"
PKG_CONFIG="$(which pkg-config) --static"

# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
# avoid ruining the cache. Sigh.
export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig:$depends_prefix/lib/pkgconfig
export PKG_CONFIG_PATH="${depends_prefix}/share/pkgconfig:${depends_prefix}/lib/pkgconfig"
if test -z "@allow_host_packages@"; then
export PKG_CONFIG_LIBDIR=$depends_prefix/lib/pkgconfig
export PKG_CONFIG_LIBDIR="${depends_prefix}/lib/pkgconfig"
fi

CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
CPPFLAGS="-I${depends_prefix}/include/ ${CPPFLAGS}"
LDFLAGS="-L${depends_prefix}/lib ${LDFLAGS}"

if test -n "@CC@" -a -z "${CC}"; then
CC="@CC@"
Expand All @@ -72,33 +72,33 @@ fi
PYTHONPATH=$depends_prefix/native/lib/python3/dist-packages:$PYTHONPATH

if test -n "@AR@"; then
AR=@AR@
ac_cv_path_ac_pt_AR=${AR}
AR="@AR@"
ac_cv_path_ac_pt_AR="${AR}"
fi

if test -n "@RANLIB@"; then
RANLIB=@RANLIB@
ac_cv_path_ac_pt_RANLIB=${RANLIB}
RANLIB="@RANLIB@"
ac_cv_path_ac_pt_RANLIB="${RANLIB}"
fi

if test -n "@NM@"; then
NM=@NM@
ac_cv_path_ac_pt_NM=${NM}
NM="@NM@"
ac_cv_path_ac_pt_NM="${NM}"
fi

if test -n "@debug@"; then
enable_reduce_exports=no
fi

if test -n "@CFLAGS@"; then
CFLAGS="@CFLAGS@ $CFLAGS"
CFLAGS="@CFLAGS@ ${CFLAGS}"
fi
if test -n "@CXXFLAGS@"; then
CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
CXXFLAGS="@CXXFLAGS@ ${CXXFLAGS}"
fi
if test -n "@CPPFLAGS@"; then
CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
CPPFLAGS="@CPPFLAGS@ ${CPPFLAGS}"
fi
if test -n "@LDFLAGS@"; then
LDFLAGS="@LDFLAGS@ $LDFLAGS"
LDFLAGS="@LDFLAGS@ ${LDFLAGS}"
fi
Loading