Skip to content

Commit

Permalink
Upgrade liberasurecode 1.5.0 -> 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dw-hkoba committed Jul 8, 2019
1 parent 199c96e commit 116f713
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
20 changes: 13 additions & 7 deletions install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,25 @@ CFLAGS="-I${BUILD_DIR}/include" LDFLAGS="-L${BUILD_DIR}/lib" ./configure --disab
make $MAKE_FLAGS install
cd ../

#
# zlib, introduced in liberasurecode 1.5.0 -> 1.6.0
#

git clone https://github.com/madler/zlib.git
cd zlib
git checkout cacf7f1 # tag: v1.2.11
CFLAGS="-I${BUILD_DIR}/include -fPIC" LDFLAGS="-L${BUILD_DIR}/lib" ./configure --prefix $BUILD_DIR
make $MAKE_FLAGS install
cd ../

#
# liberasurecode
#
git clone https://github.com/openstack/liberasurecode.git
cd liberasurecode/
git checkout 1.5.0
if [ "$(uname)" == "Darwin" ]; then
# if the compiler has the feature to check `address-of-packed-member`, we suppress it.
# it is only annoying for liberasurecode v1.5.0.
patch -p1 < ../for_darwin_to_detect_compiler_flag.patch
fi
git checkout 1.6.1
./autogen.sh
CFLAGS="-I${BUILD_DIR}/jerasure/include -I${BUILD_DIR}/include"
CFLAGS=$CFLAGS LIBS="-lJerasure" LDFLAGS="-L${BUILD_DIR}/lib" ./configure --disable-shared --with-pic --prefix $BUILD_DIR
CFLAGS=$CFLAGS LIBS="-lJerasure -lz" LDFLAGS="-L${BUILD_DIR}/lib" ./configure --disable-shared --with-pic --prefix $BUILD_DIR
patch -p1 < ../liberasurecode.patch # Applies a patch for building static library
make $MAKE_FLAGS install
1 change: 1 addition & 0 deletions src/c_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub const EINSUFFFRAGS: u32 = 208;

#[link(name = "erasurecode", kind = "static")]
#[link(name = "gf_complete", kind = "static")]
#[link(name = "z", kind = "static")]
#[link(name = "Jerasure", kind = "static")]
#[link(name = "Xorcode", kind = "static")]
extern "C" {
Expand Down

0 comments on commit 116f713

Please sign in to comment.