-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add setup functions for velox and build dependencies handled by package managers #8917
Add setup functions for velox and build dependencies handled by package managers #8917
Conversation
✅ Deploy Preview for meta-velox canceled.
|
69a6581
to
52835dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! But from what I can tell you will also need to update the usage of the script across CI/dockerfiles right?
@@ -34,8 +34,8 @@ source $SCRIPTDIR/setup-helper-functions.sh | |||
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 openssl libsodium" | |||
|
|||
MACOS_VELOX_DEPS="flex bison protobuf@21 icu4c boost gflags glog libevent lz4 lzo snappy xz zstd openssl libsodium" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that protobuf will currently not be used due to our excat version matching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/protocolbuffers/protobuf/releases/tag/v21.5
protobuf@21 is 3.21 which is our exact match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed it when building on macos that it wasn't used but I didn't look into it more
|
7cbbe0e
to
788aa79
Compare
@assignUser, @kgpai Centos8 script ran here without any issues. |
Ah I missed the default 👍 |
ea16d8f
to
4ae3ada
Compare
We will need to merge #8943 first since the Ubuntu setup script is not invoked correctly. |
7a92a1a
to
973e06a
Compare
@assignUser, @kgpai Any comments on this PR? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, some minor comments.
@@ -34,8 +34,8 @@ source $SCRIPTDIR/setup-helper-functions.sh | |||
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 openssl libsodium" | |||
|
|||
MACOS_VELOX_DEPS="flex bison protobuf@21 icu4c boost gflags glog libevent lz4 lzo snappy xz zstd openssl libsodium" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed it when building on macos that it wasn't used but I didn't look into it more
scripts/setup-ubuntu.sh
Outdated
# installing libunwind first fixes this. | ||
${SUDO} apt install -y libunwind-dev | ||
${SUDO} apt install -y \ | ||
g++ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g++ \ | |
build-essential \ |
might be more accurate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
scripts/setup-centos8.sh
Outdated
dnf config-manager --set-enabled powertools | ||
dnf update -y | ||
dnf_install ninja-build cmake curl ccache gcc-toolset-9 git wget which | ||
dnf_install autoconf automake python3 libtool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dnf_install autoconf automake python3 libtool | |
dnf_install autoconf automake python39 python39-devel libtool |
It will install 3.6 by default, -devel is for pyvelox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can you fix conflicts ?
.github/workflows/benchmark.yml
Outdated
@@ -88,7 +88,7 @@ jobs: | |||
|
|||
- name: "Install dependencies" | |||
if: ${{ github.event_name == 'pull_request' }} | |||
run: source velox/scripts/setup-ubuntu.sh | |||
run: source velox/scripts/setup-ubuntu.sh && install_build_prerequisites && install_velox_deps_from_apt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would it be nicer to pass an argument , say install to setup-ubuntu etc that then will run install_build_prerequisites
and install_velox_deps_from_apt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argument install
is ambiguous since it does not specify what to install.
I can add another function install_apt_deps
which includes the functions install_build_prerequisites
and install_velox_deps_from_apt
. How does that sound?
source velox/scripts/setup-ubuntu.sh && install_apt_deps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Deepak - that would also work
else | ||
if [ "${INSTALL_PREREQUISITES:-Y}" == "Y" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to add an else saying skipping installation of build prerequisites because of flag so and so..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
973e06a
to
e30f329
Compare
@assignUser what package is this? |
@majetideepak that was about protobuf@3 iirc but it has been a while so things might have changed both in the script and in brew ^^ |
e30f329
to
6d6cb06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I would like to ensure that we dont land with red signals from CI; I am hoping to land #9267 soon and hopefully you can rebase on top of that so that we get an all green build.
.github/workflows/benchmark.yml
Outdated
@@ -88,7 +88,7 @@ jobs: | |||
|
|||
- name: "Install dependencies" | |||
if: ${{ github.event_name == 'pull_request' }} | |||
run: source velox/scripts/setup-ubuntu.sh | |||
run: source velox/scripts/setup-ubuntu.sh && install_build_prerequisites && install_velox_deps_from_apt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Deepak - that would also work
echo "Skipping installation of build dependencies since INSTALL_PREREQUISITES is not set" | ||
fi | ||
# Activate gcc9; enable errors on unset variables afterwards. | ||
source /opt/rh/gcc-toolset-9/enable || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to do this twice ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One is in the if
branch, and the other is in the else
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe move it out then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't move out. In the else branch, we can only enable this after installing build dependencies but before building the packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if branch must be only taken if the build dependencies are already installed. The user is expecting to build specific packages.
cb5cac0
to
11a49ab
Compare
11a49ab
to
863842e
Compare
863842e
to
a70d0a0
Compare
echo "Skipping installation of build dependencies since INSTALL_PREREQUISITES is not set" | ||
fi | ||
# Activate gcc9; enable errors on unset variables afterwards. | ||
source /opt/rh/gcc-toolset-9/enable || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe move it out then...
@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…ge managers (facebookincubator#8917) Summary: In the current setup scripts, the packages handled by the package manager are always installed in Centos8 and Ubuntu. This is unnecessary if we want to install a specific package. Make these installs optional by wrapping them around a function. Split the brew packages on MacOS based on the build vs Velox requirements. Pull Request resolved: facebookincubator#8917 Reviewed By: xiaoxmeng Differential Revision: D55506473 Pulled By: kgpai fbshipit-source-id: 3e4fc31080faac6006dede1808ac9d76cb4b5f60
…ge managers (facebookincubator#8917) Summary: In the current setup scripts, the packages handled by the package manager are always installed in Centos8 and Ubuntu. This is unnecessary if we want to install a specific package. Make these installs optional by wrapping them around a function. Split the brew packages on MacOS based on the build vs Velox requirements. Pull Request resolved: facebookincubator#8917 Reviewed By: xiaoxmeng Differential Revision: D55506473 Pulled By: kgpai fbshipit-source-id: 3e4fc31080faac6006dede1808ac9d76cb4b5f60
In the current setup scripts, the packages handled by the package manager are always installed
in MacOS, Centos8, and Ubuntu. This is unnecessary if we want to install a specific package.
Make these installs optional by wrapping them around a function.
Split the brew packages on MacOS based on the build vs Velox requirements.