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

Remove setup-circleci.sh and update setup scripts #8454

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Add fbthrift/mvfst/fizz/wangle and other dependencies to velox.
kgpai authored and majetideepak committed Jan 29, 2024
commit ffa0879ea9c66e4eec62e99ff92ee8b234a0e5e5
29 changes: 28 additions & 1 deletion scripts/setup-macos.sh
Original file line number Diff line number Diff line change
@@ -36,6 +36,8 @@ NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
MACOS_DEPS="ninja flex bison cmake ccache protobuf@21 icu4c boost gflags glog libevent lz4 lzo snappy xz zstd [email protected]"

FB_OS_VERSION="v2023.12.04.00"

function run_and_time {
time "$@" || (echo "Failed to run $* ." ; exit 1 )
{ echo "+ Finished running $*"; } 2> /dev/null
@@ -93,11 +95,36 @@ function install_fmt {
}

function install_folly {
github_checkout facebook/folly "v2023.12.04.00"
github_checkout facebook/folly "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
}

function install_fizz {
github_checkout facebookincubator/fizz "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@assignUser do we still need the OPENSSL_ROOT_DIR variable with the upgrade?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tested this. We infact have to remove this variable. Fizz is failing to build otherwise.

[79/85] Linking CXX executable bin/fizz-bogoshim
FAILED: bin/fizz-bogoshim 
: && /Library/Developer/CommandLineTools/usr/bin/c++ -mcpu=apple-m1+crc -std=c++17 -fvisibility=hidden -fvisibility=hidden -fvisibility-inlines-hidden -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -mmacosx-version-min=13.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/BogoShim.dir/test/BogoShim.cpp.o -o bin/fizz-bogoshim  -Wl,-rpath,/opt/homebrew/lib  lib/libfizz.a  /opt/homebrew/Cellar/libsodium/1.0.19/lib/libsodium.dylib  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libfolly.a  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libfmt.a  /opt/homebrew/lib/libboost_context-mt.dylib  /opt/homebrew/lib/libboost_filesystem-mt.dylib  /opt/homebrew/lib/libboost_atomic-mt.dylib  /opt/homebrew/lib/libboost_program_options-mt.dylib  /opt/homebrew/lib/libboost_regex-mt.dylib  /opt/homebrew/lib/libboost_system-mt.dylib  /opt/homebrew/lib/libboost_thread-mt.dylib  /opt/homebrew/lib/libevent.dylib  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libbz2.tbd  /opt/homebrew/lib/liblz4.dylib  /opt/homebrew/lib/libsnappy.dylib  /opt/homebrew/lib/libsodium.dylib  -lc++abi  /opt/homebrew/opt/[email protected]/lib/libssl.dylib  /opt/homebrew/opt/[email protected]/lib/libcrypto.dylib  /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd  /opt/homebrew/lib/libzstd.dylib  /opt/homebrew/lib/libglog.dylib  /opt/homebrew/lib/libgflags.2.2.2.dylib  /Users/deepak/workspace/oss/prestissimo_velox_deps/lib/libdouble-conversion.a && :
ld: Undefined symbols:
  _EVP_PKEY_get_bits, referenced from:
      folly::AsyncSSLSocket::getSSLCertSize() const in libfolly.a[174](AsyncSSLSocket.cpp.o)
  _SSL_get1_peer_certificate, referenced from:
      folly::AsyncSSLSocket::getPeerCertificate() const in libfolly.a[174](AsyncSSLSocket.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Copy link
Contributor

Choose a reason for hiding this comment

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

I was able to build this with openssl root dir etc..
The error you are seeing is because its picking up openssl 3 binary but building against openssl 1 header.. If it builds against openssl 1 binary you wont see that issue.

cmake_install -DBUILD_TESTS=OFF -S fizz
}

function install_wangle {
github_checkout facebook/wangle "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
cmake_install -DBUILD_TESTS=OFF -S wangle
}

majetideepak marked this conversation as resolved.
Show resolved Hide resolved
function install_mvfst {
github_checkout facebook/mvfst "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
}


function install_fbthrift {
github_checkout facebook/fbthrift "${FB_OS_VERSION}"
OPENSSL_ROOT_DIR=$(brew --prefix [email protected]) \
cmake_install -DBUILD_TESTS=OFF
}

function install_double_conversion {
github_checkout google/double-conversion v3.1.5
cmake_install -DBUILD_TESTING=OFF