This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Xen 4.1.0 RC2 released,

On Fri, 2011-01-28 at 22:24 +0000, Nathan March wrote: 
> On 1/28/2011 1:54 PM, Ian Campbell wrote:
> > Can you try adding $(LDLIBS_libxenctrl) and $(LDLIBS_libxenstore) to the
> > end of the link line for libxenlight.so
> No luck. That resulted in this:
> I also tried putting those two vars in at the beginning and just before 
> the -o, but didn't help.

Hrm. Same missing symbols as before?

Taking a step back, since I think this patch is becoming a little bit
too much for a 4.1.0-rc3, lets consider how we can disable as-needed for
Xen 4.1.0 and revisit the situation for 4.2 (with the possibility of a
back port for 4.1.1 as well).

I don't see any as-needed in your link lines so I presume it was enabled
as a compile time option in your ld. 

I just built Xen with the following patch and it didn't break on a
Debian system (i.e. without as-needed enabled by default). Can you try
it in your environment?

diff -r d2c7cf306687 config/StdGNU.mk
--- a/config/StdGNU.mk  Sat Jan 29 10:33:04 2011 +0000
+++ b/config/StdGNU.mk  Sat Jan 29 10:39:07 2011 +0000
@@ -65,6 +65,8 @@ SONAME_LDFLAG = -soname
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
+LDFLAGS += -Wl,--no-as-needed
 ifneq ($(debug),y)
 CFLAGS += -O2 -fomit-frame-pointer

For 4.2 I was hoping to revisit the issue of libraries not being
correctly transitively linked (e.g. libxl is supposed to isolate users
from the need to know about libxenctrl and libxenstore so applications
which use only libxl should not be expected to have to link with
-lxenctrl and -lxenstore). I suspect that there will be a lot of overlap
with this and supporting --as-needed as the latter is essentially a
workaround for the lack of the former. 


Xen-devel mailing list