All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] qemu master build failure
@ 2018-03-16 17:01 Andrew Jones
  2018-03-16 17:11 ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Jones @ 2018-03-16 17:01 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Paolo Bonzini

Hi Thomas,

QEMU master is failing to build on an AArch64 machine with GCC 4.8. I get

  ...
  CC      qemu-nbd.o
/home/drjones/code/qemu/qemu-nbd.c: In function ‘version’:
/home/drjones/code/qemu/qemu-nbd.c:133:7: error: expected ‘)’ before ‘QEMU_FULL_VERSION’
 "%s " QEMU_FULL_VERSION "\n"
       ^
/home/drjones/code/qemu/qemu-nbd.c:139:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
     , name);
     ^
cc1: all warnings being treated as errors
make: *** [qemu-nbd.o] Error 1


Reverting 7e563bfb8 fixes the build. I figured I'd report it now,
but I won't have time to look closer until Monday.

Thanks,
drew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu master build failure
  2018-03-16 17:01 [Qemu-devel] qemu master build failure Andrew Jones
@ 2018-03-16 17:11 ` Paolo Bonzini
  2018-03-16 17:20   ` Peter Maydell
  2018-03-16 18:12   ` Christian Borntraeger
  0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2018-03-16 17:11 UTC (permalink / raw)
  To: Andrew Jones, Thomas Huth; +Cc: qemu-devel

On 16/03/2018 18:01, Andrew Jones wrote:
> Hi Thomas,
> 
> QEMU master is failing to build on an AArch64 machine with GCC 4.8. I get
> 
>   ...
>   CC      qemu-nbd.o
> /home/drjones/code/qemu/qemu-nbd.c: In function ‘version’:
> /home/drjones/code/qemu/qemu-nbd.c:133:7: error: expected ‘)’ before ‘QEMU_FULL_VERSION’
>  "%s " QEMU_FULL_VERSION "\n"
>        ^
> /home/drjones/code/qemu/qemu-nbd.c:139:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
>      , name);
>      ^
> cc1: all warnings being treated as errors
> make: *** [qemu-nbd.o] Error 1
> 
> 
> Reverting 7e563bfb8 fixes the build. I figured I'd report it now,
> but I won't have time to look closer until Monday.

You probably have a stray qemu-version.h file somewhere.  No worries, I
was puzzled by the same thing after I applied Thomas's patch. :)

Paolo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu master build failure
  2018-03-16 17:11 ` Paolo Bonzini
@ 2018-03-16 17:20   ` Peter Maydell
  2018-03-16 18:12   ` Christian Borntraeger
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2018-03-16 17:20 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Andrew Jones, Thomas Huth, QEMU Developers, Michael S. Tsirkin

On 16 March 2018 at 17:11, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 16/03/2018 18:01, Andrew Jones wrote:
>> Hi Thomas,
>>
>> QEMU master is failing to build on an AArch64 machine with GCC 4.8. I get
>>
>>   ...
>>   CC      qemu-nbd.o
>> /home/drjones/code/qemu/qemu-nbd.c: In function ‘version’:
>> /home/drjones/code/qemu/qemu-nbd.c:133:7: error: expected ‘)’ before ‘QEMU_FULL_VERSION’
>>  "%s " QEMU_FULL_VERSION "\n"
>>        ^
>> /home/drjones/code/qemu/qemu-nbd.c:139:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
>>      , name);
>>      ^
>> cc1: all warnings being treated as errors
>> make: *** [qemu-nbd.o] Error 1
>>
>>
>> Reverting 7e563bfb8 fixes the build. I figured I'd report it now,
>> but I won't have time to look closer until Monday.
>
> You probably have a stray qemu-version.h file somewhere.  No worries, I
> was puzzled by the same thing after I applied Thomas's patch. :)

Yep, stray qemu-version.h in the source tree. That bit me on one of
my build systems and also mstsirkin...

(MST had a suggestion on IRC that if we used #include <> for generated
headers rather than "" this would avoid that problem because it would
not search the source tree before the build tree. I haven't tested that
idea...)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu master build failure
  2018-03-16 17:11 ` Paolo Bonzini
  2018-03-16 17:20   ` Peter Maydell
@ 2018-03-16 18:12   ` Christian Borntraeger
  2018-03-16 18:22     ` Daniel P. Berrangé
  2018-03-16 18:25     ` Peter Maydell
  1 sibling, 2 replies; 6+ messages in thread
From: Christian Borntraeger @ 2018-03-16 18:12 UTC (permalink / raw)
  To: Paolo Bonzini, Andrew Jones, Thomas Huth; +Cc: qemu-devel

Does it make sense to have something like

diff --git a/configure b/configure
index 831ebf2..67d7ae3 100755
--- a/configure
+++ b/configure
@@ -552,6 +552,10 @@ else
     pwd_is_source_path="n"
 fi
 
+if test -f $source_path\/qemu-version.h -a $pwd_is_source_path = "n" ; then
+error_exit "source path contains a stale configuration, cannot build outside" 
+fi
+
 check_define() {
 cat > $TMPC <<EOF
 #if !defined($1)



On 03/16/2018 06:11 PM, Paolo Bonzini wrote:
> On 16/03/2018 18:01, Andrew Jones wrote:
>> Hi Thomas,
>>
>> QEMU master is failing to build on an AArch64 machine with GCC 4.8. I get
>>
>>   ...
>>   CC      qemu-nbd.o
>> /home/drjones/code/qemu/qemu-nbd.c: In function ‘version’:
>> /home/drjones/code/qemu/qemu-nbd.c:133:7: error: expected ‘)’ before ‘QEMU_FULL_VERSION’
>>  "%s " QEMU_FULL_VERSION "\n"
>>        ^
>> /home/drjones/code/qemu/qemu-nbd.c:139:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=]
>>      , name);
>>      ^
>> cc1: all warnings being treated as errors
>> make: *** [qemu-nbd.o] Error 1
>>
>>
>> Reverting 7e563bfb8 fixes the build. I figured I'd report it now,
>> but I won't have time to look closer until Monday.
> 
> You probably have a stray qemu-version.h file somewhere.  No worries, I
> was puzzled by the same thing after I applied Thomas's patch. :)
> 
> Paolo
> 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu master build failure
  2018-03-16 18:12   ` Christian Borntraeger
@ 2018-03-16 18:22     ` Daniel P. Berrangé
  2018-03-16 18:25     ` Peter Maydell
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2018-03-16 18:22 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Paolo Bonzini, Andrew Jones, Thomas Huth, qemu-devel

On Fri, Mar 16, 2018 at 07:12:26PM +0100, Christian Borntraeger wrote:
> Does it make sense to have something like
> 
> diff --git a/configure b/configure
> index 831ebf2..67d7ae3 100755
> --- a/configure
> +++ b/configure
> @@ -552,6 +552,10 @@ else
>      pwd_is_source_path="n"
>  fi
>  
> +if test -f $source_path\/qemu-version.h -a $pwd_is_source_path = "n" ; then
> +error_exit "source path contains a stale configuration, cannot build outside" 
> +fi
> +

Yeah that is a check that autoconf does commonly to detect this
kind of mistake, so I think its good.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu master build failure
  2018-03-16 18:12   ` Christian Borntraeger
  2018-03-16 18:22     ` Daniel P. Berrangé
@ 2018-03-16 18:25     ` Peter Maydell
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2018-03-16 18:25 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Paolo Bonzini, Andrew Jones, Thomas Huth, QEMU Developers

On 16 March 2018 at 18:12, Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> Does it make sense to have something like
>
> diff --git a/configure b/configure
> index 831ebf2..67d7ae3 100755
> --- a/configure
> +++ b/configure
> @@ -552,6 +552,10 @@ else
>      pwd_is_source_path="n"
>  fi
>
> +if test -f $source_path\/qemu-version.h -a $pwd_is_source_path = "n" ; then
> +error_exit "source path contains a stale configuration, cannot build outside"
> +fi

We already have an equivalent check to that in Makefile;
it looks for a config-host.mak:

# Check that we're not trying to do an out-of-tree build from
# a tree that's been used for an in-tree build.
ifneq ($(realpath $(SRC_PATH)),$(realpath .))
ifneq ($(wildcard $(SRC_PATH)/config-host.mak),)
$(error This is an out of tree build but your source tree ($(SRC_PATH)) \
seems to have been used for an in-tree build. You can fix this by running \
"$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree)
endif
endif


Before commit 428952cfa966f it was possible for an accidental
run of 'make -j10' in the source tree to create qemu-options.def
and qemu-version.h in the source tree before the makefile noticed
you were trying it in the wrong directory. I think that after
that it should be much harder to end up with these stale files,
but of course if your tree already had a stale file from
before then the commit won't clean it up for you...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-16 18:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-16 17:01 [Qemu-devel] qemu master build failure Andrew Jones
2018-03-16 17:11 ` Paolo Bonzini
2018-03-16 17:20   ` Peter Maydell
2018-03-16 18:12   ` Christian Borntraeger
2018-03-16 18:22     ` Daniel P. Berrangé
2018-03-16 18:25     ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.