From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhigang Wang Subject: Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64 Date: Tue, 20 May 2014 12:55:48 -0400 Message-ID: <537B8914.8060100@oracle.com> References: <537162DD.7000304@oracle.com> <1400166650.19926.14.camel@kazak.uk.xensource.com> <5374E338.4060908@oracle.com> <1400589649.6946.31.camel@kazak.uk.xensource.com> <20140520130224.GA19255@aepfle.de> <537B5383.5010401@citrix.com> <537B56C0.20201@oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010109030003030405010505" Return-path: In-Reply-To: <537B56C0.20201@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Olaf Hering Cc: Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------010109030003030405010505 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 05/20/2014 09:21 AM, Zhigang Wang wrote: > On 05/20/2014 09:07 AM, Andrew Cooper wrote: >> On 20/05/14 14:02, Olaf Hering wrote: >>> On Tue, May 20, Ian Campbell wrote: >>> >>>>> For qemu: we didn't pass the --libdir when we configure it, so it uses the default one: $PREFIX/lib >>>> Thanks. I think your patch is probably the correct one then. Please can >>>> you submit with a proper changelog. >>> Likely not. >>> Since the included qemu is a private part of xen itself, it should >>> install stuff into $prefix/lib/xen/ instead of overwriting system files. >>> This most likely means qemu has to be build with rpath to really use its >>> own libs, if there are any. >>> >>> Olaf >> >> I agree. Having the Xen build system build itself non-xen components >> makes integrating the results into a real system very difficult without >> collisions. >> >> In this case, any qemu built by the Xen build system is private to Xen, >> and should not install as if it were the system qemu. >> >> The same goes for other 3rd party components. >> >> ~Andrew > > I agree with the direction you mentioned. > > On CentOS, libcacard is built as a separate RPM and installed to /usr/lib64, > which will conflict with our build with this patch. > > But keep our libcacard under /usr/lib also seems wrong. > > Could you please generate a patch to put libcacard etc staff into > $prefix/lib/xen and build qemu with rpath? > > I'm not a expert on these staff but I can test it. I checked rpath usage and attached patch is what I think is right to the best of my knowledge. Please help to confirm this is what we want. Thanks, Zhigang --------------010109030003030405010505 Content-Type: text/x-patch; name="xen-tools-qemu-libdir.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-tools-qemu-libdir.patch" tools: install qemu libraries to xen private directory and add rpath to it This will prevent our qemu libraries from conflict with system qemu libraries. Signed-off-by: Zhigang Wang diff --git a/tools/Makefile b/tools/Makefile index 992fe3e..1dfeda6 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -188,11 +188,14 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find $$source/configure --enable-xen --target-list=i386-softmmu \ $(QEMU_XEN_ENABLE_DEBUG) \ --prefix=$(PREFIX) \ + --libdir=$(PREFIX)/lib/xen/lib \ + --includedir=$(PREFIX)/lib/xen/include \ --source-path=$$source \ --extra-cflags="-I$(XEN_ROOT)/tools/include \ -I$(XEN_ROOT)/tools/libxc \ -I$(XEN_ROOT)/tools/xenstore \ -I$(XEN_ROOT)/tools/xenstore/compat \ + -Wl,-rpath=$(PREFIX)/lib/xen/lib \ $(EXTRA_CFLAGS_QEMU_XEN)" \ --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \ -L$(XEN_ROOT)/tools/xenstore" \ --------------010109030003030405010505 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------010109030003030405010505--