Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade liberasurecode 1.5.0 -> 1.6.1 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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