FMX commented on code in PR #2927: URL: https://github.com/apache/celeborn/pull/2927#discussion_r1850287844
########## cpp/scripts/setup-ubuntu.sh: ########## @@ -0,0 +1,204 @@ +#!/bin/bash +# Based on setup-ubuntu.sh from Facebook Velox +# +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script documents setting up a Ubuntu host for CelebornCpp +# development. Running it should make you ready to compile. +# +# Environment variables: +# * INSTALL_PREREQUISITES="N": Skip installation of packages for build. +# * PROMPT_ALWAYS_RESPOND="n": Automatically respond to interactive prompts. +# Use "n" to never wipe directories. +# +# You can also run individual functions below by specifying them as arguments: +# $ scripts/setup-ubuntu.sh install_googletest install_fmt +# + +# Minimal setup for Ubuntu 22.04. +set -eufx -o pipefail +SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") +source $SCRIPTDIR/setup-helper-functions.sh + +# Folly must be built with the same compiler flags so that some low level types +# are the same size. +COMPILER_FLAGS=$(get_cxx_flags) +export COMPILER_FLAGS +NPROC=$(getconf _NPROCESSORS_ONLN) +BUILD_DUCKDB="${BUILD_DUCKDB:-true}" +export CMAKE_BUILD_TYPE=Release +SUDO="${SUDO:-"sudo --preserve-env"}" +USE_CLANG="${USE_CLANG:-false}" +export INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"} +DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download} + +DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download} +OS_CXXFLAGS="" + +function install_clang15 { + VERSION=`cat /etc/os-release | grep VERSION_ID` + if [[ ! ${VERSION} =~ "22.04" && ! ${VERSION} =~ "24.04" ]]; then + echo "Warning: using the Clang configuration is for Ubuntu 22.04 and 24.04. Errors might occur." + fi + CLANG_PACKAGE_LIST=clang-15 + if [[ ${VERSION} =~ "22.04" ]]; then + CLANG_PACKAGE_LIST=${CLANG_PACKAGE_LIST} gcc-12 g++-12 libc++-12-dev + fi + ${SUDO} apt install ${CLANG_PACKAGE_LIST} -y +} + +FB_OS_VERSION="v2024.07.01.00" +FMT_VERSION="10.1.1" +BOOST_VERSION="boost-1.84.0" +ARROW_VERSION="15.0.0" +STEMMER_VERSION="2.2.0" + +# Install packages required for build. +function install_build_prerequisites { + ${SUDO} apt update + # The is an issue on 22.04 where a version conflict prevents glog install, + # installing libunwind first fixes this. + ${SUDO} apt install -y libunwind-dev + ${SUDO} apt install -y \ + build-essential \ + python3-pip \ + ccache \ + curl \ + ninja-build \ + checkinstall \ + git \ Review Comment: <img width="769" alt="截屏2024-11-20 21 07 14" src="https://github.com/user-attachments/assets/6d3df65b-7f71-4152-afda-3a5a356c1b0f"> You can see that this docker image can not be used as toolchain because it lacks gdb. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
