From a75d60bf2730f46e446931dcf4599782c106ead4 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Mon, 1 Apr 2013 16:17:18 -0400 Subject: [PATCH] Add an RPATH to the extionsion shared libs so they can find objects in the priv/ directory at runtime --- c_src/build_deps.sh | 7 +++++-- c_src/wiredtiger-extension-link.patch | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 c_src/wiredtiger-extension-link.patch diff --git a/c_src/build_deps.sh b/c_src/build_deps.sh index 9cad875..6ecdc50 100755 --- a/c_src/build_deps.sh +++ b/c_src/build_deps.sh @@ -3,6 +3,7 @@ set -e WT_BRANCH=basho +WT_REMOTE_REPO=http://github.com/wiredtiger/wiredtiger.git [ `basename $PWD` != "c_src" ] && cd c_src @@ -21,8 +22,10 @@ case "$1" in git fetch && \ git merge origin/$WT_BRANCH) else - git clone http://github.com/wiredtiger/wiredtiger.git -b $WT_BRANCH && \ - (cd wiredtiger && ./autogen.sh) + git clone -b $WT_BRANCH --single-branch $WT_REMOTE_REPO && \ + (cd wiredtiger && \ + patch -p1 < ../wiredtiger-extension-link.patch && \ + ./autogen.sh) fi (cd wiredtiger/build_posix && \ ../configure --with-pic \ diff --git a/c_src/wiredtiger-extension-link.patch b/c_src/wiredtiger-extension-link.patch new file mode 100644 index 0000000..46beb29 --- /dev/null +++ b/c_src/wiredtiger-extension-link.patch @@ -0,0 +1,22 @@ +diff --git a/ext/compressors/bzip2/Makefile.am b/ext/compressors/bzip2/Makefile.am +index 0aedc2e..1cc4cf6 100644 +--- a/ext/compressors/bzip2/Makefile.am ++++ b/ext/compressors/bzip2/Makefile.am +@@ -2,5 +2,5 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include + + lib_LTLIBRARIES = libwiredtiger_bzip2.la + libwiredtiger_bzip2_la_SOURCES = bzip2_compress.c +-libwiredtiger_bzip2_la_LDFLAGS = -avoid-version -module ++libwiredtiger_bzip2_la_LDFLAGS = -avoid-version -module -Wl,-rpath,lib/wterl/priv:priv:/usr/local/lib + libwiredtiger_bzip2_la_LIBADD = -lbz2 +diff --git a/ext/compressors/snappy/Makefile.am b/ext/compressors/snappy/Makefile.am +index 6d78823..7d35777 100644 +--- a/ext/compressors/snappy/Makefile.am ++++ b/ext/compressors/snappy/Makefile.am +@@ -2,5 +2,5 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include + + lib_LTLIBRARIES = libwiredtiger_snappy.la + libwiredtiger_snappy_la_SOURCES = snappy_compress.c +-libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module ++libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -Wl,-rpath,lib/wterl/priv:priv:/usr/local/lib + libwiredtiger_snappy_la_LIBADD = -lsnappy