qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Compile error on FC17
@ 2013-03-10 12:28 Gerhard Wiesinger
  2013-03-10 13:20 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Gerhard Wiesinger @ 2013-03-10 12:28 UTC (permalink / raw)
  To: qemu-devel

Hello,

qemu is currently not compile clean:
CC util/hbitmap.o
util/hbitmap.c: In function ‘hbitmap_iter_skip_words’:
util/hbitmap.c:138:5: error: implicit declaration of function 
‘trace_hbitmap_iter_skip_words’ [-Werror=implicit-function-declaration]
util/hbitmap.c:138:5: error: nested extern declaration of 
‘trace_hbitmap_iter_skip_words’ [-Werror=nested-externs]
util/hbitmap.c: In function ‘hbitmap_set’:
util/hbitmap.c:271:5: error: implicit declaration of function 
‘trace_hbitmap_set’ [-Werror=implicit-function-declaration]
util/hbitmap.c:271:5: error: nested extern declaration of 
‘trace_hbitmap_set’ [-Werror=nested-externs]
util/hbitmap.c: In function ‘hbitmap_reset’:
util/hbitmap.c:351:5: error: implicit declaration of function 
‘trace_hbitmap_reset’ [-Werror=implicit-function-declaration]
util/hbitmap.c:351:5: error: nested extern declaration of 
‘trace_hbitmap_reset’ [-Werror=nested-externs]
cc1: all warnings being treated as errors
make: *** [util/hbitmap.o] Error 1

gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)

Ciao,
Gerhard

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 12:28 [Qemu-devel] Compile error on FC17 Gerhard Wiesinger
@ 2013-03-10 13:20 ` Peter Maydell
  2013-03-10 15:15   ` Gerhard Wiesinger
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2013-03-10 13:20 UTC (permalink / raw)
  To: Gerhard Wiesinger; +Cc: qemu-devel

On 10 March 2013 20:28, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> Hello,
>
> qemu is currently not compile clean:
> CC util/hbitmap.o
> util/hbitmap.c: In function ‘hbitmap_iter_skip_words’:
> util/hbitmap.c:138:5: error: implicit declaration of function
> ‘trace_hbitmap_iter_skip_words’ [-Werror=implicit-function-declaration]

These are all functions which are autogenerated from trace-events
into trace/generated-tracers.h (and my git tree has them correctly
autogenerated and qemu builds). I suspect (a) our dependency
rules for these still aren't right (b) you can fix this with a
make clean or distclean or failing everything else by completely
nuking the tree and starting from scratch.

-- PMM

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 13:20 ` Peter Maydell
@ 2013-03-10 15:15   ` Gerhard Wiesinger
  2013-03-10 17:04     ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Gerhard Wiesinger @ 2013-03-10 15:15 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel@nongnu.org

On 10.03.2013 14:20, Peter Maydell wrote:
> On 10 March 2013 20:28, Gerhard Wiesinger <lists@wiesinger.com> wrote:
>> Hello,
>>
>> qemu is currently not compile clean:
>> CC util/hbitmap.o
>> util/hbitmap.c: In function ‘hbitmap_iter_skip_words’:
>> util/hbitmap.c:138:5: error: implicit declaration of function
>> ‘trace_hbitmap_iter_skip_words’ [-Werror=implicit-function-declaration]
> These are all functions which are autogenerated from trace-events
> into trace/generated-tracers.h (and my git tree has them correctly
> autogenerated and qemu builds). I suspect (a) our dependency
> rules for these still aren't right (b) you can fix this with a
> make clean or distclean or failing everything else by completely
> nuking the tree and starting from scratch.

Hello Peter,

Tried make clean and make distclean already before I reported the issue.

If I'm suppressing "warning as errors" I'm still getting errors:

hw/usb/hcd-xhci.c: In function ‘xhci_set_ep_dequeue’:
hw/usb/hcd-xhci.c:1471:5: error: too many arguments to function 
‘trace_usb_xhci_ep_set_dequeue’
In file included from hw/usb/hcd-xhci.c:27:0:
./trace.h:1052:58: note: declared here
hw/usb/hcd-xhci.c: In function ‘xhci_fire_ctl_transfer’:
hw/usb/hcd-xhci.c:1742:5: error: too many arguments to function 
‘trace_usb_xhci_xfer_start’
In file included from hw/usb/hcd-xhci.c:27:0:
./trace.h:1068:58: note: declared here
hw/usb/hcd-xhci.c: In function ‘xhci_fire_transfer’:
hw/usb/hcd-xhci.c:1874:5: error: too many arguments to function 
‘trace_usb_xhci_xfer_start’
In file included from hw/usb/hcd-xhci.c:27:0:
./trace.h:1068:58: note: declared here
hw/usb/hcd-xhci.c: In function ‘xhci_kick_ep’:
hw/usb/hcd-xhci.c:1889:5: error: too many arguments to function 
‘trace_usb_xhci_ep_kick’
In file included from hw/usb/hcd-xhci.c:27:0:
./trace.h:1056:58: note: declared here
make: *** [hw/usb/hcd-xhci.o] Error 1
make: *** Waiting for unfinished jobs....

BTW: Isn't a new issue (around 2 month) but was very busy.

Ciao,
Gerhard

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 15:15   ` Gerhard Wiesinger
@ 2013-03-10 17:04     ` Peter Maydell
  2013-03-10 18:52       ` Laszlo Ersek
  2013-03-10 19:36       ` Gerhard Wiesinger
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Maydell @ 2013-03-10 17:04 UTC (permalink / raw)
  To: Gerhard Wiesinger; +Cc: qemu-devel@nongnu.org

On 10 March 2013 15:15, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> Tried make clean and make distclean already before I reported the issue.
>
> If I'm suppressing "warning as errors" I'm still getting errors:
>
> hw/usb/hcd-xhci.c: In function ‘xhci_set_ep_dequeue’:
> hw/usb/hcd-xhci.c:1471:5: error: too many arguments to function
> ‘trace_usb_xhci_ep_set_dequeue’
> In file included from hw/usb/hcd-xhci.c:27:0:
> ./trace.h:1052:58: note: declared here

> BTW: Isn't a new issue (around 2 month) but was very busy.

Oh, right. Tracing functions moved from trace.h to the files
in the trace/ subdirectory. This means that if you didn't do
a make clean or distclean before doing the git update then
the new makefile knows nothing about the old trace.h file and
so won't delete it, but the compiler may still pull it in anyhow.
However this happened a long time back which is why I didn't
mention it as a possibility (it was discussed on the list at
the time as a number of people including me ran into it).
If you remove all the files:
trace.c trace.h trace.c-timestamp trace.h-timestamp
this should resolve the problem.

This is an example of a longstanding problem we have, where
the makefile's dependency rules aren't able to cope with
changes to the project source file structure, and so clean,
distclean and incremental build sometimes breaks across a
git update. I think this is pretty intractable as a problem
to solve; you can mitigate it by doing all your builds in
a build directory rather than in the source tree itself,
since then you can always just delete the whole build tree
to get a definite from-scratch build.

-- PMM

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 17:04     ` Peter Maydell
@ 2013-03-10 18:52       ` Laszlo Ersek
  2013-03-10 19:36       ` Gerhard Wiesinger
  1 sibling, 0 replies; 7+ messages in thread
From: Laszlo Ersek @ 2013-03-10 18:52 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Gerhard Wiesinger, qemu-devel@nongnu.org

On 03/10/13 18:04, Peter Maydell wrote:
> On 10 March 2013 15:15, Gerhard Wiesinger <lists@wiesinger.com> wrote:
>> Tried make clean and make distclean already before I reported the issue.
>>
>> If I'm suppressing "warning as errors" I'm still getting errors:
>>
>> hw/usb/hcd-xhci.c: In function ‘xhci_set_ep_dequeue’:
>> hw/usb/hcd-xhci.c:1471:5: error: too many arguments to function
>> ‘trace_usb_xhci_ep_set_dequeue’
>> In file included from hw/usb/hcd-xhci.c:27:0:
>> ./trace.h:1052:58: note: declared here
> 
>> BTW: Isn't a new issue (around 2 month) but was very busy.
> 
> Oh, right. Tracing functions moved from trace.h to the files
> in the trace/ subdirectory. This means that if you didn't do
> a make clean or distclean before doing the git update then
> the new makefile knows nothing about the old trace.h file and
> so won't delete it, but the compiler may still pull it in anyhow.
> However this happened a long time back which is why I didn't
> mention it as a possibility (it was discussed on the list at
> the time as a number of people including me ran into it).
> If you remove all the files:
> trace.c trace.h trace.c-timestamp trace.h-timestamp
> this should resolve the problem.
> 
> This is an example of a longstanding problem we have, where
> the makefile's dependency rules aren't able to cope with
> changes to the project source file structure, and so clean,
> distclean and incremental build sometimes breaks across a
> git update. I think this is pretty intractable as a problem
> to solve; you can mitigate it by doing all your builds in
> a build directory rather than in the source tree itself,
> since then you can always just delete the whole build tree
> to get a definite from-scratch build.

There's also
$ git reset --hard
$ git clean -fdx
$ ./configure ...

Laszlo

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 17:04     ` Peter Maydell
  2013-03-10 18:52       ` Laszlo Ersek
@ 2013-03-10 19:36       ` Gerhard Wiesinger
  2013-03-10 19:47         ` Peter Maydell
  1 sibling, 1 reply; 7+ messages in thread
From: Gerhard Wiesinger @ 2013-03-10 19:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel@nongnu.org

On 10.03.2013 18:04, Peter Maydell wrote:
> Oh, right. Tracing functions moved from trace.h to the files in the 
> trace/ subdirectory. This means that if you didn't do a make clean or 
> distclean before doing the git update then the new makefile knows 
> nothing about the old trace.h file and so won't delete it, but the 
> compiler may still pull it in anyhow. However this happened a long 
> time back which is why I didn't mention it as a possibility (it was 
> discussed on the list at the time as a number of people including me 
> ran into it). If you remove all the files: trace.c trace.h 
> trace.c-timestamp trace.h-timestamp this should resolve the problem. 
> This is an example of a longstanding problem we have, where the 
> makefile's dependency rules aren't able to cope with changes to the 
> project source file structure, and so clean, distclean and incremental 
> build sometimes breaks across a git update. I think this is pretty 
> intractable as a problem to solve; you can mitigate it by doing all 
> your builds in a build directory rather than in the source tree 
> itself, since then you can always just delete the whole build tree to 
> get a definite from-scratch build.

rm -f trace.c trace.h libcacard/trace.c
find . -name \*-timestamp -exec rm -f {} \;
make distclean
make clean
./configure --target-list=x86_64-softmmu

# No files found
find . -name \*-timestamp

# No files found
find . -name trace.c

# Under git version control:
# ./include/trace.h
find . -name trace.h

=> Worked well

But shouldn't "make distclean" do the job correctly (even with a changed 
directory structure, at least for some time)?

Ciao,
Gerhard

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

* Re: [Qemu-devel] Compile error on FC17
  2013-03-10 19:36       ` Gerhard Wiesinger
@ 2013-03-10 19:47         ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2013-03-10 19:47 UTC (permalink / raw)
  To: Gerhard Wiesinger; +Cc: qemu-devel@nongnu.org

On 10 March 2013 19:36, Gerhard Wiesinger <lists@wiesinger.com> wrote:
> On 10.03.2013 18:04, Peter Maydell wrote:
>> This is an example of a longstanding problem we have, where the
>> makefile's dependency rules aren't able to cope with changes to the project
>> source file structure, and so clean, distclean and incremental build
>> sometimes breaks across a git update. I think this is pretty intractable as
>> a problem to solve;

> But shouldn't "make distclean" do the job correctly (even with a changed
> directory structure, at least for some time)?

Yes, I agree that in an ideal world it should. However as I say
I think it's a hard problem to solve in general. Patches welcome
if you have any good ideas :-)

-- PMM

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

end of thread, other threads:[~2013-03-10 19:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-10 12:28 [Qemu-devel] Compile error on FC17 Gerhard Wiesinger
2013-03-10 13:20 ` Peter Maydell
2013-03-10 15:15   ` Gerhard Wiesinger
2013-03-10 17:04     ` Peter Maydell
2013-03-10 18:52       ` Laszlo Ersek
2013-03-10 19:36       ` Gerhard Wiesinger
2013-03-10 19:47         ` Peter Maydell

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).