Skip to content

Commit 0114128

Browse files
committed
Merge from master into ADH-5740
2 parents 80b78ae + 554b3b7 commit 0114128

50 files changed

Lines changed: 371 additions & 117 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

buildall.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ export -n BZIP2_VERSION
6464
# Build LLVM 3.7+ with and without assertions. For LLVM 3.7+, the default is a
6565
# release build with no assertions.
6666
(
67-
LLVM_VERSION=5.0.1-p7 $SOURCE_DIR/source/llvm/build.sh
68-
LLVM_VERSION=5.0.1-asserts-p7 $SOURCE_DIR/source/llvm/build.sh
67+
LLVM_VERSION=5.0.1-p8 $SOURCE_DIR/source/llvm/build.sh
68+
LLVM_VERSION=5.0.1-asserts-p8 $SOURCE_DIR/source/llvm/build.sh
6969
)
7070

7171
################################################################################
@@ -141,7 +141,7 @@ GFLAGS_VERSION=2.2.0-p2 GLOG_VERSION=0.3.5-p3 $SOURCE_DIR/source/glog/build.sh
141141
GTEST_VERSION=1.6.0 $SOURCE_DIR/source/gtest/build.sh
142142

143143
# New versions of gtest are named googletest
144-
GOOGLETEST_VERSION=1.8.0 $SOURCE_DIR/source/googletest/build.sh
144+
GOOGLETEST_VERSION=1.14.0 $SOURCE_DIR/source/googletest/build.sh
145145

146146
################################################################################
147147
# Build Snappy
@@ -194,7 +194,7 @@ AVRO_VERSION=1.7.4-p5 $SOURCE_DIR/source/avro/build.sh
194194
################################################################################
195195
# Build Rapidjson
196196
################################################################################
197-
RAPIDJSON_VERSION=1.1.0 $SOURCE_DIR/source/rapidjson/build.sh
197+
RAPIDJSON_VERSION=1.1.0-p1 $SOURCE_DIR/source/rapidjson/build.sh
198198

199199
################################################################################
200200
# Build Libunwind
@@ -239,7 +239,6 @@ TPC_DS_VERSION=2.1.0-p1 $SOURCE_DIR/source/tpc-ds/build.sh
239239
export SNAPPY_VERSION=1.1.8
240240
export ZLIB_VERSION=1.2.13
241241
export ZSTD_VERSION=1.5.2
242-
export GOOGLETEST_VERSION=1.8.0
243242
ORC_VERSION=1.7.9-p10 $SOURCE_DIR/source/orc/build.sh
244243
)
245244

@@ -264,7 +263,7 @@ ARROW_VERSION=13.0.0 $SOURCE_DIR/source/arrow/build.sh
264263

265264
# CURL
266265
################################################################################
267-
CURL_VERSION=7.78.0 $SOURCE_DIR/source/curl/build.sh
266+
CURL_VERSION=8.10.1 $SOURCE_DIR/source/curl/build.sh
268267

269268
# CALLONCEHACK
270269
################################################################################
@@ -296,3 +295,11 @@ LIBPFM_VERSION=4.13.0 $SOURCE_DIR/source/libpfm/build.sh
296295
export LIBPFM_VERSION=4.13.0
297296
GOOGLEBENCHMARK_VERSION=1.8.3 $SOURCE_DIR/source/googlebenchmark/build.sh
298297
unset LIBPFM_VERSION
298+
299+
# AWS-SDK-CPP
300+
################################################################################
301+
export CURL_VERSION=8.10.1
302+
export ZLIB_VERSION=1.3.1
303+
AWS_SDK_CPP_VERSION=1.11.485 $SOURCE_DIR/source/aws-sdk-cpp/build.sh
304+
unset CURL_VERSION
305+
unset ZLIB_VERSION

docker/all/assert-dependencies-present.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def check_mvn_works():
124124
def check_ccache_works():
125125
# Older versions of ccache can cause build failures and weirdness (e.g. on Redhat 6)
126126
# Verify that the version we installed is present.
127-
want = '3.3.3'
127+
want = '3.7.12'
128128
LOG.info('Checking that ccache is correctly installed.')
129129
out = check_output(['ccache', '--version'])[0]
130130
if want not in out:
@@ -160,6 +160,7 @@ def main():
160160
check_python_headers_present()
161161
check_aws_works()
162162
check_mvn_works()
163+
check_ccache_works()
163164
check_java_version()
164165

165166

docker/all/postinstall.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ EOF
8989
}
9090

9191
install_ccache() {
92-
dl_verify https://github.com/ccache/ccache/releases/download/v3.3.3/ccache-3.3.3.tar.gz 87a399a2267cfac3f36411fbc12ff8959f408cffd050ad15fe423df88e977e8f
93-
tar xvzf ccache-3.3.3.tar.gz
92+
dl_verify https://github.com/ccache/ccache/releases/download/v3.7.12/ccache-3.7.12.tar.gz d2abe88d4c283ce960e233583061127b156ffb027c6da3cf10770fc0c7244194
93+
tar xvzf ccache-3.7.12.tar.gz
9494
(
95-
cd ccache-3.3.3
95+
cd ccache-3.7.12
9696
./configure
9797
make -j
9898
make install

functions.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,24 @@ function build_fake_package() {
374374
fi
375375
}
376376

377+
function upload_to_s3() {
378+
local FILENAME=$1
379+
local S3_LOCATION=$2
380+
381+
# Upload to s3 can be flaky on certain platforms, so this retries a few times
382+
# to compensate.
383+
local NUM_RETRIES=10
384+
for ((i=1; i<=${NUM_RETRIES}; i++)); do
385+
echo "Uploading ${FILENAME} to ${S3_LOCATION} (attempt #${i})"
386+
if aws s3 cp --only-show-errors ${FILENAME} ${S3_LOCATION} ; then
387+
echo "Successfully uploaded ${FILENAME} to ${S3_LOCATION}"
388+
return 0;
389+
fi
390+
echo "Failed to upload ${FILENAME} to ${S3_LOCATION}"
391+
done
392+
return 1;
393+
}
394+
377395
# Build the RPM or DEB package depending on the operating system.
378396
# Depends on the LOCAL_INSTALL variable containing the target directory and the
379397
# TOOLCHAIN_BUILD_ID variable containing a unique string.
@@ -430,16 +448,12 @@ function build_dist_package() {
430448
local ARCH=$(uname -m)
431449
local PACKAGE_RELATIVE_URL="build/${TOOLCHAIN_BUILD_ID}/${PACKAGE}/${PACKAGE_VERSION}${PATCH_VERSION}-${COMPILER}-${COMPILER_VERSION}/${FULL_TAR_NAME}-${BUILD_LABEL}-${ARCH}.tar.gz"
432450
local PACKAGE_S3_DESTINATION="s3://${S3_BUCKET}/${PACKAGE_RELATIVE_URL}"
433-
echo "Uploading ${PACKAGE_FINAL_TGZ} to ${PACKAGE_S3_DESTINATION}"
434-
aws s3 cp --only-show-errors \
435-
"${PACKAGE_FINAL_TGZ}" "${PACKAGE_S3_DESTINATION}" || $RET_VAL
451+
upload_to_s3 ${PACKAGE_FINAL_TGZ} ${PACKAGE_S3_DESTINATION} || $RET_VAL
436452
# S3_MIRROR_BUCKET may be empty for experimental builds
437453
if [[ -n ${S3_MIRROR_BUCKET:-} ]]; then
438454
local PACKAGE_MIRROR_DESTINATION="s3://${S3_MIRROR_BUCKET}/${PACKAGE_RELATIVE_URL}"
439455
echo "Uploading to mirror:"
440-
echo "Uploading ${PACKAGE_FINAL_TGZ} to ${PACKAGE_MIRROR_DESTINATION}"
441-
aws s3 cp --only-show-errors \
442-
"${PACKAGE_FINAL_TGZ}" "${PACKAGE_MIRROR_DESTINATION}" || $RET_VAL
456+
upload_to_s3 ${PACKAGE_FINAL_TGZ} ${PACKAGE_MIRROR_DESTINATION} || $RET_VAL
443457
fi
444458
fi
445459
}

init-compiler.sh

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,20 @@ fi
4949
GDB_VERSION=12.1 "$SOURCE_DIR"/source/gdb/build.sh
5050

5151
if [[ "$OSTYPE" =~ ^linux ]]; then
52-
# ARCH_FLAGS are used to convey architectur dependent flags that should
52+
# ARCH_FLAGS are used to convey architecture dependent flags that should
5353
# be obeyed by libraries explicitly needing this information.
5454
if [[ "$ARCH_NAME" == "ppc64le" ]]; then
55-
ARCH_FLAGS="-mvsx -maltivec"
55+
ARCH_FLAGS="-mvsx -maltivec"
5656
elif [[ "$ARCH_NAME" == "aarch64" ]]; then
5757
ARCH_FLAGS="-march=armv8-a"
5858
else
59-
ARCH_FLAGS="-mno-avx2"
59+
# x86_64
60+
ARCH_FLAGS="-m64 -mno-avx2"
6061
fi
62+
ARCH_CXXFLAGS=""
6163
elif [[ "$OSTYPE" == "darwin"* ]]; then
6264
# Setting the C++ stlib to libstdc++ on Mac instead of the default libc++
63-
ARCH_FLAGS="-stdlib=libstdc++"
65+
ARCH_CXXFLAGS="-stdlib=libstdc++"
6466
fi
6567

6668
export SYSTEM_GCC_VERSION=$(gcc -dumpversion)
@@ -92,24 +94,15 @@ if [[ $SYSTEM_GCC -eq 0 ]]; then
9294

9395
FULL_LPATH="-L$BUILD_DIR/gcc-$GCC_VERSION/lib64"
9496
LDFLAGS="$ARCH_FLAGS $FULL_RPATH $FULL_LPATH"
95-
96-
if [[ "$ARCH_NAME" == "aarch64" ]]; then
97-
CXXFLAGS="$ARCH_FLAGS -fPIC -O3"
98-
else
99-
CXXFLAGS="$ARCH_FLAGS -fPIC -O3 -m64"
100-
fi
10197
else
102-
if [[ "$OSTYPE" == "darwin"* ]]; then
103-
CXX="g++ -stdlib=libstdc++"
104-
fi
10598
LDFLAGS=""
106-
CXXFLAGS="-fPIC -O3 -m64"
107-
fi
108-
if [[ "$ARCH_NAME" == "aarch64" ]]; then
109-
CFLAGS="-fPIC -O3"
110-
else
111-
CFLAGS="-fPIC -O3 -m64"
11299
fi
100+
# -g1 enables basic debug information for backtraces
101+
# -gz enables compression of debug information
102+
# -gdwarf-4 sets the DWARF version to 4. It is better to be explicit about the DWARF
103+
# version because newer compilers default to DWARF 5.
104+
CFLAGS="$ARCH_FLAGS -fPIC -O3 -g1 -gz -gdwarf-4"
105+
CXXFLAGS="$CFLAGS $ARCH_CXXFLAGS"
113106
if [[ $USE_CCACHE -ne 0 ]]; then
114107
CC=$(setup_ccache $CC)
115108
CXX=$(setup_ccache $CXX)

source/abseil-cpp/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ mkdir build_static
4545
pushd build_static
4646
wrap cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL \
4747
-DABSL_ENABLE_INSTALL=ON -DABSL_BUILD_TESTING=OFF ..
48-
wrap make -j${BUILD_THREADS:-4}
48+
wrap make VERBOSE=1 -j${BUILD_THREADS:-4}
4949
wrap make install
5050
popd
5151

@@ -55,7 +55,7 @@ pushd build_shared
5555
wrap cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE \
5656
-DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL \
5757
-DABSL_ENABLE_INSTALL=ON -DABSL_BUILD_TESTING=OFF ..
58-
wrap make -j${BUILD_THREADS:-4}
58+
wrap make VERBOSE=1 -j${BUILD_THREADS:-4}
5959
wrap make install
6060
popd
6161

source/arrow/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ if needs_build_package ; then
3030
cd cpp
3131
wrap cmake -DARROW_JSON=ON -DARROW_OPTIONAL_INSTALL=ON -DARROW_JEMALLOC=OFF \
3232
-DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL -DCMAKE_BUILD_TYPE=RELEASE
33-
CFLAGS="-fPIC -DPIC" wrap make VERBOSE=1 -j${BUILD_THREADS:-4} all install
33+
wrap make VERBOSE=1 -j${BUILD_THREADS:-4} all install
3434
finalize_package_build $PACKAGE $PACKAGE_VERSION
3535
fi

source/avro/build-cpp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if needs_build_package ; then
3737
-DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL \
3838
-DBOOST_ROOT=${BOOST_ROOT} \
3939
..
40-
wrap make -C . -j${BUILD_THREADS:-4}
40+
wrap make VERBOSE=1 -C . -j${BUILD_THREADS:-4}
4141

4242
# Different versions of CMake produce different locations for the avro-c.pc file
4343
if [[ -e avro-c.pc ]]; then

source/avro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if needs_build_package ; then
3333
mkdir -p build
3434
cd build
3535
wrap cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL ..
36-
wrap make -C . -j${BUILD_THREADS:-4}
36+
wrap make VERBOSE=1 -C . -j${BUILD_THREADS:-4}
3737

3838
# Different versions of CMake produce different locations for the avro-c.pc file
3939
if [[ -e avro-c.pc ]]; then

source/aws-sdk-cpp/build.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2025 Cloudera Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Exit on non-true return value
17+
set -e
18+
# Exit on reference to uninitialized variable
19+
set -u
20+
21+
set -o pipefail
22+
23+
source $SOURCE_DIR/functions.sh
24+
THIS_DIR="$( cd "$( dirname "$0" )" && pwd )"
25+
prepare $THIS_DIR
26+
27+
if needs_build_package ; then
28+
download_dependency $PACKAGE "${PACKAGE_STRING}.tar.gz" $THIS_DIR
29+
setup_package_build $PACKAGE $PACKAGE_VERSION
30+
# This is required for downloading some dependencies.
31+
ORIGINAL_PATH=$PATH
32+
CURL_PATH=${BUILD_DIR}/curl-${CURL_VERSION}/bin
33+
export PATH="$CURL_PATH:$PATH"
34+
wrap ./prefetch_crt_dependency.sh
35+
export PATH=$ORIGINAL_PATH
36+
# Build only the required bedrock components.
37+
wrap cmake -DCMAKE_INSTALL_PREFIX=$LOCAL_INSTALL -DCMAKE_BUILD_TYPE=RELEASE \
38+
-DBUILD_ONLY="bedrock-runtime" -DENABLE_TESTING="OFF" -DUSE_OPENSSL="ON" \
39+
-DBUILD_SHARED_LIBS="OFF" -DCPP_STANDARD="17" \
40+
-DCURL_LIBRARY=${BUILD_DIR}/curl-${CURL_VERSION}/lib/libcurl.so \
41+
-DCURL_INCLUDE_DIR=${BUILD_DIR}/curl-${CURL_VERSION}/include \
42+
-DZLIB_ROOT=${BUILD_DIR}/zlib-${ZLIB_VERSION}
43+
wrap make VERBOSE=1 -j${BUILD_THREADS:-4} install
44+
finalize_package_build $PACKAGE $PACKAGE_VERSION
45+
fi

0 commit comments

Comments
 (0)