UnifyFS icon indicating copy to clipboard operation
UnifyFS copied to clipboard

error: couldn't find a suitable libleveldb, use --with-leveldb=PATH

Open tonyhutter opened this issue 6 years ago • 0 comments

System information

Type Version/Name
Operating System Fedora
OS Version 30
Architecture x86-64
UnifyCR Version dev

Describe the problem you're observing

$ ./autogen.sh && ./configure --with-leveldb=/path/to/leveldb/install
...
checking for sys/mount.h... yes
checking for leveldb_open in -lleveldb... no
configure: error: couldn't find a suitable libleveldb, use --with-leveldb=PATH

Building leveldb on Fedora 30 will install it's libraries to INSTALL_PATH/lib64, but m4/leveldb.m4 only looks in INSTALL_PATH/lib. This fixes it for me:

diff --git a/m4/leveldb.m4 b/m4/leveldb.m4
index bb65dd1..bbd643d 100644
--- a/m4/leveldb.m4
+++ b/m4/leveldb.m4
@@ -6,7 +6,7 @@ AC_DEFUN([UNIFYCR_AC_LEVELDB], [
   AC_ARG_WITH([leveldb], [AC_HELP_STRING([--with-leveldb=PATH],
     [path to installed libleveldb [default=/usr/local]])], [
     LEVELDB_CFLAGS="-I${withval}/include"
-    LEVELDB_LDFLAGS="-L${withval}/lib"
+    LEVELDB_LDFLAGS="-L${withval}/lib -L${withval}/lib64"
     CFLAGS="$CFLAGS ${LEVELDB_CFLAGS}"
     LDFLAGS="$LDFLAGS ${LEVELDB_LDFLAGS}"
   ], [])

Describe how to reproduce the problem

Include any warning or errors or releveant debugging data

tonyhutter avatar Jul 10 '19 00:07 tonyhutter