Skip to content

Commit 69305b9

Browse files
pratikpugaliaPresto CUDF CI
authored andcommitted
[native] Build for Gcc14 (prestodb#25861)
Summary: Fix to support GCC14 build - Replace `{}` with explicit empty container to avoid the following error within optionals. error: converting to 'std::in_place_t' from list would use explicit contructor `{}` leads to copy initialization which is not allowed since in_place_t is marked explicit - Add Import `chrono` in `Duration.h` as gcc14 mandates having it - Correct include directory path for proxygen - Ignore errors associated with template-id-cdtor as gcc14 fails build for constructors having template support Rollback Plan: ``` == NO RELEASE NOTE == ``` Differential Revision: D80784416 Pulled By: pratikpugalia
1 parent 8cacb64 commit 69305b9

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

presto-native-execution/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SCRIPT_CXX_FLAGS}")
3333
set(DISABLED_WARNINGS
3434
"-Wno-nullability-completeness -Wno-deprecated-declarations")
3535

36+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
37+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0.0")
38+
string(APPEND DISABLED_WARNINGS " -Wno-error=template-id-cdtor")
39+
endif()
40+
endif()
41+
3642
# Important warnings that must be explicitly enabled.
3743
set(ENABLE_WARNINGS "-Wreorder")
3844

@@ -223,7 +229,7 @@ include_directories(SYSTEM ${FBTHRIFT_INCLUDE_DIR})
223229
set(PROXYGEN_LIBRARIES ${PROXYGEN_HTTP_SERVER} ${PROXYGEN} ${WANGLE} ${FIZZ}
224230
${MVFST_EXCEPTION})
225231
find_path(PROXYGEN_DIR NAMES include/proxygen)
226-
set(PROXYGEN_INCLUDE_DIR "${PROXYGEN_DIR}/include/proxygen")
232+
set(PROXYGEN_INCLUDE_DIR "${PROXYGEN_DIR}/include/")
227233

228234
include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR} ${PROXYGEN_INCLUDE_DIR})
229235
include_directories(.)

presto-native-execution/presto_cpp/main/operators/tests/BinarySortableSerializerTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ TEST_F(BinarySortableSerializerTest, ArrayTypeSingleFieldTests) {
10451045
// null < []
10461046
EXPECT_TRUE(
10471047
singleArrayFieldCompare<int64_t>(
1048-
{std::nullopt, {{}}}, velox::core::kAscNullsFirst) < 0);
1048+
{std::nullopt, {std::vector<std::optional<int64_t>>{}}}, velox::core::kAscNullsFirst) < 0);
10491049
}
10501050

10511051
TEST_F(BinarySortableSerializerTest, RowTypeSingleFieldTests) {

presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ TEST_F(BroadcastTest, endToEndSerdeLayout) {
272272
runBroadcastTest({data}, {{"c1", "c1", "c2"}});
273273

274274
// Skip all.
275-
runBroadcastTest({data}, {{}});
275+
runBroadcastTest({data}, {std::vector<std::string>{}});
276276
}
277277

278278
TEST_F(BroadcastTest, endToEndWithNoRows) {

presto-native-execution/presto_cpp/presto_protocol/core/Duration.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
#pragma once
1515
#include <re2/re2.h>
16+
#include <chrono>
1617

1718
namespace facebook::presto::protocol {
1819

0 commit comments

Comments
 (0)