So, WiredTiger prefers that extensions be shared libraries however those
extensions reference other shared libraries. Previously I tried to turn all those shared libs into static libs, however that didn't pan out so well. So now the libwiredtiger.so library is loaded by wterl.so also, later on during use libwiredtiger.so will load libwiredtiger_snappy.so and libwiredtiger_bzip2.so which now have libsnappy.a and libbz2.a respectively linked statically so as to avoid confusion.
This commit is contained in:
parent
3dab6a2dc5
commit
13a9036764
3 changed files with 4 additions and 4 deletions
|
@ -59,7 +59,6 @@ get_wt ()
|
|||
cd ./build_posix || exit 1
|
||||
[ -e Makefile ] && $MAKE distclean
|
||||
../configure --with-pic \
|
||||
--disable-shared \
|
||||
--enable-snappy \
|
||||
--enable-bzip2 \
|
||||
--prefix=${BASEDIR}/system || exit 1
|
||||
|
@ -169,6 +168,7 @@ case "$1" in
|
|||
|
||||
[ -d $BASEDIR/../priv ] || mkdir ${BASEDIR}/../priv
|
||||
cp $BASEDIR/system/bin/wt ${BASEDIR}/../priv
|
||||
cp $BASEDIR/system/lib/libwiredtiger*.so ${BASEDIR}/../priv
|
||||
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -7,7 +7,7 @@ index 0aedc2e..9cd96e3 100644
|
|||
libwiredtiger_bzip2_la_SOURCES = bzip2_compress.c
|
||||
libwiredtiger_bzip2_la_LDFLAGS = -avoid-version -module
|
||||
-libwiredtiger_bzip2_la_LIBADD = -lbz2
|
||||
+libwiredtiger_bzip2_la_LIBADD = -l$(BASEDIR)/system/lib/libbz2.a
|
||||
+libwiredtiger_bzip2_la_LIBADD = -L$(BASEDIR)/system/lib/libbz2.a
|
||||
diff --git a/ext/compressors/snappy/Makefile.am b/ext/compressors/snappy/Makefile.am
|
||||
index 6d78823..286dc55 100644
|
||||
--- a/ext/compressors/snappy/Makefile.am
|
||||
|
@ -17,4 +17,4 @@ index 6d78823..286dc55 100644
|
|||
libwiredtiger_snappy_la_SOURCES = snappy_compress.c
|
||||
libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module
|
||||
-libwiredtiger_snappy_la_LIBADD = -lsnappy
|
||||
+libwiredtiger_snappy_la_LIBADD = -l$(BASEDIR)/system/lib/libsnappy.a
|
||||
+libwiredtiger_snappy_la_LIBADD = -L$(BASEDIR)/system/lib/libsnappy.a
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
{port_env, [
|
||||
{"DRV_CFLAGS", "$DRV_CFLAGS -Werror -I c_src/system/include"},
|
||||
{"DRV_LDFLAGS", "$DRV_LDFLAGS -Wl,-rpath,lib/wterl/priv:priv -Lpriv -Lc_src/system/lib -lsnappy -lbz2 -lwiredtiger -lwiredtiger_snappy -lwiredtiger_bzip2"}
|
||||
{"DRV_LDFLAGS", "$DRV_LDFLAGS -Wl,-rpath,lib/wterl/priv:priv -Lc_src/system/lib -lwiredtiger"}
|
||||
]}.
|
||||
|
||||
{pre_hooks, [{compile, "c_src/build_deps.sh compile"}]}.
|
||||
|
|
Loading…
Reference in a new issue