You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by di...@apache.org on 2020/03/23 22:13:55 UTC

[incubator-teaclave-sgx-sdk] branch v1.1.1-testing updated: make binutils compatible with yum

This is an automated email from the ASF dual-hosted git repository.

dingyu pushed a commit to branch v1.1.1-testing
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v1.1.1-testing by this push:
     new 6d63c38  make binutils compatible with yum
6d63c38 is described below

commit 6d63c38afe83464ac8f34511992bff024b44bc0a
Author: Yu Ding <di...@gmail.com>
AuthorDate: Mon Mar 23 15:13:43 2020 -0700

    make binutils compatible with yum
---
 dockerfile/02_binutils.sh                             |  2 +-
 dockerfile/Dockerfile.1604.nightly                    | 19 +++++++++++++++++--
 dockerfile/Dockerfile.1804.nightly                    |  2 ++
 ...entos7.nightly => Dockerfile.centos7.full.nightly} | 17 +++++++++++------
 dockerfile/Dockerfile.centos7.nightly                 | 18 +++++++++++++-----
 dockerfile/Dockerfile.fedora27.nightly                |  4 +++-
 ...file.1604.nightly => Dockerfile.full.1604.nightly} |  2 ++
 7 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/dockerfile/02_binutils.sh b/dockerfile/02_binutils.sh
index 80d0f63..bbc910f 100644
--- a/dockerfile/02_binutils.sh
+++ b/dockerfile/02_binutils.sh
@@ -11,7 +11,7 @@ mkdir build && \
 cd build && \
 ../configure --prefix=/usr --enable-gold --enable-ld=default --enable-plugins --enable-shared --disable-werror --enable-64-bit-bfd --with-system-zlib && \
 make -j "$(nproc)" && \
-LD_LIBRARY_PATH=/usr/lib make install && \
+LD_LIBRARY_PATH=$(BINUTILS_PREFIX) make install && \
 cd /root && \
 rm -rf binutils-gdb && \
 echo 'export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH' >> /root/.bashrc && \
diff --git a/dockerfile/Dockerfile.1604.nightly b/dockerfile/Dockerfile.1604.nightly
index b21f1a9..2170b1a 100644
--- a/dockerfile/Dockerfile.1604.nightly
+++ b/dockerfile/Dockerfile.1604.nightly
@@ -3,8 +3,23 @@ FROM ubuntu:16.04
 RUN apt-get update && apt-get install -y autoconf automake bison build-essential ca-certificates cmake curl dpkg-dev expect flex gdb git git-core gnupg kmod libboost-system-dev libboost-thread-dev libcurl4-openssl-dev libiptcdata0-dev libjsoncpp-dev liblog4cpp5-dev libprotobuf-c0-dev libprotobuf-dev libssl-dev libtool libxml2-dev ocaml pkg-config protobuf-compiler python sudo texinfo uuid-dev vim wget zlib1g-dev && \
     rm -rf /var/lib/apt/lists/*
 
-ADD 01_gcc_8.sh /root
-RUN bash /root/01_gcc_8.sh
+# Conditionally trust ppa:ubuntu-toolchain-r
+# Use this on your own risk
+RUN apt-get update && \
+    apt-get install build-essential software-properties-common -y && \
+    add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
+    apt-get update && \
+    apt-get install gcc-snapshot -y && \
+    apt-get update && \
+    apt-get install gcc-8 g++-8 -y && \
+    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8 && \
+    update-alternatives --config gcc && \
+    rm -rf /var/lib/apt/lists/*
+
+#ADD 01_gcc_8.sh /root
+#RUN bash /root/01_gcc_8.sh
+
+ENV BINUTILS_PREFIX=/usr/lib
 
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
diff --git a/dockerfile/Dockerfile.1804.nightly b/dockerfile/Dockerfile.1804.nightly
index 95d92be..54807d8 100644
--- a/dockerfile/Dockerfile.1804.nightly
+++ b/dockerfile/Dockerfile.1804.nightly
@@ -9,6 +9,8 @@ RUN apt update && apt install -y autoconf automake bison build-essential cmake c
 #ADD 01_gcc_8.sh /root
 #RUN bash /root/01_gcc_8.sh
 
+ENV BINUTILS_PREFIX=/usr/lib
+
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
 
diff --git a/dockerfile/Dockerfile.centos7.nightly b/dockerfile/Dockerfile.centos7.full.nightly
similarity index 59%
copy from dockerfile/Dockerfile.centos7.nightly
copy to dockerfile/Dockerfile.centos7.full.nightly
index 1548d70..c5528e6 100644
--- a/dockerfile/Dockerfile.centos7.nightly
+++ b/dockerfile/Dockerfile.centos7.full.nightly
@@ -1,15 +1,20 @@
 FROM centos:7
 
-RUN yum-builddep gcc binutils -y && \
-    yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake && \
-    yum groupinstall -y "Development Tools"
+#RUN yum-builddep gcc binutils -y && \
+#    yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake && \
+#    yum groupinstall -y "Development Tools"
 
-ADD 01_gcc_8.sh /root
-RUN bash /root/01_gcc_8.sh
+#ADD 01_gcc_8.sh /root
+#RUN bash /root/01_gcc_8.sh
+
+RUN yum install -y centos-release-scl && \
+    yum install devtoolset-8
 
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
 
+ENV LD_LIBRARY_PATH=/usr/lib
+
 ADD 03_sdk.sh /root
 RUN bash /root/03_sdk.sh
 
@@ -17,7 +22,7 @@ RUN bash /root/03_sdk.sh
 
 ENV PSW_REPO=https://download.01.org/intel-sgx/sgx-linux/2.9/distro/centos7.5-server/sgx_rpm_local_repo.tgz
 
-RUN wget --output /root/repo.tgz $PSW_REPO && \
+RUN curl --output /root/repo.tgz $PSW_REPO && \
     cd /root && \
     tar xzf repo.tgz && \
     cd sgx_rpm_local_repo && \
diff --git a/dockerfile/Dockerfile.centos7.nightly b/dockerfile/Dockerfile.centos7.nightly
index 1548d70..900dfd5 100644
--- a/dockerfile/Dockerfile.centos7.nightly
+++ b/dockerfile/Dockerfile.centos7.nightly
@@ -2,22 +2,30 @@ FROM centos:7
 
 RUN yum-builddep gcc binutils -y && \
     yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake && \
-    yum groupinstall -y "Development Tools"
+#    yum groupinstall -y "Development Tools"
 
-ADD 01_gcc_8.sh /root
-RUN bash /root/01_gcc_8.sh
+#ADD 01_gcc_8.sh /root
+#RUN bash /root/01_gcc_8.sh
+
+ENV BINUTILS_PREFIX=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8
+
+RUN yum install -y centos-release-scl && \
+    yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ git make zlib-devel flex bison texinfo wget cmake && \
+    update-alternatives --install /usr/bin/gcc gcc /opt/rh/devtoolset-8/root/usr/bin/gcc 60 --slave /usr/bin/g++ g++ /opt/rh/devtoolset-8/root/usr/bin/g++
 
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
 
+ENV LD_LIBRARY_PATH=/usr/lib
+
 ADD 03_sdk.sh /root
-RUN bash /root/03_sdk.sh
+#RUN bash /root/03_sdk.sh
 
 # Sixth, PSW
 
 ENV PSW_REPO=https://download.01.org/intel-sgx/sgx-linux/2.9/distro/centos7.5-server/sgx_rpm_local_repo.tgz
 
-RUN wget --output /root/repo.tgz $PSW_REPO && \
+RUN curl --output /root/repo.tgz $PSW_REPO && \
     cd /root && \
     tar xzf repo.tgz && \
     cd sgx_rpm_local_repo && \
diff --git a/dockerfile/Dockerfile.fedora27.nightly b/dockerfile/Dockerfile.fedora27.nightly
index 8a9daa6..2054a98 100644
--- a/dockerfile/Dockerfile.fedora27.nightly
+++ b/dockerfile/Dockerfile.fedora27.nightly
@@ -1,13 +1,15 @@
 FROM fedora:27
 
 RUN yum install yum-utils -y && \
-    yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake && \
+    yum install -y bzip2 ocaml ocaml-ocamlbuild wget python2 openssl-devel git protobuf-devel cmake ncurses-devel && \
     yum-builddep gcc binutils -y && \
     yum groupinstall -y "Development Tools"
 
 ADD 01_gcc_8.sh /root
 RUN bash /root/01_gcc_8.sh
 
+ENV BINUTILS_PREFIX=/usr/lib
+
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
 
diff --git a/dockerfile/Dockerfile.1604.nightly b/dockerfile/Dockerfile.full.1604.nightly
similarity index 96%
copy from dockerfile/Dockerfile.1604.nightly
copy to dockerfile/Dockerfile.full.1604.nightly
index b21f1a9..121b0a4 100644
--- a/dockerfile/Dockerfile.1604.nightly
+++ b/dockerfile/Dockerfile.full.1604.nightly
@@ -6,6 +6,8 @@ RUN apt-get update && apt-get install -y autoconf automake bison build-essential
 ADD 01_gcc_8.sh /root
 RUN bash /root/01_gcc_8.sh
 
+ENV BINUTILS_PREFIX=/usr/lib
+
 ADD 02_binutils.sh /root
 RUN bash /root/02_binutils.sh
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org