Skip to content

Commit

Permalink
Upgrade folly and other FB lib to v2023.08.07.00
Browse files Browse the repository at this point in the history
Existing folly version uses OpenSSL@1.1, but setup-macos.sh would
install OpenSSL@3 as a dependency of Python. This causes the "make"
process failed with message "Undefined symbols for architecture x86_64:
"_EVP_MD_get_size"" because _EVP_MD_get_size was defined in OpenSSL@1.1
and was replaced by _EVP_MD_size in OpenSSL@3. CMake tries to link
against OpenSSL@3 and therefore the error.

Since the latest folly version is already on OpenSSL@3, upgrading
folly to the latest version solves the problem. This commit upgrades
Velox folly and other FB lib dependencies fizz, wangle, fbthrift to
version v2023.08.07.00.
  • Loading branch information
yingsu00 committed Aug 13, 2023
1 parent 87cc5bc commit 13d4114
Show file tree
Hide file tree
Showing 111 changed files with 116 additions and 113 deletions.
9 changes: 6 additions & 3 deletions scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
# $ scripts/setup-macos.sh install_googletest install_fmt
#

INSTALL_PREREQUISITES="Y"
PROMPT_ALWAYS_RESPOND="y"

set -e # Exit on error.
set -x # Print commands that are executed.

Expand All @@ -34,7 +37,7 @@ 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@1.1"
MACOS_DEPS="ninja flex bison cmake ccache protobuf@21 icu4c boost gflags glog libevent lz4 lzo snappy xz zstd openssl@3"

function run_and_time {
time "$@" || (echo "Failed to run $* ." ; exit 1 )
Expand Down Expand Up @@ -93,8 +96,8 @@ function install_fmt {
}

function install_folly {
github_checkout facebook/folly "v2022.11.14.00"
OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1) \
github_checkout facebook/folly "v2023.08.07.00"
OPENSSL_ROOT_DIR=$(brew --prefix openssl@3) \
cmake_install -DBUILD_TESTS=OFF -DFOLLY_HAVE_INT128_T=ON
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ source $SCRIPTDIR/setup-helper-functions.sh
CPU_TARGET="${CPU_TARGET:-avx}"
COMPILER_FLAGS=$(get_cxx_flags "$CPU_TARGET")
export COMPILER_FLAGS
FB_OS_VERSION=v2022.11.14.00
FB_OS_VERSION=v2023.08.07.00
NPROC=$(getconf _NPROCESSORS_ONLN)
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
export CMAKE_BUILD_TYPE=Release
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/ComparisonConjunct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ BENCHMARK(conjunctsNested) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<ComparisonBenchmark>(1'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/DecodedVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ BENCHMARK(decodeDictionary5Nested) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<DecodedVectorBenchmark>(10'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/FeatureNormalization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ BENCHMARK(normalizeConstant) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<FeatureNormailzationBenchmark>();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/LikeFunctionsBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ BENCHMARK(tpchQuery20) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv, true);
folly::Init(&argc, &argv, true);
benchmark = std::make_unique<LikeFunctionsBenchmark>();
folly::runBenchmarks();
benchmark.reset();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/Preproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ BENCHMARK(allFusedWithNulls) {
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

benchmark = std::make_unique<PreprocBenchmark>();
// Verify that benchmark calculations are correct.
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SelectivityVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ BENCHMARK(sumSelectivity1PerCent) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<SelectivityVectorBenchmark>(10'000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SimpleArithmetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ BENCHMARK(plusCheckedLarge) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<SimpleArithmeticBenchmark>();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/SimpleCastExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ BENCHMARK(castTimestampDateAdjustTimeZone) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);
benchmark = std::make_unique<SimpleCastBenchmark>();
folly::runBenchmarks();
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorCompare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ BENCHMARK_DRAW_LINE();
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmark = std::make_unique<VectorCompareBenchmark>(1000);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorFuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ BENCHMARK_RELATIVE_MULTI(flatMapArrayNested, n) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);
folly::runBenchmarks();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/basic/VectorSlice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ DEFINE_BENCHMARKS(row)
} // namespace facebook::velox

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
using namespace facebook::velox;
gflags::ParseCommandLineFlags(&argc, &argv, true);
VELOX_CHECK_LE(FLAGS_slice_size, kVectorSize);
Expand Down
2 changes: 1 addition & 1 deletion velox/benchmarks/tpch/TpchBenchmarkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ int main(int argc, char** argv) {
std::string kUsage(
"This program benchmarks TPC-H queries. Run 'velox_tpch_benchmark -helpon=TpchBenchmark' for available options.\n");
gflags::SetUsageMessage(kUsage);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
tpchBenchmarkMain();
}
2 changes: 1 addition & 1 deletion velox/benchmarks/unstable/MemoryAllocationBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ BENCHMARK_RELATIVE_MULTI(MmapReallocateMix64) {
} // namespace

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
// TODO: add to run benchmark as a standalone program with multithreading as
// well as actual memory access to trigger minor page faults in OS which traps
// into kernel context to setup physical pages for the lazy-mapped virtual
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/benchmarks/BitUtilBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ BENCHMARK_RELATIVE_MULTI(forEachBitFirstBitFalse) {
} // namespace facebook

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
2 changes: 1 addition & 1 deletion velox/common/base/tests/Memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct CopyCallable {

int main(int argc, char** argv) {
constexpr int32_t kAlignment = folly::hardware_destructive_interference_size;
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
auto chunk = bits::roundUp(
std::max<int64_t>(FLAGS_bytes / FLAGS_threads, kAlignment), kAlignment);
int64_t bytes = chunk * FLAGS_threads;
Expand Down
2 changes: 1 addition & 1 deletion velox/common/base/tests/StatsReporterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ folly::Singleton<BaseStatsReporter> reporter([]() {

int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
facebook::velox::BaseStatsReporter::registered = true;
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/common/file/benchmark/ReadBenchmarkMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using namespace facebook::velox;
// and the IO throughput is 100 MBps, then it takes 10 seconds to just read the
// data.
int main(int argc, char** argv) {
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
ReadBenchmark bm;
bm.initialize();
bm.run();
Expand Down
2 changes: 1 addition & 1 deletion velox/common/memory/tests/MemoryPoolBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ BENCHMARK(FlatSticks, iters) {
}

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
2 changes: 1 addition & 1 deletion velox/connectors/fuzzer/tests/FuzzerConnectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ TEST_F(FuzzerConnectorTest, reproducible) {

int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ BENCHMARK_DRAW_LINE();
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
gflags::ParseCommandLineFlags(&argc, &argv, true);

benchmarkFew = std::make_unique<HivePartitionFunctionBenchmark>(1'000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using namespace facebook::velox;
// and the IO throughput is 100 MBps, then it takes 10 seconds to just read the
// data.
int main(int argc, char** argv) {
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
GCSReadBenchmark bm;
bm.initialize();
bm.run();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using namespace facebook::velox;
// and the IO throughput is 100 MBps, then it takes 10 seconds to just read the
// data.
int main(int argc, char** argv) {
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
S3ReadBenchmark bm;
bm.initialize();
bm.run();
Expand Down
2 changes: 1 addition & 1 deletion velox/connectors/tpch/tests/SpeedTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class TpchSpeedTest {
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);

TpchSpeedTest speedTest;
speedTest.run(
Expand Down
2 changes: 1 addition & 1 deletion velox/connectors/tpch/tests/TpchConnectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,6 @@ TEST_F(TpchConnectorTest, orderDateCount) {

int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/BitPackDecoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void naiveDecodeBitsLE(
}

int32_t main(int32_t argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

// Populate uint32 buffer

Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/DataBufferBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ BENCHMARK(ChainedBufferOps, iters) {
}

int main(int argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
2 changes: 1 addition & 1 deletion velox/dwio/common/tests/IntDecoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ BENCHMARK_RELATIVE(decodeNew_64) {
}

int32_t main(int32_t argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

// Populate uint16 buffer
buffer_u16.resize(kNumElements);
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/E2EFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,6 @@ TEST_F(E2EFilterTest, mutationCornerCases) {
// Define main so that gflags get processed.
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/FloatColumnWriterBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ BENCHMARK(FloatColumnWriterBenchmark10000) {
}

int32_t main(int32_t argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
2 changes: 1 addition & 1 deletion velox/dwio/dwrf/test/IntEncoderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ BENCHMARK_RELATIVE(GenerateAutoIdNew_64) {
}

int32_t main(int32_t argc, char* argv[]) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/ParquetTpchTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ TEST_F(ParquetTpchTest, Q22) {

int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/E2EFilterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,6 @@ TEST_F(E2EFilterTest, combineRowGroup) {
// Define main so that gflags get processed.
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/ParquetReaderBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ PARQUET_BENCHMARKS_NO_FILTER(ARRAY(BIGINT()), List);
// TODO: Add all data types

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
folly::runBenchmarks();
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/reader/ParquetTableScanTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,6 @@ TEST_F(ParquetTableScanTest, readAsLowerCase) {

int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/dwio/parquet/tests/thrift/ThriftTransportTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ TEST_F(ThriftTransportTest, bufferedOutOfBoundry) {
// Define main so that gflags get processed.
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
folly::init(&argc, &argv, false);
folly::Init(&argc, &argv, false);
return RUN_ALL_TESTS();
}
2 changes: 1 addition & 1 deletion velox/examples/OperatorExtensibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class DuplicateRowTranslator : public exec::Operator::PlanNodeTranslator {
};

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

// Fourth, we register the custom plan translator. We're now ready to use our
// operator in a query plan.
Expand Down
2 changes: 1 addition & 1 deletion velox/examples/ScanAndSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ using exec::test::HiveConnectorTestBase;
int main(int argc, char** argv) {
// Velox Tasks/Operators are based on folly's async framework, so we need to
// make sure we initialize it first.
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

// Default memory allocator used throughout this example.
auto pool = memory::addDefaultLeafMemoryPool();
Expand Down
2 changes: 1 addition & 1 deletion velox/examples/ScanOrc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using namespace facebook::velox::dwrf;
// Used to compare the ORC data read by DWRFReader against apache-orc repo.
// Usage: velox_example_scan_orc {orc_file_path}
int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);

if (argc < 2) {
return 1;
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/ExchangeBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ BENCHMARK(localFlat10k) {
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
functions::prestosql::registerAllScalarFunctions();
aggregate::prestosql::registerAllAggregateFunctions();
parse::registerTypeResolver();
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/FilterProjectBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class FilterProjectBenchmark : public VectorTestBase {
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
functions::prestosql::registerAllScalarFunctions();
aggregate::prestosql::registerAllAggregateFunctions();
parse::registerTypeResolver();
Expand Down
2 changes: 1 addition & 1 deletion velox/exec/benchmarks/HashTableBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void combineResults(
} // namespace

int main(int argc, char** argv) {
folly::init(&argc, &argv);
folly::Init(&argc, &argv);
memory::MmapAllocator::Options options;
options.capacity = 10UL << 30;
options.useMmapArena = true;
Expand Down
Loading

0 comments on commit 13d4114

Please sign in to comment.