-
Notifications
You must be signed in to change notification settings - Fork 89
Building
Christian Priebe edited this page Jun 10, 2019
·
1 revision
Main instructions for building SGX-LKL can be found in the README.
Ensure you install all the packages listed in the prerequisites section where possible.
CentOS comes with old versions of protobuf
and protobuf-c
(v2.5), but SGX-LKL requires
protobuf >=2.6
, so we need to update protobuf manaually:
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar xvf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
./configure
make
make check
make install
and protobuf-c
:
wget https://github.com/protobuf-c/protobuf-c/releases/download/v1.2.1/protobuf-c-1.2.1.tar.gz
tar xvf protobuf-c-1.2.1.tar.gz
cd protobuf-c-1.2.1
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig // specify the location of protobuf.pc file
./configure
make
make install
We need to specify the library path of protobuf:
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
Then we need to reinstall the SGX driver from source code. Please follow the Intel's document to complete this step. (https://github.com/01org/linux-sgx-driver)
Next, we need to install the updated development tools. The following command will install GCC version that greather than 5.4
yum install centos-release-scl
yum install devtoolset-7 devtoolset-7-gcc devtoolset-7-gcc-c++ bison flex
We can now switch to the new gcc with:
scl enable devtoolset-7 bash
Now, we can build the SGX-LKL as described in the README.