Skip to content

Commit

Permalink
Install FMT and download ccache on MacOS (#10933)
Browse files Browse the repository at this point in the history
Summary:
Brew fmt11 is not supported.
ccache brings in fmt11 from brew.
The brew fmt11 headers are taking precedence over bundled headers.
Bundle fmt and download prebuilt ccache that is statically linked.
We will fix the header include issue in #10920 and add ccache back.
Resolves #10936

Pull Request resolved: #10933

Reviewed By: amitkdutta

Differential Revision: D62256989

Pulled By: kgpai

fbshipit-source-id: 84aa17af17d564f291c416b479493bd9e5ea0715
  • Loading branch information
majetideepak authored and facebook-github-bot committed Sep 5, 2024
1 parent 92b27fd commit c722aa8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "TRUE"
run: |
source scripts/setup-macos.sh
brew install $MACOS_BUILD_DEPS $MACOS_VELOX_DEPS
install_build_prerequisites
install_velox_deps_from_brew
echo "NJOBS=`sysctl -n hw.ncpu`" >> $GITHUB_ENV
brew unlink protobuf || echo "protobuf not installed"
Expand All @@ -79,6 +80,7 @@ jobs:
- name: Configure Build
env:
folly_SOURCE: BUNDLED #brew folly does not have int128
fmt_SOURCE: BUNDLED #brew fmt11 is not supported
run: |
ccache -sz -M 5Gi
cmake \
Expand Down
7 changes: 5 additions & 2 deletions scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ PYTHON_VENV=${PYHTON_VENV:-"${SCRIPTDIR}/../.venv"}
NPROC=$(getconf _NPROCESSORS_ONLN)

DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
MACOS_VELOX_DEPS="bison boost double-conversion flex fmt gflags glog googletest icu4c libevent libsodium lz4 lzo openssl protobuf@21 simdjson snappy thrift xz xsimd zstd"
MACOS_BUILD_DEPS="ninja cmake ccache"
MACOS_VELOX_DEPS="bison boost double-conversion flex gflags glog googletest icu4c libevent libsodium lz4 lzo openssl protobuf@21 simdjson snappy thrift xz xsimd zstd"
MACOS_BUILD_DEPS="ninja cmake"
FB_OS_VERSION="v2024.05.20.00"
FMT_VERSION="10.1.1"

Expand Down Expand Up @@ -77,6 +77,9 @@ function install_build_prerequisites {
python3 -m venv ${PYTHON_VENV}
fi
source ${PYTHON_VENV}/bin/activate; pip3 install cmake-format regex pyyaml
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-darwin.tar.gz
tar -xf ccache.tar.gz
mv ccache-4.10.2-darwin/ccache /usr/local/bin/
}

function install_velox_deps_from_brew {
Expand Down

0 comments on commit c722aa8

Please sign in to comment.