qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Gustavo Romero <gromero@linux.ibm.com>
Cc: Pbonzini@redhat.com, gustavo.romero@protonmail.com,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	david@gibson.dropbear.id.au
Subject: Re: [PATCH] configure: Fail when specified cross compiler cannot be found
Date: Thu, 17 Dec 2020 17:56:19 +0000	[thread overview]
Message-ID: <87y2hwqpd2.fsf@linaro.org> (raw)
In-Reply-To: <16b08946-9f96-200e-231f-40e24bb21734@linux.ibm.com>


Gustavo Romero <gromero@linux.ibm.com> writes:

> Hi Alex,
>
> On 12/16/20 7:51 AM, Alex Bennée wrote:
>> 
>> Gustavo Romero <gromero@linux.ibm.com> writes:
>> 
>>> Currently if the cross compiler passed to 'configure' (--cross-cc-<arch>) does
>>> not exist no error happens and only later when the TCG tests are run they fail
>>> because the cross compiler is not set correctly.
>> 
>> Do they? They should just skip because of a non-existing compiler and a
>> failed fallback to using docker:
>> 
>>    ../../configure --disable-docs --target-list=aarch64-softmmu --cross-cc-aarch64=nonexisting_gcc
>> 
>> and then cat ./tests/tcg/config-aarch64-softmmu.mak
>> 
>>    # Automatically generated by configure - do not modify
>>    TARGET_NAME=aarch64
>>    CONFIG_SOFTMMU=y
>>    QEMU=/home/alex/lsrc/qemu.git/builds/bisect/qemu-system-aarch64
>>    CROSS_CC_GUEST_CFLAGS=
>>    DOCKER_IMAGE=debian-arm64-test-cross
>>    DOCKER_CROSS_CC_GUEST=aarch64-linux-gnu-gcc-10
>> 
>> So what do you see in your failing case?
>
> I get the following (I don't have docker installed):
>
> $  ../configure --disable-docs --target-list=aarch64-softmmu --cross-cc-aarch64=nonexisting_gcc
> gromero@pub:~/git/qemu/build$ cat ./tests/tcg/config-aarch64-softmmu.mak
> # Automatically generated by configure - do not modify
> TARGET_NAME=aarch64
> CONFIG_SOFTMMU=y
> QEMU=/home/gromero/git/qemu/build/qemu-system-aarch64
> CROSS_CC_GUEST_CFLAGS=
>
> $ ../configure --disable-docs --target-list=ppc64-softmmu --cross-cc-ppc64=nonexisting_gcc
> gromero@pub:~/git/qemu/build$ cat ./tests/tcg/config-ppc64-softmmu.mak
> # Automatically generated by configure - do not modify
> TARGET_NAME=ppc64
> CONFIG_SOFTMMU=y
> QEMU=/home/gromero/git/qemu/build/qemu-system-ppc64
> CROSS_CC_GUEST_CFLAGS=
> CROSS_CC_GUEST_STATIC=y
> CROSS_CC_GUEST=powerpc-linux-gnu-gcc

Hmm that is impressively wrong to somehow get the 32 bit compiler. But
I'm still failing to replicate the problem. Could you try the following
configure for a like-for-like comparison:

  ../../configure --disable-containers --target-list=ppc64-softmmu --cross-cc-ppc64=nonexisting_gcc

which gives me:

  $ cat tests/tcg/config-ppc64-softmmu.mak
  # Automatically generated by configure - do not modify
  TARGET_NAME=ppc64
  CONFIG_SOFTMMU=y
  QEMU=/home/alex/lsrc/qemu.git/builds/ppc-linux.all/qemu-system-ppc64
  CROSS_CC_GUEST_CFLAGS=

>
> hrm It seems PPC64 is even assuming some default gcc...
>
> I'm at commit af3f37319c from Dec 15.

Yep I'm based on that as well.

> I'm wondering if tha happens because I don't have docker package installed.
>
> Anyway, should we at least say we're using Docker as fallback?

Something like:

modified   tests/tcg/configure.sh
@@ -255,6 +255,7 @@ for target in $target_list; do
   if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then
     echo "DOCKER_IMAGE=$container_image" >> $config_target_mak
     echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
+    enabled_container_compilers="$enabled_container_compilers $container_cross_cc"
   fi
 done
 
@@ -265,3 +266,6 @@ if test -n "$enabled_cross_compilers"; then
     echo
     echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
 fi
+if test -n "$enabled_container_compilers"; then
+    echo "NOTE: container cross-compilers enabled:$enabled_container_compilers"
+fi

To be honest at the moment the information is a little hidden at the top
of the output. It would be nice if we could teach meson to echo it in
it's nice coloured output.

Paolo,

Any ideas for the cleanest way to do that?

-- 
Alex Bennée


  reply	other threads:[~2020-12-17 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  1:36 [PATCH] configure: Fail when specified cross compiler cannot be found Gustavo Romero
2020-12-16 10:51 ` Alex Bennée
2020-12-17 16:55   ` Gustavo Romero
2020-12-17 17:56     ` Alex Bennée [this message]
2020-12-18 10:05       ` Paolo Bonzini
2020-12-18 11:57         ` Alex Bennée
2020-12-19 12:11           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2hwqpd2.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=Pbonzini@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=gromero@linux.ibm.com \
    --cc=gustavo.romero@protonmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).