[PATCH] tests/docker: Install flex in debian-tricore-cross

Philippe Mathieu-Daudé posted 1 patch 1 year, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230112155643.7408-1-philmd@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
tests/docker/dockerfiles/debian-tricore-cross.docker | 1 +
1 file changed, 1 insertion(+)
[PATCH] tests/docker: Install flex in debian-tricore-cross
Posted by Philippe Mathieu-Daudé 1 year, 3 months ago
When flex is not available, binutils sources default to the
'missing' script, but the current script available is not in
the format expected by the 'configure' script:

  $ ./configure
  ...
  /usr/src/binutils/missing: Unknown `--run' option
  Try `/usr/src/binutils/missing --help' for more information
  configure: WARNING: `missing' script is too old or missing
  ...
  checking for bison... bison -y
  checking for flex... no
  checking for lex... no
  checking for flex... /usr/src/binutils/missing flex

  $ make
  ...
  updating ldgram.h
  gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd -I./../include -I./../intl -I../intl  -w -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -w -c `test -f 'ldgram.c' || echo './'`ldgram.c
  `test -f ldlex.l || echo './'`ldlex.l
  /bin/sh: 1: ldlex.l: not found
  make[3]: *** [Makefile:662: ldlex.c] Error 127
  make[3]: Leaving directory '/usr/src/binutils/ld'
  make[2]: *** [Makefile:799: all-recursive] Error 1

By pass the 'missing' script use by directly installing 'flex'
in the container.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
https://gitlab.com/philmd/qemu/-/jobs/3594948730
Duration: 4 minutes 38 seconds
---
 tests/docker/dockerfiles/debian-tricore-cross.docker | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
index b573b9ded2..203e096ea3 100644
--- a/tests/docker/dockerfiles/debian-tricore-cross.docker
+++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
@@ -20,6 +20,7 @@ RUN apt update && \
        bzip2 \
        ca-certificates \
        ccache \
+       flex \
        g++ \
        gcc \
        git \
-- 
2.38.1


Re: [PATCH] tests/docker: Install flex in debian-tricore-cross
Posted by Bastian Koppelmann 1 year, 3 months ago
On Thu, Jan 12, 2023 at 04:56:43PM +0100, Philippe Mathieu-Daudé wrote:
> When flex is not available, binutils sources default to the
> 'missing' script, but the current script available is not in
> the format expected by the 'configure' script:
> 
>   $ ./configure
>   ...
>   /usr/src/binutils/missing: Unknown `--run' option
>   Try `/usr/src/binutils/missing --help' for more information
>   configure: WARNING: `missing' script is too old or missing
>   ...
>   checking for bison... bison -y
>   checking for flex... no
>   checking for lex... no
>   checking for flex... /usr/src/binutils/missing flex
> 
>   $ make
>   ...
>   updating ldgram.h
>   gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd -I./../include -I./../intl -I../intl  -w -DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -w -c `test -f 'ldgram.c' || echo './'`ldgram.c
>   `test -f ldlex.l || echo './'`ldlex.l
>   /bin/sh: 1: ldlex.l: not found
>   make[3]: *** [Makefile:662: ldlex.c] Error 127
>   make[3]: Leaving directory '/usr/src/binutils/ld'
>   make[2]: *** [Makefile:799: all-recursive] Error 1
> 
> By pass the 'missing' script use by directly installing 'flex'
> in the container.
> 
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> https://gitlab.com/philmd/qemu/-/jobs/3594948730
> Duration: 4 minutes 38 seconds
> ---

Thanks for picking it up Phil. 

Reviewed-by: Bastian-Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian
Re: [PATCH] tests/docker: Install flex in debian-tricore-cross
Posted by Alex Bennée 1 year, 3 months ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> When flex is not available, binutils sources default to the
> 'missing' script, but the current script available is not in
> the format expected by the 'configure' script:

Queued to testing/next, thanks.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro