Skip to content

Commit 9bfedba

Browse files
[Regression] Build the AWS SDK with hidden symbols (#5690)
PR #5223 fixed a bug where Arrow was causing a [double initialization](apache/arrow#40262) of the AWS SDK, specifically on macOS. Recently PR #5616 removed this fix, causing the nightly VCF macOS CI against TileDB `main` to [fail](TileDB-Inc/TileDB-VCF#855). To address the issue, I forked this repo and cherry-picking the PR #5223 commit to head. I've confirmed both on a macOS M2 EC2 instance and in a [VCF branch](TileDB-Inc/TileDB-VCF#856) that this resolves the issue. TYPE: NO_HISTORY Co-authored-by: Theodore Tsirpanis <[email protected]>
1 parent 468d5a2 commit 9bfedba

12 files changed

+72
-0
lines changed

ports/triplets/arm64-osx-asan.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ set(VCPKG_CXX_FLAGS "-fsanitize=address")
1111
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1212
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1313

14+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
15+
# like arrow (https://github.com/apache/arrow/issues/42154).
16+
if("${PORT}" MATCHES "^aws-")
17+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
18+
endif()
19+
1420
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1521
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1622
if("${PORT}" MATCHES "spdlog")

ports/triplets/arm64-osx-release.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ set(VCPKG_BUILD_TYPE release)
1111
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1212
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1313

14+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
15+
# like arrow (https://github.com/apache/arrow/issues/42154).
16+
if("${PORT}" MATCHES "^aws-")
17+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
18+
endif()
19+
1420
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1521
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1622
if("${PORT}" MATCHES "spdlog")

ports/triplets/arm64-osx-relwithdebinfo.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ set(VCPKG_C_FLAGS "-g")
1212
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1313
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1414

15+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
16+
# like arrow (https://github.com/apache/arrow/issues/42154).
17+
if("${PORT}" MATCHES "^aws-")
18+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
19+
endif()
20+
1521
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1622
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1723
if("${PORT}" MATCHES "spdlog")

ports/triplets/arm64-osx.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ set(VCPKG_OSX_DEPLOYMENT_TARGET 11)
99
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1010
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1111

12+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
13+
# like arrow (https://github.com/apache/arrow/issues/42154).
14+
if("${PORT}" MATCHES "^aws-")
15+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
16+
endif()
17+
1218
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1319
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1420
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-linux-asan.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ set(VCPKG_CXX_FLAGS "-fsanitize=address")
1010
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1111
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1212

13+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
14+
# like arrow (https://github.com/apache/arrow/issues/42154).
15+
if("${PORT}" MATCHES "^aws-")
16+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
17+
endif()
18+
1319
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1420
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1521
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-linux-release.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ set(VCPKG_BUILD_TYPE release)
99
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1010
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1111

12+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
13+
# like arrow (https://github.com/apache/arrow/issues/42154).
14+
if("${PORT}" MATCHES "^aws-")
15+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
16+
endif()
17+
1218
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1319
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1420
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-linux-relwithdebinfo.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ set(VCPKG_C_FLAGS "-g")
1010
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1111
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1212

13+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
14+
# like arrow (https://github.com/apache/arrow/issues/42154).
15+
if("${PORT}" MATCHES "^aws-")
16+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
17+
endif()
18+
1319
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1420
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1521
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-linux.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)
77
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
88
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
99

10+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
11+
# like arrow (https://github.com/apache/arrow/issues/42154).
12+
if("${PORT}" MATCHES "^aws-")
13+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
14+
endif()
15+
1016
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1117
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1218
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-osx-asan.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ set(VCPKG_CXX_FLAGS "-fsanitize=address")
1111
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1212
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1313

14+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
15+
# like arrow (https://github.com/apache/arrow/issues/42154).
16+
if("${PORT}" MATCHES "^aws-")
17+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
18+
endif()
19+
1420
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1521
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1622
if("${PORT}" MATCHES "spdlog")

ports/triplets/x64-osx-release.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ set(VCPKG_BUILD_TYPE release)
1111
# Fix CMake 4.0 errors in ports supporting very old CMake verions.
1212
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1313

14+
# Hide symbols in the AWS SDK. Fixes symbol collisions with other libraries
15+
# like arrow (https://github.com/apache/arrow/issues/42154).
16+
if("${PORT}" MATCHES "^aws-")
17+
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_CXX_VISIBILITY_PRESET=hidden;-DCMAKE_C_VISIBILITY_PRESET=hidden")
18+
endif()
19+
1420
# Hide symbols in spdlog. Fixes symbol collisions in downstream projects
1521
# (https://github.com/gabime/spdlog/pull/3322 was rejected).
1622
if("${PORT}" MATCHES "spdlog")

0 commit comments

Comments
 (0)