Skip to content
Browse files

Update to build against the lastest leveldb 1.5 source

  • Loading branch information...
1 parent a8c761e commit b8b2a021cc0d2553b37a6056ccfe2365938d467d @chirino chirino committed Aug 2, 2012
Showing with 23 additions and 17 deletions.
  1. +14 −10 leveldb.patch
  2. +9 −7 readme.md
View
24 leveldb.patch
@@ -1,16 +1,20 @@
diff --git a/build_detect_platform b/build_detect_platform
-index d8d9ba1..a71f692 100644
+index 959a7d6..388d225 100755
--- a/build_detect_platform
+++ b/build_detect_platform
-@@ -26,7 +26,7 @@ case `uname -s` in
- ;;
- Linux)
- PLATFORM=OS_LINUX
-- echo "PLATFORM_CFLAGS=-pthread -DOS_LINUX" >> build_config.mk
-+ echo "PLATFORM_CFLAGS=-pthread -fPIC -DOS_LINUX" >> build_config.mk
- echo "PLATFORM_LDFLAGS=-pthread" >> build_config.mk
- ;;
- SunOS)
+@@ -171,9 +171,9 @@ echo "CC=$CC" >> $OUTPUT
+ echo "CXX=$CXX" >> $OUTPUT
+ echo "PLATFORM=$PLATFORM" >> $OUTPUT
+ echo "PLATFORM_LDFLAGS=$PLATFORM_LDFLAGS" >> $OUTPUT
+-echo "PLATFORM_CCFLAGS=$PLATFORM_CCFLAGS" >> $OUTPUT
+-echo "PLATFORM_CXXFLAGS=$PLATFORM_CXXFLAGS" >> $OUTPUT
+-echo "PLATFORM_SHARED_CFLAGS=$PLATFORM_SHARED_CFLAGS" >> $OUTPUT
++echo "PLATFORM_CCFLAGS=$PLATFORM_CCFLAGS $PLATFORM_SHARED_CFLAGS" >> $OUTPUT
++echo "PLATFORM_CXXFLAGS=$PLATFORM_CXXFLAGS $PLATFORM_SHARED_CFLAGS" >> $OUTPUT
++echo "PLATFORM_SHARED_CFLAGS=" >> $OUTPUT
+ echo "PLATFORM_SHARED_EXT=$PLATFORM_SHARED_EXT" >> $OUTPUT
+ echo "PLATFORM_SHARED_LDFLAGS=$PLATFORM_SHARED_LDFLAGS" >> $OUTPUT
+ echo "PLATFORM_SHARED_VERSIONED=$PLATFORM_SHARED_VERSIONED" >> $OUTPUT
diff --git a/include/leveldb/slice.h b/include/leveldb/slice.h
index 74ea8fa..135bbd7 100644
--- a/include/leveldb/slice.h
View
16 readme.md
@@ -184,28 +184,30 @@ The following worked for me on:
* OS X Lion with X Code 4
* CentOS 5.6 (32 and 64 bit)
- * Ubuntu 10.04 (32 and 64 bit)
+ * Ubuntu 12.04 (32 and 64 bit)
+ * apt-get install autoconf libtool
### Build Procedure
Then download the snappy, leveldb, and leveldbjni project source code:
- wget http://snappy.googlecode.com/files/snappy-1.0.3.tar.gz
- tar -zxvf snappy-1.0.3.tar.gz
+ wget http://snappy.googlecode.com/files/snappy-1.0.5.tar.gz
+ tar -zxvf snappy-1.0.5.tar.gz
+
git clone https://code.google.com/p/leveldb
- cd leveldb; git checkout 239ac9d2dea0ac1708b7d903a3d80d3883e0781b ; cd -
+ cd leveldb; git checkout dd0d562b4d4fbd07db6a44f9e221f8d368fee8e4 ; cd -
git clone git://github.com/fusesource/leveldbjni.git
Compile the snappy project. This produces a static library.
- cd snappy-1.0.3
+ cd snappy-1.0.5
./configure --disable-shared --with-pic
make
Patch and Compile the leveldb project. This produces a static library.
cd ../leveldb
- export LIBRARY_PATH=`cd ../snappy-1.0.3; pwd`
+ export LIBRARY_PATH=`cd ../snappy-1.0.5/.libs/; pwd`
export C_INCLUDE_PATH=${LIBRARY_PATH}
export CPLUS_INCLUDE_PATH=${LIBRARY_PATH}
git apply ../leveldbjni/leveldb.patch
@@ -214,7 +216,7 @@ Patch and Compile the leveldb project. This produces a static library.
Now use maven to build the leveldbjni project.
cd ../leveldbjni
- mvn clean install -Dleveldb=`cd ../leveldb; pwd` -Dsnappy=`cd ../snappy-1.0.3; pwd` -P download -P ${platform}
+ mvn clean install -Dleveldb=`cd ../leveldb; pwd` -Dsnappy=`cd ../snappy-1.0.5; pwd` -P download -P ${platform}
Replace ${platform} with one of the following platform identifiers (depending on the platform your building on):

0 comments on commit b8b2a02

Please sign in to comment.
Something went wrong with that request. Please try again.