Skip to contentSkip to conversation

docker/dockerfiles/debian-s390-cross: include clang

PATCH In review Alex Bennée 3 participants 6 messages Mar 6, 2017 – Mar 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docker/dockerfiles/debian-s390-cross: include clang

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +2 -2
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 30 lines · Alex Bennée

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +2 -2
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
Signature · 1 line
2.11.0

Looks sane. Is this for 2.9?

Fam

#2 lore raw

Hi Alex, Fam.

I tested this way but got an error:

qemu (docker_alex)$ make docker-test-clang@debian-s390x-cross
BUILD debian-s390x-cross
make[1]: Entering directory 'qemu'
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
ARCHIVE pixman.tgz
COPY RUNNER

    RUN test-clang in qemu:debian-s390x-cross

Prerequisite 'clang' not present, skip
make[1]: Leaving directory 'qemu'

am I missing something? like a FEATURES/clang.tgz?

qemu (docker_alex)$ docker run qemu:debian-s390x-cross which clang /usr/bin/clang

Quoted 20 lines · Fam Zheng
Quoted 19 lines · Alex Bennée

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +0 -0
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
Quoted 4 lines

tests/docker/dockerfiles/debian-s390x-cross.docker RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list · line 16

Quoted 4 lines
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -2
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy

^ good!

Quoted 12 lines
Quoted 7 lines
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -1
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
--

2.11.0

Looks sane. Is this for 2.9?

Fam

#3 lore raw
Quoted 15 lines · Philippe Mathieu-Daudé

Hi Alex, Fam.

I tested this way but got an error:

qemu (docker_alex)$ make docker-test-clang@debian-s390x-cross
BUILD debian-s390x-cross
make[1]: Entering directory 'qemu'
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
ARCHIVE pixman.tgz
COPY RUNNER

    RUN test-clang in qemu:debian-s390x-cross

Prerequisite 'clang' not present, skip
make[1]: Leaving directory 'qemu'

Quoted 9 lines

am I missing something? like a FEATURES/clang.tgz?

qemu (docker_alex)$ docker run qemu:debian-s390x-cross which clang /usr/bin/clang

Quoted 3 lines · Fam Zheng
Quoted 2 lines · Alex Bennée

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross

The clang is only to keep shippable happy. It scans for compilers despite the fact our actual build is using the cross-compiler. AFAIK Debian don't package cross-built versions of clang. It would be nice if they did by currently all our cross-build containers use GCC.

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines

builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +0 -0
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
Quoted 19 lines
Quoted 4 lines

tests/docker/dockerfiles/debian-s390x-cross.docker RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list · line 16

Quoted 4 lines
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -2
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy

^ good!

Quoted 12 lines
Quoted 7 lines
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -1
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
--

2.11.0

Looks sane. Is this for 2.9?

Fam

--
Alex Bennée

#4 lore raw
In reply to Fam Zheng
Quoted 28 lines · Fam Zheng
Quoted 27 lines · Alex Bennée

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +2 -2
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
Quoted 5 lines
Quoted 3 lines

--
2.11.0

Looks sane. Is this for 2.9?

Yes please. The s390x cross build on shippable is currently broken without it although we can use the container locally.

--
Alex Bennée

#5 lore raw
Quoted 31 lines · Alex Bennée
Quoted 28 lines · Fam Zheng
Quoted 27 lines · Alex Bennée

It's a silly little limitation on Shippable that is looks for clang in the container even though we won't use it. The arm/aarch64 cross builds inherit this from debian.docker but as we needed to use debian-testing for this we add it here. We also collapse the update step into one RUN line to remove and intermediate layer of the docker build.

---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-s390x-cross.docker +2 -2
index bbb21ed088..3a687feda0 100644
@@ -13,8 +13,8 @@ RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
 RUN dpkg --add-architecture s390x
 
 # Grab the updated list of packages
-RUN apt update
-RUN apt dist-upgrade -yy
+RUN apt update && apt dist-upgrade -yy
+RUN apt install -yy build-essential clang
 RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
 RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
 
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

--
2.11.0

Looks sane. Is this for 2.9?

Yes please. The s390x cross build on shippable is currently broken without it although we can use the container locally.

OK, I'll send a pull request soon.

Fam