[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] trace: weird issues with makefile dependencies
From: |
Peter Maydell |
Subject: |
[Qemu-devel] trace: weird issues with makefile dependencies |
Date: |
Mon, 21 Jan 2013 23:42:54 +0000 |
There seems to be something wrong with the dependencies
or makefile runes for some of the trace infrastructure.
For example:
address@hidden:~/src/qemu/qemu$ less trace/generated-tracers.c
/* This file is autogenerated by tracetool, do not edit. */
address@hidden:~/src/qemu/qemu$ git status trace/generated-tracers.c
# Not currently on any branch.
nothing to commit (working directory clean)
address@hidden:~/src/qemu/qemu$ rm trace/generated-tracers.c
address@hidden:~/src/qemu/qemu$ make
lt CC trace/generated-tracers.lo
gcc: error: trace/generated-tracers.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
make: *** [trace/generated-tracers.lo] Error 1
address@hidden:~/src/qemu/qemu$ make trace/generated-tracers.c
make: Nothing to be done for `trace/generated-tracers.c'.
address@hidden:~/src/qemu/qemu$ file trace/generated-tracers.c
trace/generated-tracers.c: ERROR: cannot open
`trace/generated-tracers.c' (No such file or directory)
Removing trace/generated-tracers.c-timestamp is necessary
to get the makefile to rebuild the .c file.
Also, the .c file doesn't include any contents, which
makes compiling it a bit pointless since it results
in an empty object file. MacOSX at least warns about
this:
AR libqemuutil.a
/usr/bin/ranlib: file: libqemuutil.a(generated-tracers.o) has no symbols
/usr/bin/ranlib: file: libqemuutil.a(host-utils.o) has no symbols
/usr/bin/ranlib: file: libqemuutil.a(cache-utils.o) has no symbols
I also just spent a long time trying to figure out why
my MacOS system wouldn't build after a git pull; turns
out that:
(1) we used to have a generated trace.h and we don't any more
(2) make distclean doesn't remove trace.h
(3) #include "trace.h" prefers the out of date generated one
to the new non-generated one in include/
I have no idea whether we can make qemu's build process more
resistant to that kind of diachronic change, but I mention it
anyway :-)
-- PMM
- [Qemu-devel] trace: weird issues with makefile dependencies,
Peter Maydell <=