[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] libxenstore.so Makefile dependency issue



Olaf Hering writes ("[Xen-devel] libxenstore.so Makefile dependency issue"):
> 
> This is the second time I run into this linking issue. A few days ago it
> happend with a make -j 4 or 8 during automated rpm package build. Now it
> happend with a fresh tree. My local system is openSuSE 11.4 with make
> 3.82, the failed automated build was either openSUSE 11.4 or 12.1.
> 
> For some reason the libxenstore.so symlink is created after
> init-xenstore-domain is about to be linked. The ln command is not
> visible in this output, I saw the ln invocation in the rpm build log.
> 
> Hmm, and for some reason the symlink was not created anyway in my local
> build. A second make run worked ok, libxenstore.so was created.  It
> looks like I can reproduce it by running make clean in tools/xenstore.
> 
> Looking at the Makefile, init-xenstore-domain depends on LIBXENSTORE,
> and libxenstore.so is also a target. So its not clear to me how make can
> miss that, or how the dependencies should be listed.

This is indeed mysterious.  I haven't managed to reproduce it either.

I tried the patch below, with make -j1000, and everything worked the
way it should do.

Ian.

diff -r 6a34a42a2b5d tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Tue Feb 21 18:01:04 2012 +0000
+++ b/tools/xenstore/Makefile   Tue Feb 21 18:23:46 2012 +0000
@@ -82,7 +82,7 @@ libxenstore.so.$(MAJOR): libxenstore.so.
 xs.opic: CFLAGS += -DUSE_PTHREAD
 
 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
-       $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) 
$(SHLIB_LDFLAGS) -o $@ $^ $(SOCKET_LIBS) -lpthread $(APPEND_LDFLAGS)
+       set -x; while test ! -f go$$$$; do sleep 10; done; $(CC) $(LDFLAGS) 
-Wl,$(SONAME_LDFLAG) -Wl,libxenstore.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ 
$(SOCKET_LIBS) -lpthread $(APPEND_LDFLAGS)
 
 libxenstore.a: xs.o xs_lib.o
        $(AR) rcs $@ $^

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.