-
Notifications
You must be signed in to change notification settings - Fork 7
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
PR: from dyn to master #6
Open
yuezato
wants to merge
19
commits into
master
Choose a base branch
from
dyn
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d318ebd
fixed may cause SEGV if EC used in among threads despite using the gl…
roentgen 3c34cb0
fixed may cause SEGV if EC used in among threads despite using the gl…
roentgen c33931e
heading for the frugalos/* repository
roentgen 28b089d
Merge branch 'threadsafe' of https://github.com/frugalos/liberasureco…
roentgen 6d9b740
fixed merge break
roentgen 8d6a73b
enabled shared for libJerasure.so
roentgen 3d9aeb8
changed revision
roentgen 194f44b
use openstack/liberasurecode in the dynamic-link mode instead of the …
yuezato 149a047
add LibErasureCodeRsVand on the basis of PR3 of frugalos/liberasurecode
yuezato f61578e
reflect the removal of a patch file
yuezato cecbcef
unlimit the number of cargo test threads
yuezato 7ab9eb3
add a shell-script to install dependent libraries
yuezato b1ff114
change branches on which this branch depends to frugalos_dyn
yuezato 75cc965
use the environment variable FRUGALOS_DIR
yuezato 78918dd
delete unneeded lines
yuezato 6ae193b
fix .travis.yml
yuezato 7fcca4f
change libJerasure -> libFrugalosJerasure
yuezato ce8ad6c
Update README.md
yuezato 91b6d5c
Update Cargo.toml
yuezato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,10 @@ | ||
use std::env; | ||
use std::fs; | ||
use std::path::PathBuf; | ||
use std::process::{Command, Stdio}; | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=build.rs"); | ||
|
||
let outdir = PathBuf::from(env::var_os("OUT_DIR").unwrap()); | ||
let build_dir = outdir.join("build"); | ||
let _ = fs::remove_dir_all(&build_dir); | ||
fs::create_dir(&build_dir).unwrap(); | ||
let frugalos_dir: std::ffi::OsString = env::var_os("FRUGALOS_DIR").unwrap(); | ||
let frugalos_dir: String = frugalos_dir.into_string().unwrap(); | ||
|
||
for file in &["install_deps.sh", "liberasurecode.patch"] { | ||
fs::copy(file, build_dir.join(file)).unwrap(); | ||
} | ||
|
||
match Command::new("./install_deps.sh") | ||
.current_dir(&build_dir) | ||
.stderr(Stdio::inherit()) | ||
.output() | ||
{ | ||
Err(e) => { | ||
panic!("{}: {}", build_dir.display(), e); | ||
} | ||
Ok(output) => { | ||
if !output.status.success() { | ||
panic!( | ||
"./install_deps.sh failed: exit-code={:?}", | ||
output.status.code() | ||
); | ||
} | ||
} | ||
} | ||
|
||
println!("cargo:rustc-link-search={}/lib", build_dir.display()); | ||
println!("cargo:rustc-link-search={}/lib", frugalos_dir); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -eux | ||
|
||
INSTALL_DIR="" | ||
|
||
if [ -z $FRUGALOS_DIR ] | ||
then | ||
echo "Please set the environment FRUGALOS_DIR to install auxiliary artifacts." | ||
exit 1 | ||
fi | ||
|
||
INSTALL_DIR=$FRUGALOS_DIR | ||
|
||
case $INSTALL_DIR in | ||
/*) | ||
echo "We install dependent artifacts into FRUGALOS_DIR=$FRUGALOS_DIR" | ||
;; | ||
*) | ||
echo "You passed a relative path. Please use an absolute path." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
MAKE_FLAGS="" | ||
|
||
# Please try and add other distributions. | ||
case "$(uname)" in | ||
"Linux") MAKE_FLAGS="-j$(nproc)";; | ||
"Darwin") MAKE_FLAGS="-j$(sysctl -n hw.ncpu)" | ||
esac | ||
|
||
BUILD_DIR="build_working_directory" | ||
mkdir $BUILD_DIR | ||
|
||
# | ||
# gf-complete | ||
# | ||
git clone https://github.com/ceph/gf-complete.git $BUILD_DIR/gf-complete | ||
cd $BUILD_DIR/gf-complete | ||
git checkout a6862d1 | ||
./autogen.sh | ||
./configure --with-pic --prefix $INSTALL_DIR | ||
make $MAKE_FLAGS install | ||
cd ../.. | ||
|
||
# | ||
# jerasure | ||
# | ||
git clone -b frugalos_dyn https://github.com/frugalos/jerasure.git $BUILD_DIR/jerasure | ||
cd $BUILD_DIR/jerasure | ||
autoreconf --force --install | ||
CFLAGS="-I${INSTALL_DIR}/include" LDFLAGS="-L${INSTALL_DIR}/lib" ./configure --with-pic --prefix $INSTALL_DIR | ||
make $MAKE_FLAGS install | ||
cd ../.. | ||
|
||
# | ||
# liberasurecode | ||
# | ||
git clone -b frugalos_dyn https://github.com/frugalos/openstack_liberasurecode.git $BUILD_DIR/openstack_liberasurecode | ||
cd $BUILD_DIR/openstack_liberasurecode | ||
./autogen.sh | ||
CFLAGS="-I${INSTALL_DIR}/include -I${INSTALL_DIR}/include/jerasure" | ||
if [ "$(uname)" == "Darwin" ]; then | ||
CFLAGS="$CFLAGS -Wno-error=address-of-packed-member" | ||
fi | ||
CFLAGS=$CFLAGS LDFLAGS="-L${INSTALL_DIR}/lib" ./configure --with-pic --prefix $INSTALL_DIR | ||
make $MAKE_FLAGS install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
依存関係的には、liberasurecodeはfrugalosに依存しないより汎用的なライブラリとしても使えるものだと思うので、個人的には
FRUGALOS_DIR
もそれを反映した名前(e.g.,LIBERASURECODE_DIR
)の方が好みです。ただ、今回の修正で
libfrugalos
内の他の個所にも結構frugalos
という用語が出てくるようになって、それらを全て置き換えるのも手間だと思うので、別にこのままでも大丈夫です。