Skip to content

Conversation

mbautin
Copy link
Contributor

@mbautin mbautin commented Nov 21, 2021

yugabyte/yugabyte-db#10533 (incorrectly using libuv from Homebrew):

  • Explicitly specify libuv search path when building Cassandra C++ driver. This prevents us from using Homebrew-provided libuv even if it is installed.
  • Do not allow Homebrew library paths to appear in otool -L output when checking dynamic libraries. This enforces that the resulting thirdparty package does not depend on any Homebrew libraries, e.g. libuv.

yugabyte/yugabyte-db#10448 (tcmalloc issue on macOS Monterey):
Update gperftools with a patch that fixes tcmalloc on macOS Monterey.
Upstream gperftools issue: gperftools/gperftools#1312, fix: gperftools/gperftools#1315

yugabyte/yugabyte-db#10661 (incorrectly setting min macOS version):
Add validation that libraries are built for the correct target version of macOS by examining the output of otool -l.
As part of looking into this, I found out that Boost previously did not even use the compiler and linker flags that we were providing. Fixed this by specifying the toolset=... parameter to b2. Also fixed Boost build on x86_64 macOS (after the arm64 commit landed, we would always specify the arm64 architecture). Another dependency that required changes was crypt_blowfish (needed to pass -mmacosx-version-min=... in LDFLAGS and ASFLAGS). I noticed that specifying min macOS version as 10.14 (Mojave) does not work when building for arm64, so I specified min macOS version as 11.2 there for now. Also specifying minimum macOS version does not seem to work correctly when building on macOS 10.15 (Catalina) on GitHub Actions, but works well on Big Sur (11.x) so we will look into upgrading our build workers, and we may have to release a few packages manually.

Other improvements:

  • Specify patch_strip as 1 by default so we don't have to specify it everywhere.
  • Add a --force flag to rebuild dependencies even if the system thinks it does not need to based on "stamp" files.
  • Add a --delete-build-dir to delete a dependency's build directory before attempting to build that dependency.
  • Always rebuild dependencies if the build directory is missing.
  • Generate convenient shell scripts allowing to re-run CMake builds manually.
  • Expand the "patch marker" file naming format to include the number of patches.
  • Remove unused test data for compiler version detection (we are now using the https://pypi.org/project/compiler-identification/ module).
  • The redis_cli dependency used to have custom logic to patch how libhiredis refers to itself on macOS. This patching belongs in hiredis.py, and we have a standard implementation for it (fix_shared_library_references) so the custom code from redis_cli.py is being deleted.

@mbautin mbautin requested review from spolitov and svarnau November 21, 2021 07:16
@mbautin mbautin changed the title Libuv and monterey gperftools tcmalloc fix for macOS Monterey; do not use Homebrew libuv Nov 21, 2021
@mbautin mbautin changed the title tcmalloc fix for macOS Monterey; do not use Homebrew libuv tcmalloc fix for macOS Monterey; do not use Homebrew libuv; fix Boost flags; fix min macOS version Nov 23, 2021
@mbautin mbautin merged commit c38d3df into yugabyte:master Nov 23, 2021
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.

2 participants