Compile error on FC17
Hello,
qemu is currently not compile clean:
CC util/hbitmap.outil/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
Quoted 7 lines · Gerhard Wiesinger
Hello,
qemu is currently not compile clean:
CCutil/hbitmap.outil/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
Quoted 8 lines · Peter Maydell
Quoted 7 lines · Gerhard Wiesinger
Hello,
qemu is currently not compile clean:
CCutil/hbitmap.outil/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]
Quoted 6 lines
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 herehw/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 herehw/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 herehw/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
Quoted 11 lines · Gerhard Wiesinger
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 fromhw/usb/hcd-xhci.c:27:0:
./trace.h:1052:58: note: declared hereBTW: 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
Quoted 25 lines · Peter Maydell
Quoted 11 lines · Gerhard Wiesinger
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 fromhw/usb/hcd-xhci.c:27:0:
./trace.h:1052:58: note: declared hereBTW: Isn't a new issue (around 2 month) but was very busy.
Oh, right. Tracing functions moved from
trace.hto 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 oldtrace.hfile 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.ctrace.htrace.c-timestamp trace.h-timestamp this should resolve the problem.
Quoted 9 lines
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
Quoted 1 line · Peter Maydell
Oh, right. Tracing functions moved from
trace.hto 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 oldtrace.hfile 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.ctrace.htrace.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
Quoted 9 lines · Gerhard Wiesinger
Quoted 5 lines · Peter Maydell
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