[native ] Fix setup scripts to align with Velox setup scripts#22448
[native ] Fix setup scripts to align with Velox setup scripts#22448majetideepak merged 1 commit intoprestodb:masterfrom
Conversation
d0cbecf to
012cffd
Compare
8bd92bc to
a7b6887
Compare
| source "$(dirname "${BASH_SOURCE}")/../velox/scripts/setup-macos.sh" | ||
|
|
||
| MACOS_DEPS="${MACOS_DEPS} bison gperf" | ||
| MACOS_VELOX_DEPS="${MACOS_VELOX_DEPS} gperf" |
There was a problem hiding this comment.
Do we need to include MACOS_VELOX_DEPS?
The sourcing of the velox setup-macos script would set this but is the idea that brew will install both velox and prestissimo deps. This would then alleviate the need to run the velox script separately (prior). I found that running only the prestissimo script will not work on the Linux because dnf or apt isn't run to install all the deps (e.g. compiler and such) when run for the first time.
Perhaps we should do this similarly for Linux to make sure such deps are installed?
There was a problem hiding this comment.
I fixed the macos script.
The new setup scripts by default do not install anything.
We source the Velox setup scripts and install the (Presto, Velox) build deps from package manager (optional), (Presto, Velox) deps from the package manager, and then the (Presto, Velox) packages via download.
There was a problem hiding this comment.
I found that running only the prestissimo script will not work on the Linux because dnf or apt isn't run to install all the deps
Can you try now?
b232b51 to
4ed3b6f
Compare
275cae1 to
322d67b
Compare
|
I verified these changes locally. |
|
@czentgr can you make another pass? Thanks! |
29035b5 to
c43aa8c
Compare
presto-native-execution/Makefile
Outdated
| rm -rf /tmp/docker && \ | ||
| mkdir -p /tmp/docker && \ | ||
| cp scripts/setup-$(CONTAINER_NAME).sh scripts/$(CONTAINER_NAME)-container.dockfile velox/scripts/setup-helper-functions.sh /tmp/docker && \ | ||
| cp scripts/setup-$(CONTAINER_NAME).sh scripts/$(CONTAINER_NAME)-container.dockfile velox/scripts/setup-centos8.sh velox/scripts/setup-helper-functions.sh /tmp/docker && \ |
There was a problem hiding this comment.
should this be velox/scripts/setup-${CONTAINER_NAME} ? ..
There was a problem hiding this comment.
I made a comment about this but I deleted a duplikcate comment so I guess it deleted both?
Anyway I said that in prestissimo the script is called setup-centos.sh while in Velox it is setup-centos8.sh.
The CONTAINER_NAME is set to centos. So we'd need setup-${CONTAINER_NAME}8 here. But this doesn't work if the container is ubuntu. If it is only CentOS then we are ok.
There was a problem hiding this comment.
I am removing this target as part of the #21929.
I am thinking we can use if-else for now :).
| ./configure --prefix=/usr/local/gperf/3_1 && | ||
| make "-j$(nproc)" && | ||
| make install && | ||
| ln -s /usr/local/gperf/3_1/bin/gperf /usr/local/bin/ |
There was a problem hiding this comment.
Can we include a line about removing the symlink if it exists?
I've run into the problem where the symlink exists and line 45 will fail aborting the processing.
There was a problem hiding this comment.
Good point. I will add a check if the target exists.
| MACOS_DEPS="${MACOS_DEPS} bison gperf" | ||
| export FB_OS_VERSION=v2024.04.01.00 | ||
|
|
||
| export PATH=$(brew --prefix bison)/bin:$PATH |
There was a problem hiding this comment.
None of the prestissimo/velox deps require bison?
On Silicon Macs this will be a problem going forward but is likely set later by the users. But removing this we don't expect issues?
There was a problem hiding this comment.
This is a temporary assignment on the current shell. I am thinking there should not be any issues since we don't run this script on every build and things build fine.
There was a problem hiding this comment.
Also, bison is installed in the Velox setup script.
c43aa8c to
694aacb
Compare
Velox setup scripts have been modified to not install the build dependencies by default. Fix setup scripts to adopt that behavior. Fix setup scripts to encapsulate presto packages into a function. Fix setup-centos8.sh script to include Velox dependencies.
694aacb to
6f93c75
Compare
Description
Velox setup scripts have been modified to not install the build dependencies by default.
Fix setup scripts to adopt that behavior.
Fix setup scripts to encapsulate presto packages into a function.
Fix setup-centos8.sh script to include Velox dependencies.
Motivation and Context
Above
Impact
Test Plan
Contributor checklist