From 2f0df9917f667453b12c8669c9ab37c4f37fa41e Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Mon, 13 Nov 2017 12:26:21 +0000 Subject: Fix loading IO plugins Not all code paths used LCB_LIBDIR as fallback location when dlopen() IO plugins. Patch 0002 has been updated to fix that. The upstream will be updated accordingly when migrate to new filesystem layout. --- 0002-do-not-install-plugins-into-libdir.patch | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/0002-do-not-install-plugins-into-libdir.patch b/0002-do-not-install-plugins-into-libdir.patch index e487861..74a0528 100644 --- a/0002-do-not-install-plugins-into-libdir.patch +++ b/0002-do-not-install-plugins-into-libdir.patch @@ -1,4 +1,4 @@ -From 1816689ab59fb5eb120d044a9f55f67f373ab376 Mon Sep 17 00:00:00 2001 +From 3d7f066b7d97a8d05fcde0b6cb1b6ac521279d82 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Wed, 27 Sep 2017 02:04:00 +0300 Subject: [PATCH] Do not install plugins into libdir @@ -8,7 +8,8 @@ Subject: [PATCH] Do not install plugins into libdir plugins/io/libev/CMakeLists.txt | 2 +- plugins/io/libevent/CMakeLists.txt | 2 +- plugins/io/libuv/CMakeLists.txt | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) + src/iofactory.c | 6 ++++++ + 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cmake/config-cmake.h.in b/cmake/config-cmake.h.in index 81128091..f97d8bf5 100644 @@ -57,6 +58,23 @@ index 2492a835..86f31687 100644 - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +diff --git a/src/iofactory.c b/src/iofactory.c +index 74eae50c..ca1a2d1b 100644 +--- a/src/iofactory.c ++++ b/src/iofactory.c +@@ -366,6 +366,12 @@ static lcb_error_t generate_options(plugin_info *pi, + } + ret = get_create_func(ours->v.v1.sofile, ours->v.v1.symbol, &plugin, want_debug); + if (ret != LCB_SUCCESS) { ++ char path[PATH_MAX]; ++ /* try to look up the so-file in the libdir */ ++ snprintf(path, PATH_MAX, "%s/%s", LCB_LIBDIR, ours->v.v1.sofile); ++ ret = get_create_func(path, ours->v.v1.symbol, &plugin, want_debug); ++ } ++ if (ret != LCB_SUCCESS) { + if (type) { + *type = LCB_IO_OPS_SELECT; + } -- -2.13.5 +2.13.6 -- cgit