From da159251825974ea23de4e2ab458ba0c4d8f9f9b Mon Sep 17 00:00:00 2001 From: "pengfei.xu" Date: Wed, 8 Jan 2025 18:04:20 -0800 Subject: [PATCH] add pre build steps to build scripts --- README.md | 7 ++++--- dss-ecosystem | 2 +- scripts/build_pre.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 4 deletions(-) create mode 100755 scripts/build_pre.sh diff --git a/README.md b/README.md index 822d9ca..e147daa 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,10 @@ sudo python3 -m pip install pybind11 gcovr==5.0 On initial build: -1. Build AWS-SDK-CPP: `./scripts/build_aws-sdk.sh` -2. Install the resulting AWS-SDK-CPP RPM: `sudo yum install ./dss-ansible/artifacts/aws-sdk-cpp-*.rpm -y` -3. Run the `build_all.sh` script: `./scripts/build_all.sh` +1. Set up the build environment: `./scripts/build_pre.sh` +2. Build AWS-SDK-CPP: `./scripts/build_aws-sdk.sh` +3. Install the resulting AWS-SDK-CPP RPM: `sudo yum install ./dss-ansible/artifacts/aws-sdk-cpp-*.rpm -y` +4. Run the `build_all.sh` script: `./scripts/build_all.sh` Once the AWS RPM is installed, only the `build_all.sh` script needs to be run on subsequent builds. diff --git a/dss-ecosystem b/dss-ecosystem index 4a0c782..0ccfd96 160000 --- a/dss-ecosystem +++ b/dss-ecosystem @@ -1 +1 @@ -Subproject commit 4a0c78245be9808235ae7c7ac71e861b532428ca +Subproject commit 0ccfd96c22bce64121911f07009020b37f79754c diff --git a/scripts/build_pre.sh b/scripts/build_pre.sh new file mode 100755 index 0000000..a4a418c --- /dev/null +++ b/scripts/build_pre.sh @@ -0,0 +1,43 @@ +set -e && \ +sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ +sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ +sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo && \ +yum install epel-release centos-release-scl-rh -y && \ +yum install bc bison boost-devel cmake cmake3 CUnit-devel devtoolset-11 dpkg elfutils-libelf-devel \ + flex gcc gcc-c++ git glibc-devel gmp-devel jemalloc-devel Judy-devel libaio-devel libcurl-devel libmpc-devel \ + libuuid-devel make man-db meson mpfr-devel ncurses-devel numactl-devel openssl openssl-devel patch \ + pulseaudio-libs-devel python3 python3-devel python3-pip rdma-core-devel redhat-lsb-core rpm-build \ + snappy-devel tbb-devel wget zlib-devel dnf -y && \ +dnf install cppunit-devel -y && \ +python3 -m pip install pybind11 gcovr==5.0 +# && \ +# wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz && \ +# rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz && \ +# export PATH=$PATH:/usr/local/go/bin && go version + +# Set Go variables +# Set path variables +SCRIPT_DIR=$(readlink -f "$(dirname "$0")") +GIT_DIR=$(realpath "$SCRIPT_DIR/..") +GOVER='1.12' +GODIR="$GIT_DIR/go_$GOVER" +# echo $GODIR +GOTGZ="go$GOVER.linux-amd64.tar.gz" +GOURL="https://dl.google.com/go/$GOTGZ" +GITHUBDIR='github.com/minio' +MINIODIR='minio' +export GO111MODULE=off +export GOPATH="$GODIR" +export PATH="$PATH:$GODIR/bin" + +echo 'Downloading go' +if [ ! -d "$GODIR" ]; then + mkdir "$GODIR" + if [ ! -e "./$GOTGZ" ]; then + wget "$GOURL" --no-check-certificate + fi + tar xzf "$GOTGZ" -C "$GODIR" --strip-components 1 + rm -f "$GOTGZ" +fi + +go version \ No newline at end of file