diff mbox series

[2/2] travis.yml: Add missing 'flex' package to 'GCC (user)' job

Message ID 20230414210645.820204-2-vaibhav@linux.ibm.com
State New
Headers show
Series [1/2] travis.yml: Add missing clang-10 package to the 'Clang (disable-tcg)' job | expand

Commit Message

Vaibhav Jain April 14, 2023, 9:06 p.m. UTC
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.

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth April 17, 2023, 7:51 a.m. UTC | #1
On 14/04/2023 23.06, Vaibhav Jain wrote:
> 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>

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?

> Fix this by explicitly add 'flex' to the list of addon apt-packages for the
> 'GCC (user)' job.
> 
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
> ---
>   .travis.yml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 11894eb810..8dc71c294d 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -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
Vaibhav Jain April 17, 2023, 2:15 p.m. UTC | #2
Hi Thomas,

Thanks for looking into this patch. My responses inline below:

Thomas Huth <thuth@redhat.com> writes:

> On 14/04/2023 23.06, Vaibhav Jain wrote:
>> 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>
>
> 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.

>> Fix this by explicitly add 'flex' to the list of addon apt-packages for the
>> 'GCC (user)' job.
>> 
>> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
>> ---
>>   .travis.yml | 1 +
>>   1 file changed, 1 insertion(+)
>> 
>> diff --git a/.travis.yml b/.travis.yml
>> index 11894eb810..8dc71c294d 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -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?
Yes, agree. Will spinoff another version which explicitly adds this dep.

>   Thomas
>
>
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 11894eb810..8dc71c294d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -237,6 +237,7 @@  jobs:
           - libglib2.0-dev
           - libgnutls28-dev
           - ninja-build
+          - flex
       env:
         - CONFIG="--disable-containers --disable-system"