[v4] travis: enable compilation for ppc64le

Submitted by Andrei Vagin on April 27, 2016, 5:03 a.m.

Details

Message ID 1461733386-2580-1-git-send-email-avagin@openvz.org
State Rejected
Series "travis: enable compilation for ppc64le"
Headers show

Commit Message

Andrei Vagin April 27, 2016, 5:03 a.m.
From: Andrew Vagin <avagin@virtuozzo.com>

qemu-static from ubuntu/xenial contains a required fix
and now we can execute compilation for ppc64le in travis.

v2: rebase on criu-dev
v3: set QEMU_CPU=POWER8 to avoid segfaults of qemu-ppc64le-static

> By default, both qemu and gcc5 produce code on ppc64el which will run on
> POWER7 platform.  However, in debian gcc build instruction, gcc is explicitly
> built to produce code for POWER8 platform, which, obviously has additional
> instructions.

v4: use ubuntu:trusty. xenial and wily has a bug:
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
---
 .travis.yml                          | 4 +---
 scripts/build/Dockerfile.ppc64le.hdr | 3 ++-
 scripts/build/Dockerfile.tmpl        | 4 +++-
 scripts/build/extract-deb-pkg        | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/.travis.yml b/.travis.yml
index 121a7c7..c4bae0a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,9 +4,7 @@  dist: trusty
 services:
   - docker
 env:
-  - TR_ARCH=x86_64
-  - TR_ARCH=armv7hf
-  - TR_ARCH=aarch64
+  - TR_ARCH=ppc64le
 script:
   - sudo make -C scripts/build $TR_ARCH
   - sudo ./scripts/travis-tests $TR_ARCH
diff --git a/scripts/build/Dockerfile.ppc64le.hdr b/scripts/build/Dockerfile.ppc64le.hdr
index 7976d4e..6c4b22e 100644
--- a/scripts/build/Dockerfile.ppc64le.hdr
+++ b/scripts/build/Dockerfile.ppc64le.hdr
@@ -1,3 +1,4 @@ 
-FROM ppc64le/ubuntu
+FROM ppc64le/ubuntu:trusty
 
+ENV QEMU_CPU POWER8
 COPY scripts/build/qemu-user-static/usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le-static
diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl
index ca890d1..2769958 100644
--- a/scripts/build/Dockerfile.tmpl
+++ b/scripts/build/Dockerfile.tmpl
@@ -1,6 +1,8 @@ 
+RUN apt-get clean
+
 RUN apt-get update
 
-RUN apt-get update && apt-get install -y \
+RUN apt-get install -y \
                 build-essential \
                 protobuf-c-compiler \
                 libprotobuf-c0-dev \
diff --git a/scripts/build/extract-deb-pkg b/scripts/build/extract-deb-pkg
index 8ccec37..da527e8 100755
--- a/scripts/build/extract-deb-pkg
+++ b/scripts/build/extract-deb-pkg
@@ -3,8 +3,8 @@  set -e
 test -d $1 && exit
 mkdir $1
 cd $1
-pkg=`curl http://mirror.yandex.ru/debian/dists/jessie/main/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
-wget "http://mirror.yandex.ru/debian/$pkg"
+pkg=`curl http://mirror.yandex.ru/ubuntu/ubuntu/dists/xenial/universe/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
+wget "http://mirror.yandex.ru/ubuntu/$pkg"
 pkg=`basename $pkg`
 ar vx $pkg
 tar -xJvf data.tar.xz

Comments

Dmitry Safonov April 27, 2016, 10:23 a.m.
On 04/27/2016 08:03 AM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin@virtuozzo.com>
>
> qemu-static from ubuntu/xenial contains a required fix
> and now we can execute compilation for ppc64le in travis.
>
> v2: rebase on criu-dev
> v3: set QEMU_CPU=POWER8 to avoid segfaults of qemu-ppc64le-static
>
>> By default, both qemu and gcc5 produce code on ppc64el which will run on
>> POWER7 platform.  However, in debian gcc build instruction, gcc is explicitly
>> built to produce code for POWER8 platform, which, obviously has additional
>> instructions.
> v4: use ubuntu:trusty. xenial and wily has a bug:
> Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
> /sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
> /sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
>
> Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
> ---
>   .travis.yml                          | 4 +---
>   scripts/build/Dockerfile.ppc64le.hdr | 3 ++-
>   scripts/build/Dockerfile.tmpl        | 4 +++-
>   scripts/build/extract-deb-pkg        | 4 ++--
>   4 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/.travis.yml b/.travis.yml
> index 121a7c7..c4bae0a 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -4,9 +4,7 @@ dist: trusty
>   services:
>     - docker
>   env:
> -  - TR_ARCH=x86_64
> -  - TR_ARCH=armv7hf
> -  - TR_ARCH=aarch64
> +  - TR_ARCH=ppc64le

I'm not sure, I follow here - is this a test chunk that made
a way to the patch? (with deletion of x86/arm/arm64)

>   script:
>     - sudo make -C scripts/build $TR_ARCH
>     - sudo ./scripts/travis-tests $TR_ARCH
> diff --git a/scripts/build/Dockerfile.ppc64le.hdr b/scripts/build/Dockerfile.ppc64le.hdr
> index 7976d4e..6c4b22e 100644
> --- a/scripts/build/Dockerfile.ppc64le.hdr
> +++ b/scripts/build/Dockerfile.ppc64le.hdr
> @@ -1,3 +1,4 @@
> -FROM ppc64le/ubuntu
> +FROM ppc64le/ubuntu:trusty
>   
> +ENV QEMU_CPU POWER8
>   COPY scripts/build/qemu-user-static/usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le-static
> diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl
> index ca890d1..2769958 100644
> --- a/scripts/build/Dockerfile.tmpl
> +++ b/scripts/build/Dockerfile.tmpl
> @@ -1,6 +1,8 @@
> +RUN apt-get clean
> +
>   RUN apt-get update
>   
> -RUN apt-get update && apt-get install -y \
> +RUN apt-get install -y \
>                   build-essential \
>                   protobuf-c-compiler \
>                   libprotobuf-c0-dev \
> diff --git a/scripts/build/extract-deb-pkg b/scripts/build/extract-deb-pkg
> index 8ccec37..da527e8 100755
> --- a/scripts/build/extract-deb-pkg
> +++ b/scripts/build/extract-deb-pkg
> @@ -3,8 +3,8 @@ set -e
>   test -d $1 && exit
>   mkdir $1
>   cd $1
> -pkg=`curl http://mirror.yandex.ru/debian/dists/jessie/main/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
> -wget "http://mirror.yandex.ru/debian/$pkg"
> +pkg=`curl http://mirror.yandex.ru/ubuntu/ubuntu/dists/xenial/universe/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
> +wget "http://mirror.yandex.ru/ubuntu/$pkg"
>   pkg=`basename $pkg`
>   ar vx $pkg
>   tar -xJvf data.tar.xz
Andrey Vagin April 27, 2016, 6:26 p.m.
On Wed, Apr 27, 2016 at 01:23:24PM +0300, Dmitry Safonov wrote:
> On 04/27/2016 08:03 AM, Andrey Vagin wrote:
> >From: Andrew Vagin <avagin@virtuozzo.com>
> >
> >qemu-static from ubuntu/xenial contains a required fix
> >and now we can execute compilation for ppc64le in travis.
> >
> >v2: rebase on criu-dev
> >v3: set QEMU_CPU=POWER8 to avoid segfaults of qemu-ppc64le-static
> >
> >>By default, both qemu and gcc5 produce code on ppc64el which will run on
> >>POWER7 platform.  However, in debian gcc build instruction, gcc is explicitly
> >>built to produce code for POWER8 platform, which, obviously has additional
> >>instructions.
> >v4: use ubuntu:trusty. xenial and wily has a bug:
> >Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
> >/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
> >/sbin/ldconfig.real: 5: /sbin/ldconfig.real: Syntax error: ")" unexpected
> >
> >Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
> >---
> >  .travis.yml                          | 4 +---
> >  scripts/build/Dockerfile.ppc64le.hdr | 3 ++-
> >  scripts/build/Dockerfile.tmpl        | 4 +++-
> >  scripts/build/extract-deb-pkg        | 4 ++--
> >  4 files changed, 8 insertions(+), 7 deletions(-)
> >
> >diff --git a/.travis.yml b/.travis.yml
> >index 121a7c7..c4bae0a 100644
> >--- a/.travis.yml
> >+++ b/.travis.yml
> >@@ -4,9 +4,7 @@ dist: trusty
> >  services:
> >    - docker
> >  env:
> >-  - TR_ARCH=x86_64
> >-  - TR_ARCH=armv7hf
> >-  - TR_ARCH=aarch64
> >+  - TR_ARCH=ppc64le
> 
> I'm not sure, I follow here - is this a test chunk that made
> a way to the patch? (with deletion of x86/arm/arm64)

It was commited by mistake. Thanks!
> 
> >  script:
> >    - sudo make -C scripts/build $TR_ARCH
> >    - sudo ./scripts/travis-tests $TR_ARCH
> >diff --git a/scripts/build/Dockerfile.ppc64le.hdr b/scripts/build/Dockerfile.ppc64le.hdr
> >index 7976d4e..6c4b22e 100644
> >--- a/scripts/build/Dockerfile.ppc64le.hdr
> >+++ b/scripts/build/Dockerfile.ppc64le.hdr
> >@@ -1,3 +1,4 @@
> >-FROM ppc64le/ubuntu
> >+FROM ppc64le/ubuntu:trusty
> >+ENV QEMU_CPU POWER8
> >  COPY scripts/build/qemu-user-static/usr/bin/qemu-ppc64le-static /usr/bin/qemu-ppc64le-static
> >diff --git a/scripts/build/Dockerfile.tmpl b/scripts/build/Dockerfile.tmpl
> >index ca890d1..2769958 100644
> >--- a/scripts/build/Dockerfile.tmpl
> >+++ b/scripts/build/Dockerfile.tmpl
> >@@ -1,6 +1,8 @@
> >+RUN apt-get clean
> >+
> >  RUN apt-get update
> >-RUN apt-get update && apt-get install -y \
> >+RUN apt-get install -y \
> >                  build-essential \
> >                  protobuf-c-compiler \
> >                  libprotobuf-c0-dev \
> >diff --git a/scripts/build/extract-deb-pkg b/scripts/build/extract-deb-pkg
> >index 8ccec37..da527e8 100755
> >--- a/scripts/build/extract-deb-pkg
> >+++ b/scripts/build/extract-deb-pkg
> >@@ -3,8 +3,8 @@ set -e
> >  test -d $1 && exit
> >  mkdir $1
> >  cd $1
> >-pkg=`curl http://mirror.yandex.ru/debian/dists/jessie/main/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
> >-wget "http://mirror.yandex.ru/debian/$pkg"
> >+pkg=`curl http://mirror.yandex.ru/ubuntu/ubuntu/dists/xenial/universe/binary-amd64/Packages.gz | zcat | grep "Filename.*$1" | awk '{ print $2 }'`
> >+wget "http://mirror.yandex.ru/ubuntu/$pkg"
> >  pkg=`basename $pkg`
> >  ar vx $pkg
> >  tar -xJvf data.tar.xz
> 
> 
> -- 
> Regards,
> Dmitry Safonov
>