Skip to content

Commit 293495d

Browse files
committed
Fix exported symbols on Mac (1.4)
This is a backport of the PR #386 to `v1.4-andium` stable branch. This PR is a follow-up to #164 change, it fixes the exported symbols for MacOS and adds listing of symbols on CI runs.
1 parent f286998 commit 293495d

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/Java.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ jobs:
7272
make -C /duckdb release
7373
"
7474
75+
- name: List Symbols
76+
run: |
77+
nm -gU ./build/release/libduckdb_java.so_linux_amd64
78+
7579
- name: JDBC Tests EL8
7680
if: ${{ inputs.skip_tests != 'true' }}
7781
run: |
@@ -218,6 +222,9 @@ jobs:
218222
source /opt/rh/gcc-toolset-12/enable
219223
make -C /duckdb release
220224
"
225+
- name: List Symbols
226+
run: |
227+
nm -gU ./build/release/libduckdb_java.so_linux_arm64
221228
222229
- name: JDBC Tests EL8
223230
shell: bash
@@ -283,6 +290,10 @@ jobs:
283290
${{ env.ALPINE_IMAGE }} \
284291
sh -c 'apk add ${{ env.ALPINE_PACKAGES }} && make -C /duckdb release'
285292
293+
- name: List Symbols
294+
run: |
295+
nm -gU ./build/release/libduckdb_java.so_linux_amd64
296+
286297
- name: JDBC Tests
287298
shell: bash
288299
if: ${{ inputs.skip_tests != 'true' }}
@@ -328,6 +339,10 @@ jobs:
328339
${{ env.ALPINE_IMAGE }} \
329340
sh -c 'apk add ${{ env.ALPINE_PACKAGES }} && make -C /duckdb release'
330341
342+
- name: List Symbols
343+
run: |
344+
nm -gU ./build/release/libduckdb_java.so_linux_arm64
345+
331346
# Test runs are failing because of linux_arm64_musl extensions missing
332347
- name: JDBC Tests
333348
shell: bash
@@ -370,6 +385,12 @@ jobs:
370385
shell: bash
371386
run: make release
372387

388+
- name: List Symbols
389+
shell: cmd
390+
run: |
391+
call "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
392+
dumpbin.exe /exports build\release\Release\libduckdb_java.so_windows_amd64
393+
373394
- name: Java Tests
374395
if: ${{ inputs.skip_tests != 'true' }}
375396
shell: bash
@@ -404,6 +425,10 @@ jobs:
404425
shell: bash
405426
run: make release
406427

428+
- name: List Symbols
429+
run: |
430+
nm -gU ./build/release/libduckdb_java.so_osx_universal
431+
407432
- name: Java Tests
408433
if: ${{ inputs.skip_tests != 'true' }}
409434
shell: bash

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
638638
-Bsymbolic-functions
639639
-fvisibility=hidden
640640
-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/duckdb_java.map)
641-
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
641+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
642642
target_link_options(duckdb_java PRIVATE
643643
-fvisibility=hidden
644644
-Wl,-exported_symbols_list,${CMAKE_CURRENT_LIST_DIR}/duckdb_java.exp)

CMakeLists.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
164164
-Bsymbolic-functions
165165
-fvisibility=hidden
166166
-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/duckdb_java.map)
167-
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
167+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
168168
target_link_options(duckdb_java PRIVATE
169169
-fvisibility=hidden
170170
-Wl,-exported_symbols_list,${CMAKE_CURRENT_LIST_DIR}/duckdb_java.exp)

0 commit comments

Comments
 (0)