-
Notifications
You must be signed in to change notification settings - Fork 56
Building BoringSSL
The instructions provided below specify the steps to build BoringSSL on Linux on IBM Z for following distributions:
- RHEL (7.8, 7.9, 8.1, 8.2, 8.3)
- SLES (12 SP5, 15 SP2)
- Ubuntu (18.04, 20.04, 20.10)
General Notes:
- When following the steps below please use a standard permission user unless otherwise specified.
- A directory
/<source_root>/will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
If you want to build boringssl using manual steps, go to STEP 1.2.
Use the following commands to build boringssl using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/BoringSSL/Jan2021/build_boringssl.sh
# Build boringssl
bash build_boringssl.sh [Provide -t option for executing build with tests]
In case of error, check logs for more details or go to STEP 1.2 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/-
RHEL (7.8, 7.9)
sudo subscription-manager repos --enable=rhel-7-server-for-system-z-devtools-rpms sudo yum install -y wget tar make gcc gcc-c++ bzip2 zlib zlib-devel git devtoolset-7 scl enable devtoolset-7 bash -
RHEL (8.1, 8.2, 8.3)
sudo yum install -y wget tar make gcc gcc-c++ bzip2 zlib zlib-devel git xz diffutils cmake -
SLES 12 SP5
sudo zypper install -y wget git tar cmake zlib-devel gcc7 gcc7-c++ sudo ln -sf /usr/bin/gcc-7 /usr/bin/gcc sudo ln -sf /usr/bin/g++-7 /usr/bin/g++ sudo ln -sf /usr/bin/gcc /usr/bin/cc sudo ln -sf /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc -
SLES 15 SP2
sudo zypper install -y wget git tar cmake zlib-devel gcc gcc-c++ sudo ln -sf /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc -
Ubuntu 18.04
sudo apt-get update sudo apt-get install -y build-essential wget make tar git cmake gcc-7 g++-7 -
Ubuntu (20.04, 20.10)
sudo apt-get update sudo apt-get install -y wget tar make gcc g++ cmake git -
Build Cmake 3.7.2 (Only for RHEL 7.x)
cd $SOURCE_ROOT wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz tar xzf cmake-3.7.2.tar.gz cd cmake-3.7.2 ./configure --prefix=/usr/local make && sudo make install -
Install Go - v1.15.7
cd $SOURCE_ROOT wget https://storage.googleapis.com/golang/go1.15.7.linux-s390x.tar.gz tar -xzf go1.15.7.linux-s390x.tar.gz export PATH=$SOURCE_ROOT/go/bin:$PATH export GOROOT=$SOURCE_ROOT/go export GOPATH=$SOURCE_ROOT/go/bin go version
cd $SOURCE_ROOT
git clone https://github.com/linux-on-ibm-z/boringssl
cd boringssl
git checkout patch-s390x-Jan2021
cd $SOURCE_ROOT/boringssl
mkdir build
cd build/
cmake ..
make
cd $SOURCE_ROOT/boringssl
go run util/all_tests.goThe information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.