Skip to content

Commit

Permalink
Fix DuckDB build for macOS ARM and 32-bit (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mewim committed Mar 22, 2024
1 parent 3f817f2 commit 6d39076
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

- name: Install OpenSSL
run: |
brew install openssl@3
brew install openssl@3 duckdb
OPENSSL_ROOT=$(readlink -f /opt/homebrew/Cellar/openssl@3/*/)
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
message(STATUS "32-bit architecture detected")
add_compile_definitions(__32BIT__)
set(__32BIT__ TRUE)
endif()

if(NOT CMAKE_BUILD_TYPE)
Expand Down
6 changes: 5 additions & 1 deletion extension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ if("httpfs" IN_LIST BUILD_EXTENSIONS)
endif()

if ("duckdb_scanner" IN_LIST BUILD_EXTENSIONS)
add_subdirectory(duckdb_scanner)
if(NOT __32BIT__)
# DuckDB does not officially support 32-bit builds, so we disable the
# extension for 32-bit builds
add_subdirectory(duckdb_scanner)
endif()
endif()

if (${BUILD_EXTENSION_TESTS})
Expand Down

0 comments on commit 6d39076

Please sign in to comment.