From e3219ff2c5967c869c49a4b10f31bb3f180b2e0b Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Thu, 28 Mar 2013 22:21:36 -0400 Subject: [PATCH] Add linker flags so that shared libraries are found relative to either the wterl layout or the Riak layout. --- c_src/build_deps.sh | 5 +++-- rebar.config | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/c_src/build_deps.sh b/c_src/build_deps.sh index cab9e4a..20c539c 100755 --- a/c_src/build_deps.sh +++ b/c_src/build_deps.sh @@ -30,7 +30,8 @@ case "$1" in --enable-bzip2 \ --prefix=$BASEDIR/system && \ make -j && make install) - cp system/bin/wt ../priv - cp system/lib/*.so ../priv + [ -d $BASEDIR/../priv ] || mkdir $BASEDIR/../priv + cp $BASEDIR/system/bin/wt $BASEDIR/../priv + cp $BASEDIR/system/lib/*.so $BASEDIR/../priv ;; esac diff --git a/rebar.config b/rebar.config index 701571a..52d6171 100644 --- a/rebar.config +++ b/rebar.config @@ -37,7 +37,7 @@ {port_env, [ {"DRV_CFLAGS", "$DRV_CFLAGS -Werror -I c_src/system/include"}, - {"DRV_LDFLAGS", "$DRV_LDFLAGS -Wl,-rpath -Wl,priv -Lpriv -lwiredtiger"} + {"DRV_LDFLAGS", "$DRV_LDFLAGS -Wl,-rpath,lib/wterl/priv:priv -Lpriv -lwiredtiger"} ]}. {pre_hooks, [{compile, "c_src/build_deps.sh"}]}.