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

Update OSX CI and other dependencies #536

Merged
merged 13 commits into from
Apr 13, 2023

Conversation

drgora
Copy link
Contributor

@drgora drgora commented Apr 13, 2023

The main goal of this PR is to fix compilation on/for recent macOS versions, which becomes necessary after Boost update to version 1.81.
macOS binaries compiled after this PR only will be compatible with macOS version 10.14 (Mojave) or newer.

In order to achieve such a goal, we:

  • update the CI to use the xcode12.3 image, which includes macOS 11.1 and Xcode 12.3
  • update or backport patches for dependencies (gtest, leveldb, zeromq)
  • fix many compilation warnings generated by recent clang versions

This PR also includes a number of other improvements. Specifically, we:

  • ditch the usage of the zencash-apple repository altogether, since now the prefer the build tools provided by travis images
  • move from boost::optional to std::optional (fixing errors with recent gtest)
  • fix several inconsistencies in the build flags used for different libraries by the build system
  • fix warnings generated by Make
  • default to -O3 optimization level for all release builds (linux, mingw, and osx)

nuttycom and others added 12 commits April 12, 2023 09:36
@daira identified an error in zeromq/libzmq#4494
that we reproduced in zcash/zcash#6393. This adds @daira's patch from
zeromq/libzmq#4507 to ensure we handle this
potential case of undefined behavior.

Co-authored-by: Daira Hopwood <[email protected]>
This is needed to fix the CI on recent OSX systems. For reference, see rust-lang/cargo#8603.
Instead of compiling ourselves the build tools needed (e.g. cmake, autotools), check that such tools are available in
the given image and use those.
In addition to removing an unnecessary dependency on boost, this also helps fixing compilation errors with recent gtest.
This commit also fixes inconsistencies in the compilation flags for different static libraries used in the same output binary.
@drgora drgora requested review from ptagl, JackPiri and a-petrini April 13, 2023 07:19
Copy link
Contributor

@ptagl ptagl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, great job, thanks!

Copy link
Contributor

@a-petrini a-petrini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of non-blocking comments, and everything looks great to me. High quality PR which introduces many improvements!

src/util.h Outdated Show resolved Hide resolved
@drgora drgora force-pushed the dr/fix_mac_compilation branch from 5e96b64 to c3756ee Compare April 13, 2023 14:22
@ptagl ptagl merged commit 767a6b0 into development_4.1_rebase Apr 13, 2023
@ptagl ptagl deleted the dr/fix_mac_compilation branch April 13, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants