From 89c292e2df3712818bfc6e4bfe2f904f02d74851 Mon Sep 17 00:00:00 2001 From: "Hui, Chunyang" Date: Tue, 18 Aug 2020 16:23:32 +0000 Subject: [PATCH] Fix some dependency errors when running on CentOS 8 --- tools/installer/README.md | 5 +++-- tools/installer/rpm/occlum.spec | 2 +- .../rpm/toolchains/gcc/occlum-toolchains-gcc.spec | 12 +++++------- tools/toolchains/gcc/build.sh | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/installer/README.md b/tools/installer/README.md index a1d8fd81..ef462d36 100644 --- a/tools/installer/README.md +++ b/tools/installer/README.md @@ -4,7 +4,7 @@ ### How to Build -To build RPM packages, a docker container with Occlum CentOS image is needed. Execute below commands under the occlum directory: +To build RPM packages, a docker container with Occlum CentOS image (based on CentOS 8.1) is needed. Execute below commands under the occlum directory: ``` cd tools/installer/rpm make @@ -59,5 +59,6 @@ source /etc/profile Finally, you are good to go! -### Build DEB Installer + +## DEB Installer TBD diff --git a/tools/installer/rpm/occlum.spec b/tools/installer/rpm/occlum.spec index 301d4f8d..10444570 100644 --- a/tools/installer/rpm/occlum.spec +++ b/tools/installer/rpm/occlum.spec @@ -25,7 +25,7 @@ BuildRequires: cmake BuildRequires: libtool BuildRequires: ocaml BuildRequires: ocaml-ocamlbuild -BuildRequires: python +BuildRequires: python2 BuildRequires: openssl-devel BuildRequires: libcurl-devel BuildRequires: git diff --git a/tools/installer/rpm/toolchains/gcc/occlum-toolchains-gcc.spec b/tools/installer/rpm/toolchains/gcc/occlum-toolchains-gcc.spec index d5b174e6..10342d42 100644 --- a/tools/installer/rpm/toolchains/gcc/occlum-toolchains-gcc.spec +++ b/tools/installer/rpm/toolchains/gcc/occlum-toolchains-gcc.spec @@ -16,7 +16,7 @@ Group: Development/Libraries License: BSD License URL: https://github.com/occlum/occlum Source0: https://github.com/occlum/occlum/archive/%{_musl_version}.tar.gz -Source1: https://github.com/richfelker/musl-cross-make/archive/v0.9.9.tar.gz +Source1: https://github.com/occlum/musl-cross-make/archive/0.9.9.hotfix.tar.gz Source2: https://ftp.gnu.org/pub/gnu/gcc/gcc-%{GCC_VER}/gcc-%{GCC_VER}.tar.xz Source3: config.sub Source4: https://ftp.gnu.org/pub/gnu/binutils/binutils-2.33.1.tar.xz @@ -33,7 +33,6 @@ Patch0: musl-cross-make-disable-download.patch ExclusiveArch: x86_64 BuildRequires: git -BuildRequires: devtoolset-9-gcc-c++ %description Occlum toolchains gcc @@ -43,9 +42,9 @@ Occlum toolchains gcc %setup -q -T -D -a 1 # This patch replaces syscall instruction with libc's syscall wrapper -cp occlum-%{version}/tools/toolchains/gcc/0014-libgomp-*.diff musl-cross-make-0.9.9/patches/gcc-%{GCC_VER}/ +cp occlum-%{version}/tools/toolchains/gcc/0014-libgomp-*.diff musl-cross-make-0.9.9.hotfix/patches/gcc-%{GCC_VER}/ -pushd musl-cross-make-0.9.9 +pushd musl-cross-make-0.9.9.hotfix mkdir -p sources/gcc-%{GCC_VER}.tar.xz.tmp && cp %{SOURCE2} sources/gcc-%{GCC_VER}.tar.xz.tmp mkdir -p sources/config.sub.tmp && cp %{SOURCE3} sources/config.sub.tmp mkdir -p sources/binutils-2.33.1.tar.xz.tmp && cp %{SOURCE4} sources/binutils-2.33.1.tar.xz.tmp @@ -58,8 +57,7 @@ tar xf %{SOURCE9} popd %build -source /opt/rh/devtoolset-9/enable -cd musl-cross-make-0.9.9 +cd musl-cross-make-0.9.9.hotfix cat > config.mak <