Matthias Volk
7 years ago
10 changed files with 0 additions and 271 deletions
-
3.gitmodules
-
44Jenkinsfile
-
37doc/build.md
-
37doc/dependencies.md
-
1doc/getting-started.md
-
2install.sh
-
34util/astyle/options.astyle
-
BINutil/checklist/storage.ods
-
10util/osx-package/package.sh
-
103util/osx-package/packager.py
@ -1,3 +0,0 @@ |
|||||
[submodule "resources/3rdparty/cusplibrary"] |
|
||||
path = resources/3rdparty/cusplibrary |
|
||||
url = https://github.com/cusplibrary/cusplibrary.git |
|
@ -1,44 +0,0 @@ |
|||||
node { |
|
||||
def cmakeTool |
|
||||
stage('Preparation') { |
|
||||
// Get some code from a GitHub repository |
|
||||
checkout scm |
|
||||
|
|
||||
cmakeTool = tool name: 'InSearchPath', type: 'hudson.plugins.cmake.CmakeTool' |
|
||||
|
|
||||
sh "rm -rf build" |
|
||||
sh "mkdir -p build" |
|
||||
} |
|
||||
stage('Configure') { |
|
||||
dir("build") { |
|
||||
sh "${cmakeTool} .." |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
stage('Build') { |
|
||||
dir("build") { |
|
||||
sh "make storm" |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
stage('Build Tests') { |
|
||||
dir("build") { |
|
||||
sh "make -j 4 tests" |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
stage('Test') { |
|
||||
dir("build") { |
|
||||
sh "make check-verbose" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
stage('Archive') { |
|
||||
archiveArtifacts artifacts: 'build/bin/*', onlyIfSuccessful: true |
|
||||
archiveArtifacts artifacts: 'build/lib/*', onlyIfSuccessful: true |
|
||||
archiveArtifacts artifacts: 'build/include/*', onlyIfSuccessful: true |
|
||||
} |
|
||||
} |
|
@ -1,37 +0,0 @@ |
|||||
# Building Storm |
|
||||
|
|
||||
|
|
||||
## Requirements |
|
||||
CMake >= 3.2 |
|
||||
CMake is required as it is used to generate the Makefiles or Projects/Solutions required to build StoRM. |
|
||||
|
|
||||
### Compiler: |
|
||||
A C++11 compliant compiler is required to build StoRM. It is tested and known to work with the following compilers: |
|
||||
- GCC 5.3 |
|
||||
- Clang 3.5.0 |
|
||||
|
|
||||
Other versions or compilers might work, but are not tested. |
|
||||
|
|
||||
The following Compilers are known NOT to work: |
|
||||
- Microsoft Visual Studio versions older than 2013, |
|
||||
- GCC versions 4.9.1 and older. |
|
||||
|
|
||||
Prerequisites: |
|
||||
Boost >= 1.61 |
|
||||
Build using the Boost Build system, for x64 use "bjam address-model=64" or "bjam.exe address-model=64 --build-type=complete" |
|
||||
|
|
||||
## Instructions |
|
||||
|
|
||||
### General |
|
||||
|
|
||||
```bash |
|
||||
mkdir build |
|
||||
cd build |
|
||||
``` |
|
||||
|
|
||||
It is recommended to make an out-of-source build, meaning that the folder in which CMake generates its Cache, Makefiles and output files should not be the Project Root nor its Source Directory. |
|
||||
A typical build layout is to create a folder "build" in the project root alongside the CMakeLists.txt file, change into this folder and execute "cmake .." as this will leave all source files untouched |
|
||||
and makes cleaning up the build tree very easy. |
|
||||
There are several options available for the CMake Script as to control behaviour and included components. |
|
||||
If no error occured during the last CMake Configure round, press Generate. |
|
||||
Now you can build StoRM using the generated project/makefiles in the Build folder you selected. |
|
@ -1,37 +0,0 @@ |
|||||
# Dependencies |
|
||||
|
|
||||
## Included Dependencies: |
|
||||
- Carl 1.0 |
|
||||
- CUDD 3.0.0 |
|
||||
CUDD is included in the StoRM Sources under /resources/3rdparty/cudd-2.5.0 and builds automatically alongside StoRM. |
|
||||
Its Sourced where heavily modified as to incorporate newer Versions of Boost, changes in C++ (TR1 to C++11) and |
|
||||
to remove components only available under UNIX. |
|
||||
- Eigen 3.3 beta1 |
|
||||
Eigen is included in the StoRM Sources under /resources/3rdparty/eigen and builds automatically alongside StoRM. |
|
||||
|
|
||||
|
|
||||
- GTest 1.7.0 |
|
||||
GTest is included in the StoRM Sources under /resources/3rdparty/gtest-1.7.0 and builds automatically alongside StoRM |
|
||||
- GMM >= 4.2 |
|
||||
GMM is included in the StoRM Sources under /resources/3rdparty/gmm-4.2 and builds automatically alongside StoRM. |
|
||||
|
|
||||
## Optional: |
|
||||
- Gurobi >= 5.6.2 |
|
||||
Specify the path to the gurobi root dir using -DGUROBI_ROOT=/your/path/to/gurobi |
|
||||
- Z3 >= 4.3.2 |
|
||||
Specify the path to the z3 root dir using -DZ3_ROOT=/your/path/to/z3 |
|
||||
- MathSAT >= 5.2.11 |
|
||||
Specify the path to the mathsat root dir using -DMSAT_ROOT=/your/path/to/mathsat |
|
||||
- MPIR >= 2.7.0 |
|
||||
MSVC only and only if linked with MathSAT |
|
||||
Specify the path to the gmp-include directory -DGMP_INCLUDE_DIR=/your/path/to/mathsat |
|
||||
Specify the path to the mpir.lib directory -DGMP_MPIR_LIBRARY=/your/path/to/mpir.lib |
|
||||
Specify the path to the mpirxx.lib directory -DGMP_MPIRXX_LIBRARY=/your/path/to/mpirxx.lib |
|
||||
- GMP |
|
||||
clang and gcc only |
|
||||
- CUDA Toolkit >= 6.5 |
|
||||
Specify the path to the cuda toolkit root dir using -DCUDA_ROOT=/your/path/to/cuda |
|
||||
- CUSP >= 0.4.0 |
|
||||
Only of built with CUDA Toolkit |
|
||||
CUSP is included in the StoRM Sources as a git-submodule unter /resources/3rdparty/cusplibrary |
|
||||
|
|
@ -1 +0,0 @@ |
|||||
|
|
@ -1,2 +0,0 @@ |
|||||
#!/bin/bash |
|
||||
pip install -ve stormpy |
|
@ -1,34 +0,0 @@ |
|||||
# Select overall style. |
|
||||
--style=google |
|
||||
--mode=c |
|
||||
--recursive |
|
||||
|
|
||||
# Attach brackets to namespaces and classes. |
|
||||
--attach-namespaces |
|
||||
--attach-classes |
|
||||
|
|
||||
# Of course, namespaces should also be indented. |
|
||||
--indent-namespaces |
|
||||
|
|
||||
# C++ comments starting in column 1 are also supposed to be indented properly. |
|
||||
--indent-col1-comments |
|
||||
|
|
||||
# Add space padding around operators. |
|
||||
--pad-oper |
|
||||
|
|
||||
# Put the pointer/reference operators next to the variable. |
|
||||
--align-pointer=type |
|
||||
|
|
||||
# Add brackets to conditional one-line statements. |
|
||||
--add-brackets |
|
||||
|
|
||||
# Convert tabs to spaces in non-indentation part of the line as well. |
|
||||
--convert-tabs |
|
||||
|
|
||||
# Remove spaces in definition of C++ templates. |
|
||||
--close-templates |
|
||||
|
|
||||
# Don't let lines get too long. |
|
||||
--max-code-length=140 |
|
||||
|
|
||||
--verbose |
|
@ -1,10 +0,0 @@ |
|||||
#!/bin/sh |
|
||||
|
|
||||
DYLIBBUNDLER_DIR=/Users/chris/work/macdylibbundler/ |
|
||||
|
|
||||
mkdir -p $1 |
|
||||
mkdir -p $1/bin |
|
||||
mkdir -p $1/lib |
|
||||
cp $2 $1/bin |
|
||||
$DYLIBBUNDLER_DIR/dylibbundler -cd -od -b -p @executable_path/../lib -x $1/bin/storm -d $1/lib |
|
||||
python packager.py --bin storm --dir $1 |
|
@ -1,103 +0,0 @@ |
|||||
import argparse |
|
||||
import subprocess |
|
||||
import os |
|
||||
from shutil import copyfile |
|
||||
|
|
||||
def get_dependencies(file): |
|
||||
# Call otool -L file to obtain the dependencies. |
|
||||
proc = subprocess.Popen(["otool", "-L", args.binary], stdout=subprocess.PIPE) |
|
||||
result = {} |
|
||||
for line_bytes in proc.stdout: |
|
||||
line = line_bytes.decode("utf-8").strip() |
|
||||
lib = line.split()[0] |
|
||||
if (lib.startswith("@")): |
|
||||
lib = lib.split("/", 1)[1] |
|
||||
(base, file) = os.path.split(lib) |
|
||||
print(base + " // " + file) |
|
||||
|
|
||||
return result |
|
||||
|
|
||||
def create_package(args): |
|
||||
create_package_dirs(args.dir) |
|
||||
copy_binary_to_package_dir(args.bin, args.binary_basename, args.dir) |
|
||||
run_dylibbundler(args.bundler_binary, args.dir, args.binary_basename) |
|
||||
pass |
|
||||
|
|
||||
def parse_arguments(): |
|
||||
parser = argparse.ArgumentParser(description='Package the storm binary on Mac OS.') |
|
||||
parser.add_argument('--bin', dest='bin', help='the binary to package', default='storm') |
|
||||
parser.add_argument('--dir', dest='dir', help='the root directory of the package (will be created if it does not exist)', default='.') |
|
||||
parser.add_argument('--dylibbundler', dest='bundler_binary', help='the binary of the dylibbundler', default='dylibbundler') |
|
||||
args = parser.parse_args() |
|
||||
args.binary_dir = os.path.split(args.bin)[0] |
|
||||
args.binary_basename = os.path.split(args.bin)[1] |
|
||||
return args |
|
||||
|
|
||||
def create_package_dirs(root_dir): |
|
||||
if not os.path.exists(root_dir): |
|
||||
os.makedirs(root_dir) |
|
||||
if not os.path.exists(root_dir + "/bin"): |
|
||||
os.makedirs(root_dir + "/bin") |
|
||||
if not os.path.exists(root_dir + "/lib"): |
|
||||
os.makedirs(root_dir + "/bin") |
|
||||
pass |
|
||||
|
|
||||
def copy_binary_to_package_dir(binary, binary_basename, root_dir): |
|
||||
copyfile(binary, root_dir + "/bin/storm") |
|
||||
pass |
|
||||
|
|
||||
def run_dylibbundler(bundler_binary, root_dir, binary_basename): |
|
||||
command = [bundler_binary, "-cd", "-od", "-b", "-p", "@executable_path/../lib", "-x", root_dir + "/bin/" + binary_basename, "-d", root_dir + "/lib"] |
|
||||
print("executing " + str(command)) |
|
||||
#proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
|
||||
pass |
|
||||
|
|
||||
def fix_paths(root_dir, binary_basename): |
|
||||
fix_paths_file(root_dir + "/bin/" + binary_basename) |
|
||||
for file in os.listdir(root_dir + "/lib"): |
|
||||
fix_paths_file(root_dir + "/lib/" + file) |
|
||||
pass |
|
||||
pass |
|
||||
|
|
||||
def fix_paths_file(file): |
|
||||
print("fixing paths for " + file) |
|
||||
fixable_deps = get_fixable_deps(file) |
|
||||
for (path, lib) in fixable_deps: |
|
||||
change_fixable_dep(file, path, lib) |
|
||||
|
|
||||
native_libs = ["libc++.1.dylib", "libSystem.B.dylib"] |
|
||||
|
|
||||
def get_fixable_deps(file): |
|
||||
# Call otool -L file to obtain the dependencies. |
|
||||
proc = subprocess.Popen(["otool", "-L", file], stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
|
||||
result = [] |
|
||||
for line_bytes in proc.stdout: |
|
||||
line = line_bytes.decode("utf-8").strip() |
|
||||
lib = line.split()[0] |
|
||||
if lib.startswith("@rpath/"): |
|
||||
result.append(("@rpath", lib.split("/", 1)[1])) |
|
||||
elif lib.startswith("/"): |
|
||||
path_file = os.path.split(lib) |
|
||||
if path_file[1] not in native_libs: |
|
||||
result.append((path_file[0], path_file[1])) |
|
||||
return result |
|
||||
|
|
||||
def change_fixable_dep(file, path, lib): |
|
||||
# Call install_name_tool to change the fixable dependencies |
|
||||
command = ["install_name_tool", "-change", path + "/" + lib, "@executable_path/../lib/" + lib, file] |
|
||||
print("executing " + str(command)) |
|
||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE) |
|
||||
#print ("after call to install_name_tool") |
|
||||
#proc = subprocess.Popen(["otool", "-L", file], stdout=subprocess.PIPE) |
|
||||
#for line_bytes in proc.stdout: |
|
||||
# line = line_bytes.decode("utf-8").strip() |
|
||||
# print(line) |
|
||||
pass |
|
||||
|
|
||||
if __name__ == "__main__": |
|
||||
args = parse_arguments() |
|
||||
|
|
||||
#create_package(args) |
|
||||
fix_paths(args.dir, args.binary_basename) |
|
||||
|
|
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue