Thanks. Out-of-tree build worked (with make distclean before checking out new commit).
On Tue, Jun 10, 2014 at 5:53 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 10 June 2014 13:03, Sai Prajeeth <cspraje...@gmail.com> wrote: > > Hi, > > I am getting this error if i try to build qemu. > > > > libqemuutil.a(oslib-posix.o): In function `qemu_anon_ram_alloc': > > /util/oslib-posix.c:141: undefined reference to > `trace_qemu_anon_ram_alloc' > > libqemuutil.a(oslib-posix.o): In function `qemu_anon_ram_free': > > /util/oslib-posix.c:153: undefined reference to > `trace_qemu_anon_ram_free' > > collect2: ld returned 1 exit status > > > > This occurred when i performed bisection on current master > > (7721a3044234c46cd6f5f899e7467dc9351f3c8d) and an earlier commit. Now > when i > > checkout master i keep getting this. Any idea what is wrong? > > > > Build works if i pull the whole repo again. > > Yeah, this kind of thing can happen if you bisect between > an old commit and a new one -- make clean and make distclean > don't know how to remove files which were created by the > build in the old commit but which don't get built in the new > one, and then the stale files can occasionally cause > problems with the build. > > You may be able to determine what the stale file is and > remove it, but usually the easiest thing to do in this > situation is simply to delete the build tree and do a > complete rebuild from scratch. (Being able to do that is > a good reason for doing your builds out-of-tree, > incidentally.) > > You might also try 'check out old commit; make distclean; > check out new commit; build'. > > thanks > -- PMM >