From 71abc4dfdc4d8ba8edeb57d2cfbe55d8058c2474 Mon Sep 17 00:00:00 2001 From: Qing Date: Tue, 11 Dec 2018 16:41:47 -0800 Subject: [PATCH 1/5] Basic configuration to do static-linking --- ci/publish/ubuntu_build_base.sh | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 ci/publish/ubuntu_build_base.sh diff --git a/ci/publish/ubuntu_build_base.sh b/ci/publish/ubuntu_build_base.sh new file mode 100644 index 000000000000..556e5c4b8d4e --- /dev/null +++ b/ci/publish/ubuntu_build_base.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Build on Ubuntu 14.04 LTS for LINUX CPU/GPU +apt-get update +apt-get install -y software-properties-common +add-apt-repository ppa:ubuntu-toolchain-r/test -y +add-apt-repository ppa:openjdk-r/ppa -y # Java lib +apt-get update +apt-get install build-essential -y +apt-get install -y git \ + cmake3 \ + libcurl4-openssl-dev \ + unzip \ + gcc-4.8 \ + g++-4.8 \ + gfortran \ + gfortran-4.8 \ + binutils \ + nasm \ + libtool \ + pandoc \ + python3-pip \ + automake \ + pkg-config +update-alternatives \ + --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 +update-alternatives --config gcc +# Java specific +apt-get install -y openjdk-8-jdk +curl -o apache-maven-3.3.9-bin.tar.gz http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz +tar xzf apache-maven-3.3.9-bin.tar.gz +mkdir /usr/local/maven +mv apache-maven-3.3.9/ /usr/local/maven/ +update-alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 +update-ca-certificates -f \ No newline at end of file From 410a7218d03208ce33917e054553ecf415f59a81 Mon Sep 17 00:00:00 2001 From: Qing Date: Wed, 12 Dec 2018 14:10:47 -0800 Subject: [PATCH 2/5] update build script and place it in the install part --- .../install/ubuntu_publish.sh} | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) rename ci/{publish/ubuntu_build_base.sh => docker/install/ubuntu_publish.sh} (67%) diff --git a/ci/publish/ubuntu_build_base.sh b/ci/docker/install/ubuntu_publish.sh similarity index 67% rename from ci/publish/ubuntu_build_base.sh rename to ci/docker/install/ubuntu_publish.sh index 556e5c4b8d4e..000b14a8475c 100644 --- a/ci/publish/ubuntu_build_base.sh +++ b/ci/docker/install/ubuntu_publish.sh @@ -22,10 +22,11 @@ apt-get update apt-get install -y software-properties-common add-apt-repository ppa:ubuntu-toolchain-r/test -y add-apt-repository ppa:openjdk-r/ppa -y # Java lib +add-apt-repository ppa:andrei-pozolotin/maven3 -y # Maven lib apt-get update -apt-get install build-essential -y +curl -sSL https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz | sudo tar -xzC /opt +sudo ln -s /opt/cmake-3.5.2-Linux-x86_64/bin/* /usr/local/bin apt-get install -y git \ - cmake3 \ libcurl4-openssl-dev \ unzip \ gcc-4.8 \ @@ -38,16 +39,7 @@ apt-get install -y git \ pandoc \ python3-pip \ automake \ - pkg-config -update-alternatives \ - --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 \ - --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 -update-alternatives --config gcc -# Java specific -apt-get install -y openjdk-8-jdk -curl -o apache-maven-3.3.9-bin.tar.gz http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz -tar xzf apache-maven-3.3.9-bin.tar.gz -mkdir /usr/local/maven -mv apache-maven-3.3.9/ /usr/local/maven/ -update-alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 -update-ca-certificates -f \ No newline at end of file + pkg-config \ + openjdk-8-jdk +apt-get install -y --no-install-recommends maven3 +update-ca-certificates -f From dec9cca61389c6965c2051c1046fffafd09014f4 Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 13 Dec 2018 12:31:00 -0800 Subject: [PATCH 3/5] clean up the code further --- ci/docker/install/ubuntu_publish.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/docker/install/ubuntu_publish.sh b/ci/docker/install/ubuntu_publish.sh index 000b14a8475c..babfa5a8799e 100644 --- a/ci/docker/install/ubuntu_publish.sh +++ b/ci/docker/install/ubuntu_publish.sh @@ -24,9 +24,8 @@ add-apt-repository ppa:ubuntu-toolchain-r/test -y add-apt-repository ppa:openjdk-r/ppa -y # Java lib add-apt-repository ppa:andrei-pozolotin/maven3 -y # Maven lib apt-get update -curl -sSL https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz | sudo tar -xzC /opt -sudo ln -s /opt/cmake-3.5.2-Linux-x86_64/bin/* /usr/local/bin apt-get install -y git \ + cmake3 \ libcurl4-openssl-dev \ unzip \ gcc-4.8 \ From 28ca63964e6a67390519b6cb8c7e44470f19b3fd Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 13 Dec 2018 14:19:33 -0800 Subject: [PATCH 4/5] revert maven into build-from-source --- ci/docker/install/ubuntu_publish.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/docker/install/ubuntu_publish.sh b/ci/docker/install/ubuntu_publish.sh index babfa5a8799e..8a03bc87d48e 100644 --- a/ci/docker/install/ubuntu_publish.sh +++ b/ci/docker/install/ubuntu_publish.sh @@ -22,7 +22,6 @@ apt-get update apt-get install -y software-properties-common add-apt-repository ppa:ubuntu-toolchain-r/test -y add-apt-repository ppa:openjdk-r/ppa -y # Java lib -add-apt-repository ppa:andrei-pozolotin/maven3 -y # Maven lib apt-get update apt-get install -y git \ cmake3 \ @@ -40,5 +39,9 @@ apt-get install -y git \ automake \ pkg-config \ openjdk-8-jdk -apt-get install -y --no-install-recommends maven3 +curl -o apache-maven-3.3.9-bin.tar.gz http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz +tar xzf apache-maven-3.3.9-bin.tar.gz +mkdir /usr/local/maven +mv apache-maven-3.3.9/ /usr/local/maven/ +update-alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 update-ca-certificates -f From f8058093d652ae827b2f6fb8ff12422632ebd59f Mon Sep 17 00:00:00 2001 From: Qing Date: Thu, 13 Dec 2018 14:32:21 -0800 Subject: [PATCH 5/5] add curl to deps --- ci/docker/install/ubuntu_publish.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/docker/install/ubuntu_publish.sh b/ci/docker/install/ubuntu_publish.sh index 8a03bc87d48e..bc3513dd13e5 100644 --- a/ci/docker/install/ubuntu_publish.sh +++ b/ci/docker/install/ubuntu_publish.sh @@ -34,6 +34,7 @@ apt-get install -y git \ binutils \ nasm \ libtool \ + curl \ pandoc \ python3-pip \ automake \