1
- FROM centos:5
1
+ FROM centos:6
2
2
3
3
WORKDIR /build
4
4
5
- # Centos 5 is EOL and is no longer available from the usual mirrors, so switch
6
- # to http://vault.centos.org/
7
- RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
8
- RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
9
- RUN sed -i 's|#\( baseurl.*\) mirror.centos.org/centos/$releasever|\1 vault.centos.org/5.11 |' /etc/yum.repos.d/*.repo
5
+ # Centos 6 is near EOL and will no longer be available from the usual mirrors,
6
+ # so we'll need to switch to http://vault.centos.org/
7
+ # RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
8
+ # RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
9
+ # RUN sed -i 's|#\(baseurl.*\)mirror.centos.org/centos/$releasever|\1vault.centos.org/6.10 |' /etc/yum.repos.d/*.repo
10
10
11
+ RUN yum install -y epel-release
11
12
RUN yum upgrade -y && yum install -y \
12
- curl \
13
+ autoconf \
13
14
bzip2 \
15
+ curl \
16
+ file \
14
17
gcc \
15
18
gcc-c++ \
19
+ gettext \
20
+ git \
21
+ glibc-devel.i686 \
22
+ glibc-devel.x86_64 \
23
+ libstdc++-devel.i686 \
24
+ libstdc++-devel.x86_64 \
16
25
make \
17
- glibc-devel \
26
+ openssl-devel.i686 \
27
+ openssl-devel.x86_64 \
18
28
perl \
19
- zlib-devel \
20
- file \
21
- xz \
22
- which \
23
29
pkgconfig \
30
+ python34 \
24
31
wget \
25
- autoconf \
26
- gettext
32
+ which \
33
+ xz \
34
+ zlib-devel.i686 \
35
+ zlib-devel.x86_64
27
36
28
37
ENV PATH=/rustroot/bin:$PATH
29
38
ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
30
39
ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
31
40
WORKDIR /tmp
32
41
COPY dist-x86_64-linux/shared.sh /tmp/
33
42
34
- # We need a build of openssl which supports SNI to download artifacts from
35
- # static.rust-lang.org. This'll be used to link into libcurl below (and used
36
- # later as well), so build a copy of OpenSSL with dynamic libraries into our
37
- # generic root.
38
- COPY dist-x86_64-linux/build-openssl.sh /tmp/
39
- RUN ./build-openssl.sh
40
-
41
- # The `curl` binary on CentOS doesn't support SNI which is needed for fetching
42
- # some https urls we have, so install a new version of libcurl + curl which is
43
- # using the openssl we just built previously.
44
- #
45
- # Note that we also disable a bunch of optional features of curl that we don't
46
- # really need.
47
- COPY dist-x86_64-linux/build-curl.sh /tmp/
48
- RUN ./build-curl.sh
49
-
50
43
# binutils < 2.22 has a bug where the 32-bit executables it generates
51
44
# immediately segfault in Rust, so we need to install our own binutils.
52
45
#
53
46
# See https://github.com/rust-lang/rust/issues/20440 for more info
54
47
COPY dist-x86_64-linux/build-binutils.sh /tmp/
55
48
RUN ./build-binutils.sh
56
49
57
- # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
58
- # only has 2.6.4, so build our own
59
- COPY dist-x86_64-linux/build-cmake.sh /tmp/
60
- RUN ./build-cmake.sh
61
-
62
- # Build a version of gcc capable of building LLVM 6
50
+ # Need a newer version of gcc than centos has to compile LLVM nowadays
63
51
COPY dist-x86_64-linux/build-gcc.sh /tmp/
64
52
RUN ./build-gcc.sh
65
53
66
- # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
67
- COPY dist-x86_64-linux/build-python.sh /tmp/
68
- RUN ./build-python.sh
54
+ # LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4.
55
+ # CentOS 6 only has cmake-2.8.12, or cmake3-3.6.1 in EPEL, so build our own.
56
+ COPY dist-x86_64-linux/build-cmake.sh /tmp/
57
+ RUN ./build-cmake.sh
69
58
70
- # Now build LLVM+Clang 7 , afterwards configuring further compilations to use the
59
+ # Now build LLVM+Clang, afterwards configuring further compilations to use the
71
60
# clang/clang++ compilers.
72
- COPY dist-x86_64-linux/build-clang.sh dist-x86_64-linux/llvm-project-centos.patch /tmp/
61
+ COPY dist-x86_64-linux/build-clang.sh /tmp/
73
62
RUN ./build-clang.sh
74
63
ENV CC=clang CXX=clang++
75
64
76
- # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
77
- # cloning, so download and build it here.
78
- COPY dist-x86_64-linux/build-git.sh /tmp/
79
- RUN ./build-git.sh
80
-
81
65
# for sanitizers, we need kernel headers files newer than the ones CentOS ships
82
66
# with so we install newer ones here
83
67
COPY dist-x86_64-linux/build-headers.sh /tmp/
84
68
RUN ./build-headers.sh
85
69
86
- # OpenSSL requires a more recent version of perl
87
- # with so we install newer ones here
88
- COPY dist-x86_64-linux/build-perl.sh /tmp/
89
- RUN ./build-perl.sh
90
-
91
70
COPY scripts/sccache.sh /scripts/
92
71
RUN sh /scripts/sccache.sh
93
72
@@ -103,7 +82,7 @@ ENV RUST_CONFIGURE_ARGS \
103
82
--set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
104
83
--set llvm.thin-lto=true \
105
84
--set rust.jemalloc
106
- ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
85
+ ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
107
86
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
108
87
109
88
# This is the only builder which will create source tarballs
0 commit comments