travis.yml: Add missing clang-10 package to the 'Clang (disable-tcg)' job
PATCH 1/2 travis.yml: Add missing clang-10 package to the 'Clang (disable-tcg)' job
Since commit 74a1b256d775("configure: Bump minimum Clang version to 10.0") qemu needs Clang version 10.0 as the minimum version to build qemu with Clang. However 'focal' ships by default with Clang version 7.0.0 which causes an error while executing the 'Clang (disable-tcg)' travis job of the form below:
<snip>
$clang --version
clang version 7.0.0 (tags/RELEASE_700/final)
<snip>
ERROR: You need at least GCC v7.4 or Clang v10.0 (or XCode Clang v12.0)
# QEMU configure log Fri 14 Apr 2023 03:48:22 PM UTC
# Configured with: '../configure' '--disable-docs' '--disable-tools' '--disable-containers' '--disable-tcg' '--enable-kvm' '--disable-tools' '--enable-fdt=system' '--host-cc=clang' '--cxx=clang++'
Fix this by adding 'clang-10' to the 'apt_packages' section of the "[s390x] Clang (disable-tcg)" job and updating the compiler to 'clang-10'.
--- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
.travis.yml +2 -1
@@ -243,7 +243,7 @@ jobs: - name: "[s390x] Clang (disable-tcg)" arch: s390x dist: focal - compiler: clang + compiler: clang-10 addons: apt_packages: - libaio-dev
@@ -269,6 +269,7 @@ jobs: - libvdeplug-dev - libvte-2.91-dev - ninja-build + - clang-10 env: - TEST_CMD="make check-unit" - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools
Signature · 1 line
2.39.2
PATCH 2/2 travis.yml: Add missing 'flex' package to 'GCC (user)' job
Since commit fd8171fe52b5e("target/hexagon: import lexer for idef-parser") the hexagon target uses 'flex' to generate idef-parser. However 'focal' may not have 'flex' pre-installed, consequently following error is seen with travis when trying to execute the 'GCC (user)' job that also tries to build hexagon user binary:
<snip>
export CONFIG="--disable-containers --disable-system" <snip>
Program flex found: NO
../target/hexagon/meson.build:179:4: ERROR: Program 'flex' not found or not executable
<snip>
Fix this by explicitly add 'flex' to the list of addon apt-packages for the 'GCC (user)' job.
--- .travis.yml | 1 + 1 file changed, 1 insertion(+)
.travis.yml +1 -0
@@ -237,6 +237,7 @@ jobs: - libglib2.0-dev - libgnutls28-dev - ninja-build + - flex env: - CONFIG="--disable-containers --disable-system"
Signature · 1 line
2.39.2
Re: [PATCH 2/2] travis.yml: Add missing 'flex' package to 'GCC (user)' job
Quoted 6 lines · Vaibhav Jain
Since commit
fd8171fe52b5e("target/hexagon: import lexer for idef-parser")the hexagon target uses 'flex' to generate idef-parser. However 'focal' may not have 'flex' pre-installed, consequently following error is seen with travis when trying to execute the 'GCC (user)' job that also tries to build hexagon user binary:
Quoted 8 lines
<snip>
export CONFIG="--disable-containers --disable-system" <snip>
Program flex found: NO../target/hexagon/meson.build:179:4: ERROR: Program 'flex' not found or not executable
<snip>
This works for me also without adding the package:
https://app.travis-ci.com/github/huth/qemu/jobs/600292739
Weird. Are you using a different Travis instance than I do?
Quoted 13 lines
Fix this by explicitly add 'flex' to the list of addon apt-packages for the 'GCC (user)' job.
Signed-off-by Vaibhav Jain <[email protected]>--- .travis.yml | 1 + 1 file changed, 1 insertion(+).travis.yml +0
-0
.travis.yml jobs: · line 240
Quoted 4 lines
.travis.yml +1
-0@@ -237,6 +237,7 @@ jobs: - libglib2.0-dev - libgnutls28-dev - ninja-build + - flex
I agree that adding this explicitely makes sense, but I think we should then also add "bison" here as well, since that's used by the hexagon target, too?
Thomas
Re: [PATCH 2/2] travis.yml: Add missing 'flex' package to 'GCC (user)' job
Hi Thomas,
Thanks for looking into this patch. My responses inline below:
Quoted 16 lines · Thomas Huth
Quoted 6 lines · Vaibhav Jain
Since commit
fd8171fe52b5e("target/hexagon: import lexer for idef-parser")the hexagon target uses 'flex' to generate idef-parser. However 'focal' may not have 'flex' pre-installed, consequently following error is seen with travis when trying to execute the 'GCC (user)' job that also tries to build hexagon user binary:Quoted 8 lines
<snip>
export CONFIG="--disable-containers --disable-system" <snip>
Program flex found: NO../target/hexagon/meson.build:179:4: ERROR: Program 'flex' not found or not executable
<snip>
Quoted 6 lines
This works for me also without adding the package:
https://app.travis-ci.com/github/huth/qemu/jobs/600292739
Weird. Are you using a different Travis instance than I do?
Yes, I am using a Enterprise Travis Instance with 'focal' distro which apparantly has a different focal image not containing Flex available by default.
Quoted 8 lines
Quoted 8 lines
Fix this by explicitly add 'flex' to the list of addon apt-packages for the 'GCC (user)' job.
Signed-off-by Vaibhav Jain <[email protected]>--- .travis.yml | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
.travis.yml jobs: · line 240
Quoted 9 lines
.travis.yml +1
-0@@ -237,6 +237,7 @@ jobs: - libglib2.0-dev - libgnutls28-dev - ninja-build + - flexI agree that adding this explicitely makes sense, but I think we should then also add "bison" here as well, since that's used by the hexagon target, too?
Yes, agree. Will spinoff another version which explicitly adds this dep.
Quoted 3 lines
Thomas
Signature · 2 lines
Cheers ~ Vaibhav
Quoted 41 lines · Vaibhav Jain
Since commit 74a1b256d775("configure: Bump minimum Clang version to 10.0") qemu needs Clang version 10.0 as the minimum version to build qemu with Clang. However 'focal' ships by default with Clang version 7.0.0 which causes an error while executing the 'Clang (disable-tcg)' travis job of the form below:
<snip>
$clang --versionclang version 7.0.0 (tags/RELEASE_700/final)
<snip>
ERROR: You need at least GCC v7.4 or Clang v10.0 (or XCode Clang v12.0)# QEMU configure log Fri 14 Apr 2023 03:48:22 PM UTC
# Configured with: '../configure' '--disable-docs' '--disable-tools' '--disable-containers' '--disable-tcg' '--enable-kvm' '--disable-tools' '--enable-fdt=system' '--host-cc=clang' '--cxx=clang++'
Fix this by adding 'clang-10' to the '
apt_packages' section of the "[s390x] Clang (disable-tcg)" job and updating the compiler to 'clang-10'.Signed-off-by Vaibhav Jain <[email protected]>--- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-).travis.yml +1
-1@@ -243,7 +243,7 @@ jobs: - name: "[s390x] Clang (disable-tcg)" arch: s390x dist: focal - compiler: clang + compiler: clang-10 addons: apt_packages: - libaio-dev
.travis.yml jobs: · line 272
Quoted 4 lines
.travis.yml +1
-0@@ -269,6 +269,7 @@ jobs: - libvdeplug-dev - libvte-2.91-dev - ninja-build + - clang-10
Are you sure about this one? It works for me:
https://app.travis-ci.com/github/huth/qemu/jobs/600292740
Also, Clang v10 seems to be the default version in Focal:
https://packages.ubuntu.com/focal/clang
So how did you end up with Clang v7.0 in your run?
Thomas
PS: We should maybe rather update the Travis jobs to Jammy nowadays instead.
Hi Thomas,
Thanks for reviewing this patch. My responses inline below:
Quoted 49 lines · Thomas Huth
Quoted 41 lines · Vaibhav Jain
Since commit 74a1b256d775("configure: Bump minimum Clang version to 10.0") qemu needs Clang version 10.0 as the minimum version to build qemu with Clang. However 'focal' ships by default with Clang version 7.0.0 which causes an error while executing the 'Clang (disable-tcg)' travis job of the form below:
<snip>
$clang --versionclang version 7.0.0 (tags/RELEASE_700/final)
<snip>
ERROR: You need at least GCC v7.4 or Clang v10.0 (or XCode Clang v12.0)# QEMU configure log Fri 14 Apr 2023 03:48:22 PM UTC
# Configured with: '../configure' '--disable-docs' '--disable-tools' '--disable-containers' '--disable-tcg' '--enable-kvm' '--disable-tools' '--enable-fdt=system' '--host-cc=clang' '--cxx=clang++'
Fix this by adding 'clang-10' to the '
apt_packages' section of the "[s390x] Clang (disable-tcg)" job and updating the compiler to 'clang-10'.Signed-off-by Vaibhav Jain <[email protected]>--- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-).travis.yml +1
-1@@ -243,7 +243,7 @@ jobs: - name: "[s390x] Clang (disable-tcg)" arch: s390x dist: focal - compiler: clang + compiler: clang-10 addons: apt_packages: - libaio-dev.travis.yml jobs: · line 272
Quoted 4 lines
.travis.yml +1
-0@@ -269,6 +269,7 @@ jobs: - libvdeplug-dev - libvte-2.91-dev - ninja-build + - clang-10Are you sure about this one? It works for me:
Quoted 5 lines
https://app.travis-ci.com/github/huth/qemu/jobs/600292740
Also, Clang v10 seems to be the default version in Focal:
Travis documentation at [1] mentions clang 7.0.0 to be the default compiler for Ubuntu 20.04 (Focal and Jammy). That is what I see in my travis environment also with Focal.
[1] -
https://docs.travis-ci.com/user/reference/focal/#environment-common-to-all-ubuntu-2004-images
Quoted 2 lines
So how did you end up with Clang v7.0 in your run?
Running this job on an internal Travis CI Enterprise instance.
I see the build info reported by app.travis-ci.com for focal is different from what I am seeing for "focal" distro indicating different builder images being used.
app.travis-ci.com
=================
Build system information
Build language: c
Build dist: focal
<snip>
Runtime kernel version: 5.4.0-139-generic
travis-build version: cb95e04b
Thu Nov 24 13:57:30 UTC 2022
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
Travis Enterprise
==================
Build system information
Build language: c
Build group: stable
Build dist: focal
<snip>
Runtime kernel version: 4.19.86
Build image provisioning date and time
Tue 14 Feb 2023 01:48:02 PM UTC
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
Quoted 5 lines
Thomas
PS: We should maybe rather update the Travis jobs to Jammy nowadays instead.
Yes, that can be another way to address this. However depends on availablity of Jammy image on the Travis Enterprise instance. Right now we dont have support for it in our Travis Enterprise instance.
IMHO if workaround exists for 'Focal' then it should be used unless it becomes too much of an effort to keep using 'Focal'.
Signature · 2 lines
Cheers ~ Vaibhav
Quoted 2 lines · Vaibhav Jain
Hi Thomas,
Thanks for reviewing this patch. My responses inline below:
...
Quoted 8 lines
Travis documentation at [1] mentions clang 7.0.0 to be the default compiler for Ubuntu 20.04 (Focal and Jammy). That is what I see in my travis environment also with Focal.
[1] -
https://docs.travis-ci.com/user/reference/focal/#environment-common-to-all-ubuntu-2004-imagesQuoted 1 line
Quoted 6 lines
Quoted 1 line
So how did you end up with Clang v7.0 in your run?
Running this job on an internal Travis CI Enterprise instance.
I see the build info reported by app.travis-ci.com for focal is different from what I am seeing for "focal" distro indicating different builder images being used.
OK, thanks for the explanation, that makes sense now. I'll queue your patch for my next pull request.
Quoted 4 lines
Quoted 1 line
PS: We should maybe rather update the Travis jobs to Jammy nowadays instead.
Yes, that can be another way to address this. However depends on availablity of Jammy image on the Travis Enterprise instance. Right now we dont have support for it in our Travis Enterprise instance.
I gave it a try now in the public Travis instance, too, but it apparently also does not work there yet. So never mind, updating to Jammy is not an option yet.
Thomas