mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 03:52:56 +00:00
## 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
26 lines
716 B
Diff
26 lines
716 B
Diff
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})
|