Skip to content

Fix stp build #200

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

Merged
merged 5 commits into from
Oct 23, 2024
Merged
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
18 changes: 18 additions & 0 deletions scripts/build/common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,21 @@ function with_sudo() {
"$@"
fi
}

function version_lte() {
local v1="$1"
local v2="$2"
printf '%s\n%s\n' "$1" "$2" | sort -C -V
}

function version_lt() {
! version_lte "$2" "$1"
}

function version_gte() {
version_lte "$2" "$1"
}

function version_gt() {
! version_gte "$2" "$1"
}
1 change: 1 addition & 0 deletions scripts/build/p-klee-linux-ubuntu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install_build_dependencies_klee() {
pkg-config
cmake-data
coreutils
libtinfo-dev
)

if [[ "${SOLVERS:-}" == "metaSMT" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/p-stp-linux-ubuntu.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ install_build_dependencies_stp() {

dependencies=(
build-essential

bison
ca-certificates
cmake
flex
git
zlib1g-dev
libtinfo-dev
)

#Install essential dependencies
Expand Down
16 changes: 15 additions & 1 deletion scripts/build/p-stp.inc
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Build scripts for STP
# Variables that any artifact of this package might depend on
setup_build_variables_stp() {
source "${DIR}/common-functions"

STP_SUFFIX="${SANITIZER_SUFFIX}"

MINISAT_BUILD_PATH="${BASE}/minisat-build${STP_SUFFIX}"
MINISAT_INSTALL_PATH="${BASE}/minisat-install${STP_SUFFIX}"

if version_gt "${STP_VERSION}" "2.3.4"; then
ABC_INSTALL_PATH="${BASE}/stp-${STP_VERSION}-build${STP_SUFFIX}/lib/extlib-abc/build/"
fi

STP_BUILD_PATH="${BASE}/stp-${STP_VERSION}-build${STP_SUFFIX}"
STP_INSTALL_PATH="${BASE}/stp-${STP_VERSION}-install${STP_SUFFIX}"
stp_url="https://github.com/stp/stp.git"
Expand All @@ -14,12 +20,17 @@ setup_build_variables_stp() {
}

download_stp() {
source "${DIR}/common-functions"
# Download minisat
git_clone_or_update https://github.com/stp/minisat "${BASE}/minisat" "master"

# Download STP
git_clone_or_update "${stp_url}" "${BASE}/stp-${STP_VERSION}" "${STP_VERSION}"

if version_gt "${STP_VERSION}" "2.3.4"; then
cd "${BASE}/stp-${STP_VERSION}" || return 1
git submodule init
git submodule update
fi
}

build_stp() {
Expand Down Expand Up @@ -98,6 +109,9 @@ get_build_artifacts_stp() {
setup_build_variables_stp
echo "${MINISAT_INSTALL_PATH}"
echo "${STP_INSTALL_PATH}"
if version_gt "${STP_VERSION}" "2.3.4"; then
echo "${ABC_INSTALL_PATH}"
fi
)
}

Expand Down
Loading