-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename libduckdb.so in pg_duckdb context to avoid conflict with pg_mo…
…oncake (#10915) ## Problem Introducing pg_duckdb caused a conflict with pg_mooncake. Both use libduckdb.so in different versions. ## Summary of changes - Rename the libduckdb.so to libduckdb_pg_duckdb.so in the context of pg_duckdb so that it doesn't conflict with libduckdb.so referenced by pg_mooncake. - use a version map to rename the duckdb symbols to a version specific name - DUCKDB_1.1.3 for pg_mooncake - DUCKDB_1.2.0 for pg_duckdb For the concept of version maps see - https://www.man7.org/conf/lca2006/shared_libraries/slide19a.html - https://peeterjoot.com/2019/09/20/an-example-of-linux-glibc-symbol-versioning/ - https://akkadia.org/drepper/dsohowto.pdf
- Loading branch information
1 parent
1f0dea9
commit 8fd0f89
Showing
4 changed files
with
121 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/libduckdb.map b/libduckdb.map | ||
new file mode 100644 | ||
index 0000000000..3b56f00cd7 | ||
--- /dev/null | ||
+++ b/libduckdb.map | ||
@@ -0,0 +1,6 @@ | ||
+DUCKDB_1.1.3 { | ||
+ global: | ||
+ *duckdb*; | ||
+ local: | ||
+ *; | ||
+}; | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 3e757a4bcc..88ab4005b9 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -135,6 +135,8 @@ else() | ||
target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) | ||
link_threads(duckdb) | ||
link_extension_libraries(duckdb) | ||
+ target_link_options(duckdb PRIVATE | ||
+ -Wl,--version-script=${CMAKE_SOURCE_DIR}/libduckdb.map) | ||
|
||
add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) | ||
target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
diff --git a/libduckdb_pg_duckdb.map b/libduckdb_pg_duckdb.map | ||
new file mode 100644 | ||
index 0000000000..0872978b48 | ||
--- /dev/null | ||
+++ b/libduckdb_pg_duckdb.map | ||
@@ -0,0 +1,6 @@ | ||
+DUCKDB_1.2.0 { | ||
+ global: | ||
+ *duckdb*; | ||
+ local: | ||
+ *; | ||
+}; | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 58adef3fc0..2c522f91be 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -59,7 +59,7 @@ endfunction() | ||
|
||
if(AMALGAMATION_BUILD) | ||
|
||
- add_library(duckdb SHARED "${PROJECT_SOURCE_DIR}/src/amalgamation/duckdb.cpp") | ||
+ add_library(duckdb_pg_duckdb SHARED "${PROJECT_SOURCE_DIR}/src/amalgamation/duckdb.cpp") | ||
target_link_libraries(duckdb ${DUCKDB_SYSTEM_LIBS}) | ||
link_threads(duckdb) | ||
link_extension_libraries(duckdb) | ||
@@ -109,7 +109,7 @@ else() | ||
duckdb_yyjson | ||
duckdb_zstd) | ||
|
||
- add_library(duckdb SHARED ${ALL_OBJECT_FILES}) | ||
+ add_library(duckdb_pg_duckdb SHARED ${ALL_OBJECT_FILES}) | ||
|
||
if(WIN32 AND NOT MINGW) | ||
ensure_variable_is_number(DUCKDB_MAJOR_VERSION RC_MAJOR_VERSION) | ||
@@ -131,9 +131,11 @@ else() | ||
target_sources(duckdb PRIVATE version.rc) | ||
endif() | ||
|
||
- target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) | ||
- link_threads(duckdb) | ||
- link_extension_libraries(duckdb) | ||
+ target_link_libraries(duckdb_pg_duckdb ${DUCKDB_LINK_LIBS}) | ||
+ link_threads(duckdb_pg_duckdb) | ||
+ link_extension_libraries(duckdb_pg_duckdb) | ||
+ target_link_options(duckdb_pg_duckdb PRIVATE | ||
+ -Wl,--version-script=${CMAKE_SOURCE_DIR}/libduckdb_pg_duckdb.map) | ||
|
||
add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) | ||
target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) | ||
@@ -141,7 +143,7 @@ else() | ||
link_extension_libraries(duckdb_static) | ||
|
||
target_include_directories( | ||
- duckdb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
+ duckdb_pg_duckdb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) | ||
|
||
target_include_directories( | ||
@@ -161,7 +163,7 @@ else() | ||
endif() | ||
|
||
install( | ||
- TARGETS duckdb duckdb_static | ||
+ TARGETS duckdb_pg_duckdb duckdb_static | ||
EXPORT "${DUCKDB_EXPORT_SET}" | ||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" | ||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8fd0f89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7840 tests run: 7440 passed, 14 failed, 386 skipped (full report)
Failures on Postgres 16
test_throughput[github-actions-selfhosted-50-pipelining_config7-30-100-128-batchable {'max_batch_size': 1, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config8-30-100-128-batchable {'max_batch_size': 2, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config9-30-100-128-batchable {'max_batch_size': 2, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config10-30-100-128-batchable {'max_batch_size': 4, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config11-30-100-128-batchable {'max_batch_size': 4, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config12-30-100-128-batchable {'max_batch_size': 8, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config13-30-100-128-batchable {'max_batch_size': 8, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config14-30-100-128-batchable {'max_batch_size': 16, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config15-30-100-128-batchable {'max_batch_size': 16, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config16-30-100-128-batchable {'max_batch_size': 32, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config17-30-100-128-batchable {'max_batch_size': 32, 'execution': 'tasks', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config5-30-100-128-batchable {'mode': 'serial'}]
: release-x86-64-with-lfctest_throughput[github-actions-selfhosted-50-pipelining_config6-30-100-128-batchable {'max_batch_size': 1, 'execution': 'concurrent-futures', 'mode': 'pipelined'}]
: release-x86-64-with-lfctest_branch_creation_many[github-actions-selfhosted-random-1024]
: release-x86-64-with-lfcFlaky tests (1)
Postgres 17
test_timeline_copy[500000]
: release-x86-64-without-lfcCode coverage* (full report)
functions
:32.8% (8632 of 26294 functions)
lines
:48.6% (72626 of 149326 lines)
* collected from Rust tests only
8fd0f89 at 2025-02-24T21:40:48.259Z :recycle: