1. Disable zlib _explictly_ when building libcurl in remote attestaion demo. The reason for this is that zlib may be implictly linked by the build system of libcurl but not the zlib library is not copied into the Occlum FS image. 2. Use `make -j$(nproc)` 3. Fix typos
46 lines
712 B
Bash
Executable File
46 lines
712 B
Bash
Executable File
#!/bin/bash
|
|
INSTALL_DIR=/usr/local/occlum/x86_64-linux-musl
|
|
|
|
export PATH=$PATH:$INSTALL_DIR/bin
|
|
|
|
cd client
|
|
|
|
make -j$(nproc)
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "demo make failed"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf occlum_context
|
|
mkdir occlum_context
|
|
cd occlum_context
|
|
|
|
occlum init
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "occlum init failed"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p image/etc
|
|
cp /etc/resolv.conf image/etc
|
|
cp ../greeter_client image/bin
|
|
cp $INSTALL_DIR/lib/libprotobuf.so.3.10.0.0 image/lib
|
|
cp $INSTALL_DIR/lib/libcares.so.2 image/lib
|
|
cp $INSTALL_DIR/lib/libz.so.1 image/lib
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "libraries copied failed"
|
|
exit 1
|
|
fi
|
|
|
|
occlum build
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "occlum build failed"
|
|
exit 1
|
|
fi
|
|
|
|
occlum run /bin/greeter_client
|