* libcacard is been installed to /usr/lib while libdir=/usr/lib64
@ 2014-05-13 0:10 Zhigang Wang
2014-05-15 15:10 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-13 0:10 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 1955 bytes --]
Hi,
I build qemu-upstream on CentOS 6 x86_64 and libcacard is been installed into
/usr/lib:
/usr/lib/libcacard.a
/usr/lib/libcacard.la
/usr/lib/libcacard.so
/usr/lib/libcacard.so.0
/usr/lib/libcacard.so.0.0.0
/usr/lib/pkgconfig/libcacard.pc
Here is the build log:
make[2]: Entering directory `/share/rpmbuild/BUILD/xen-4.5.0/tools'
if test -d git://xenbits.xen.org/qemu-upstream-unstable.git ; then \
source=git://xenbits.xen.org/qemu-upstream-unstable.git; \
else \
source=.; \
fi; \
cd qemu-xen-dir; \
$source/configure --enable-xen --target-list=i386-softmmu \
--enable-debug --enable-trace-backend=stderr \
--prefix=/usr \
--source-path=$source \
--extra-cflags="-I/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/include \
-I/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/libxc \
-I/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/xenstore \
-I/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/xenstore/compat \
" \
--extra-ldflags="-L/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/libxc \
-L/share/rpmbuild/BUILD/xen-4.5.0/tools/../tools/xenstore" \
--bindir=/usr/lib/xen/bin \
--datadir=/usr/share/qemu-xen \
--localstatedir=/var \
--disable-kvm \
--disable-docs \
--disable-guest-agent \
--python=python \
; \
make all
Install prefix /usr
BIOS directory /usr/share/qemu-xen/qemu
binary directory /usr/lib/xen/bin
library directory /usr/lib
libexec directory /usr/libexec
include directory /usr/include
config directory /usr/etc
local state directory /var
Manual directory /usr/share/man
...
Is this expected? I thought it should be installed into /usr/lib64 as all other
xen libs.
Attached patch will change the behavior. Apply it if you think it's what we want.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Thanks,
Zhigang
[-- Attachment #2: ovs-xen-qemu-upstream-libdir.patch --]
[-- Type: text/x-patch, Size: 429 bytes --]
diff --git a/tools/Makefile b/tools/Makefile
index 3675515..93c79e7 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -188,6 +188,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
$$source/configure --enable-xen --target-list=i386-softmmu \
$(QEMU_XEN_ENABLE_DEBUG) \
--prefix=$(PREFIX) \
+ --libdir=$(LIBDIR) \
--source-path=$$source \
--extra-cflags="-I$(XEN_ROOT)/tools/include \
-I$(XEN_ROOT)/tools/libxc \
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-13 0:10 libcacard is been installed to /usr/lib while libdir=/usr/lib64 Zhigang Wang
@ 2014-05-15 15:10 ` Ian Campbell
2014-05-15 15:54 ` Zhigang Wang
0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2014-05-15 15:10 UTC (permalink / raw)
To: Zhigang Wang; +Cc: xen-devel
On Mon, 2014-05-12 at 20:10 -0400, Zhigang Wang wrote:
> Is this expected? I thought it should be installed into /usr/lib64 as all other
> xen libs.
I think it depends on how you configured the Xen build -- what options
did you use?
> Attached patch will change the behavior. Apply it if you think it's what we want.
I think it probably is but I'll wait for confirmation of the options you
used.
> Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
>
> Thanks,
>
> Zhigang
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-15 15:10 ` Ian Campbell
@ 2014-05-15 15:54 ` Zhigang Wang
2014-05-20 12:40 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-15 15:54 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
On 05/15/2014 11:10 AM, Ian Campbell wrote:
> On Mon, 2014-05-12 at 20:10 -0400, Zhigang Wang wrote:
>> Is this expected? I thought it should be installed into /usr/lib64 as all other
>> xen libs.
>
> I think it depends on how you configured the Xen build -- what options
> did you use?
>
>> Attached patch will change the behavior. Apply it if you think it's what we want.
>
> I think it probably is but I'll wait for confirmation of the options you
> used.
I think the problem is simple as this:
For xen:
./configure --prefix=/usr --libdir=/usr/lib64
For qemu: we didn't pass the --libdir when we configure it, so it uses the default one: $PREFIX/lib
I use RPM %configure macro, and it translates to:
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
There are many other options has the same issue: they may different for qemu and xen.
I'm not sure what is the best way to handle it.
Thanks,
Zhigang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-15 15:54 ` Zhigang Wang
@ 2014-05-20 12:40 ` Ian Campbell
2014-05-20 13:00 ` Zhigang Wang
2014-05-20 13:02 ` Olaf Hering
0 siblings, 2 replies; 18+ messages in thread
From: Ian Campbell @ 2014-05-20 12:40 UTC (permalink / raw)
To: Zhigang Wang; +Cc: xen-devel
On Thu, 2014-05-15 at 11:54 -0400, Zhigang Wang wrote:
> On 05/15/2014 11:10 AM, Ian Campbell wrote:
> > On Mon, 2014-05-12 at 20:10 -0400, Zhigang Wang wrote:
> >> Is this expected? I thought it should be installed into /usr/lib64 as all other
> >> xen libs.
> >
> > I think it depends on how you configured the Xen build -- what options
> > did you use?
> >
> >> Attached patch will change the behavior. Apply it if you think it's what we want.
> >
> > I think it probably is but I'll wait for confirmation of the options you
> > used.
>
> I think the problem is simple as this:
>
> For xen:
>
> ./configure --prefix=/usr --libdir=/usr/lib64
>
> 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.
> I use RPM %configure macro, and it translates to:
>
> + ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
>
> There are many other options has the same issue: they may different for qemu and xen.
> I'm not sure what is the best way to handle it.
I wonder if we should be arranging to pass the full set of configure
optons we received down to the subconfigure. That's how projects which
have subtree configures do things (including our own toplevel, tools,
docs, stubdom configure). My concern would be that this is a 3rd party
configure so the scenario is slightly different. TBH I'm no autoconf
expert so I don't know...
Ian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 12:40 ` Ian Campbell
@ 2014-05-20 13:00 ` Zhigang Wang
2014-05-20 13:05 ` Olaf Hering
2014-05-20 13:02 ` Olaf Hering
1 sibling, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-20 13:00 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]
On 05/20/2014 08:40 AM, Ian Campbell wrote:
> On Thu, 2014-05-15 at 11:54 -0400, Zhigang Wang wrote:
>> On 05/15/2014 11:10 AM, Ian Campbell wrote:
>>> On Mon, 2014-05-12 at 20:10 -0400, Zhigang Wang wrote:
>>>> Is this expected? I thought it should be installed into
>>>> /usr/lib64 as all other xen libs.
>>>
>>> I think it depends on how you configured the Xen build -- what
>>> options did you use?
>>>
>>>> Attached patch will change the behavior. Apply it if you think
>>>> it's what we want.
>>>
>>> I think it probably is but I'll wait for confirmation of the
>>> options you used.
>>
>> I think the problem is simple as this:
>>
>> For xen:
>>
>> ./configure --prefix=/usr --libdir=/usr/lib64
>>
>> 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.
>
>> I use RPM %configure macro, and it translates to:
>>
>> + ./configure --build=x86_64-redhat-linux-gnu
>> --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu
>> --program-prefix= --prefix=/usr --exec-prefix=/usr
>> --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
>> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
>> --libexecdir=/usr/libexec --localstatedir=/var
>> --sharedstatedir=/var/lib --mandir=/usr/share/man
>> --infodir=/usr/share/info
>>
>> There are many other options has the same issue: they may different
>> for qemu and xen. I'm not sure what is the best way to handle it.
>
> I wonder if we should be arranging to pass the full set of configure
> optons we received down to the subconfigure. That's how projects
> which have subtree configures do things (including our own toplevel,
> tools, docs, stubdom configure). My concern would be that this is a
> 3rd party configure so the scenario is slightly different. TBH I'm no
> autoconf expert so I don't know...
>
> Ian.
>
Attached is the patch with some changelog.
Before we can think out the right way to pass all options, I think passing
prefix and libdir is good enough for now:
1. prefix is most widely used.
2. libdir becomes important as x86 and x86_64 get into the same system.
3. Default values for other options seems the same across build systems.
Thanks,
Zhigang
[-- Attachment #2: ovs-xen-qemu-upstream-libdir.patch --]
[-- Type: text/x-patch, Size: 773 bytes --]
tools: pass --libdir to qemu configure
On an x86_64 environment, when we configure xen using:
./configure --prefix=/usr --libdir=/usr/lib64
only --prefix=/usr is passed to qemu configure. Then qemu will use
$(PREFIX)/lib as libdir, which causes inconsistent with other xen tools.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff --git a/tools/Makefile b/tools/Makefile
index 3675515..93c79e7 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -188,6 +188,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
$$source/configure --enable-xen --target-list=i386-softmmu \
$(QEMU_XEN_ENABLE_DEBUG) \
--prefix=$(PREFIX) \
+ --libdir=$(LIBDIR) \
--source-path=$$source \
--extra-cflags="-I$(XEN_ROOT)/tools/include \
-I$(XEN_ROOT)/tools/libxc \
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 12:40 ` Ian Campbell
2014-05-20 13:00 ` Zhigang Wang
@ 2014-05-20 13:02 ` Olaf Hering
2014-05-20 13:07 ` Andrew Cooper
1 sibling, 1 reply; 18+ messages in thread
From: Olaf Hering @ 2014-05-20 13:02 UTC (permalink / raw)
To: Ian Campbell; +Cc: Zhigang Wang, xen-devel
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 13:00 ` Zhigang Wang
@ 2014-05-20 13:05 ` Olaf Hering
0 siblings, 0 replies; 18+ messages in thread
From: Olaf Hering @ 2014-05-20 13:05 UTC (permalink / raw)
To: Zhigang Wang; +Cc: Ian Campbell, xen-devel
On Tue, May 20, Zhigang Wang wrote:
> +++ b/tools/Makefile
> @@ -188,6 +188,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
> $$source/configure --enable-xen --target-list=i386-softmmu \
> $(QEMU_XEN_ENABLE_DEBUG) \
> --prefix=$(PREFIX) \
> + --libdir=$(LIBDIR) \
NACK.
The bug is the usage of PREFIX instead of PREFIX/lib/xen (or whatever
would be the right place). The included qemu is not and should not
become the system qemu.
Olaf
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 13:02 ` Olaf Hering
@ 2014-05-20 13:07 ` Andrew Cooper
2014-05-20 13:21 ` Zhigang Wang
0 siblings, 1 reply; 18+ messages in thread
From: Andrew Cooper @ 2014-05-20 13:07 UTC (permalink / raw)
To: Olaf Hering; +Cc: Zhigang Wang, Ian Campbell, xen-devel
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 13:07 ` Andrew Cooper
@ 2014-05-20 13:21 ` Zhigang Wang
2014-05-20 16:55 ` Zhigang Wang
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-20 13:21 UTC (permalink / raw)
To: Andrew Cooper, Olaf Hering; +Cc: Ian Campbell, xen-devel
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.
Thanks,
Zhigang
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 13:21 ` Zhigang Wang
@ 2014-05-20 16:55 ` Zhigang Wang
2014-05-21 7:46 ` Olaf Hering
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-20 16:55 UTC (permalink / raw)
To: Andrew Cooper, Olaf Hering; +Cc: Ian Campbell, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]
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
[-- Attachment #2: xen-tools-qemu-libdir.patch --]
[-- Type: text/x-patch, Size: 926 bytes --]
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 <zhigang.x.wang@oracle.com>
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" \
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-20 16:55 ` Zhigang Wang
@ 2014-05-21 7:46 ` Olaf Hering
2014-05-21 10:25 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Olaf Hering @ 2014-05-21 7:46 UTC (permalink / raw)
To: Zhigang Wang; +Cc: Andrew Cooper, Ian Campbell, xen-devel
On Tue, May 20, Zhigang Wang wrote:
> +++ 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) \
Looks ok to me. You may want to change also --prefix to $PREFIX/lib/xen
with this patch and see if anything needs adjustment.
Olaf
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-21 7:46 ` Olaf Hering
@ 2014-05-21 10:25 ` Ian Campbell
2014-05-21 10:50 ` Olaf Hering
0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2014-05-21 10:25 UTC (permalink / raw)
To: Olaf Hering, Ian Jackson; +Cc: Andrew Cooper, Zhigang Wang, xen-devel
On Wed, 2014-05-21 at 09:46 +0200, Olaf Hering wrote:
> On Tue, May 20, Zhigang Wang wrote:
>
> > +++ 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) \
>
> Looks ok to me. You may want to change also --prefix to $PREFIX/lib/xen
> with this patch
I think it would be nice to get our special qemu build out of general
$PATH. Ian J -- do you agree?
> and see if anything needs adjustment.
libxl certainly will I think, in qemu_xen_path at least
tools/hotplug/Linux/init.d/{sysconfig.,}xencommons look like they will
need messing with too.
The string qemu-system-i386 doesn't appear in osstest.git, so I think we
will be OK from that POV.
ts-xen-install does special case /usr/local/etc/qemu (i.e. allows it
when other $PREFIX/etc paths are denied), but since this still needs to
work with other branches that could stay. Perhaps it could become
conditional on the existence of some other file which is moved by the
change in $PREFIX (and which is guaranteed to be present in older
branches with qemut too).
Ian.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-21 10:25 ` Ian Campbell
@ 2014-05-21 10:50 ` Olaf Hering
2014-05-21 13:52 ` Zhigang Wang
0 siblings, 1 reply; 18+ messages in thread
From: Olaf Hering @ 2014-05-21 10:50 UTC (permalink / raw)
To: Ian Campbell; +Cc: Andrew Cooper, Zhigang Wang, Ian Jackson, xen-devel
On Wed, May 21, Ian Campbell wrote:
> On Wed, 2014-05-21 at 09:46 +0200, Olaf Hering wrote:
> > On Tue, May 20, Zhigang Wang wrote:
> >
> > > +++ 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) \
> >
> > Looks ok to me. You may want to change also --prefix to $PREFIX/lib/xen
> > with this patch
>
> I think it would be nice to get our special qemu build out of general
> $PATH. Ian J -- do you agree?
>
> > and see if anything needs adjustment.
>
> libxl certainly will I think, in qemu_xen_path at least
This is already handled by --bindir=, the "if anything needs adjustment"
means most likely data and /etc paths. But then, qemu is supposed to
cope with any --prefix= so I guess the different prefix will just work.
Olaf
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-21 10:50 ` Olaf Hering
@ 2014-05-21 13:52 ` Zhigang Wang
2014-05-21 14:16 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-21 13:52 UTC (permalink / raw)
To: Olaf Hering; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]
On 05/21/2014 06:50 AM, Olaf Hering wrote:
> On Wed, May 21, Ian Campbell wrote:
>
>> On Wed, 2014-05-21 at 09:46 +0200, Olaf Hering wrote:
>>> On Tue, May 20, Zhigang Wang wrote:
>>>
>>>> +++ 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) \
>>>
>>> Looks ok to me. You may want to change also --prefix to $PREFIX/lib/xen
>>> with this patch
>>
>> I think it would be nice to get our special qemu build out of general
>> $PATH. Ian J -- do you agree?
>>
>>> and see if anything needs adjustment.
>>
>> libxl certainly will I think, in qemu_xen_path at least
>
> This is already handled by --bindir=, the "if anything needs adjustment"
> means most likely data and /etc paths. But then, qemu is supposed to
> cope with any --prefix= so I guess the different prefix will just work.
Here is my test result with attached patch:
1. qemu_helperdir = libexecdir = $prefix/libexec moves. Affection: /usr/libexec/qemu-bridge-helper moves to /usr/lib/xen/libexec/qemu-bridge-helper.
include/net/net.h:#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
As the C code already understands this path change, it's not a problem.
2. qemu_confdir = $prefix/etc/qeum moves. Affection: /usr/etc/qemu/target-x86_64.conf moves to /usr/lib/xen/etc/qemu/target-x86_64.conf
Also seems the C code understand this path change.
3. It seems nothing will conflict with system qemu or qemu-kvm any more.
I think it's the right way to go.
I will do more test and report any issues I find.
Thanks,
Zhigang
[-- Attachment #2: xen-tools-qemu-prefix.patch --]
[-- Type: text/x-patch, Size: 1150 bytes --]
commit 50e098b1ea0b2ca0f81e29279071ba230d841b7b
Author: Zhigang Wang <zhigang.x.wang@oracle.com>
Date: Tue May 20 13:30:54 2014 -0400
tools: install qemu libraries to xen private directory and add rpath to it
This patch will prevent our qemu libraries from conflicting with system qemu
libraries.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff --git a/tools/Makefile b/tools/Makefile
index 992fe3e..c21ec53 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -187,12 +187,15 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
cd qemu-xen-dir; \
$$source/configure --enable-xen --target-list=i386-softmmu \
$(QEMU_XEN_ENABLE_DEBUG) \
- --prefix=$(PREFIX) \
+ --prefix=$(PREFIX)/lib/xen \
+ --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" \
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-21 13:52 ` Zhigang Wang
@ 2014-05-21 14:16 ` Ian Campbell
2014-05-28 16:13 ` Zhigang Wang
0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2014-05-21 14:16 UTC (permalink / raw)
To: Zhigang Wang; +Cc: Andrew Cooper, Olaf Hering, Ian Jackson, xen-devel
On Wed, 2014-05-21 at 09:52 -0400, Zhigang Wang wrote:
> Here is my test result with attached patch:
>
> 1. qemu_helperdir = libexecdir = $prefix/libexec moves. Affection: /usr/libexec/qemu-bridge-helper moves to /usr/lib/xen/libexec/qemu-bridge-helper.
>
> include/net/net.h:#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
>
> As the C code already understands this path change, it's not a problem.
>
> 2. qemu_confdir = $prefix/etc/qeum moves. Affection: /usr/etc/qemu/target-x86_64.conf moves to /usr/lib/xen/etc/qemu/target-x86_64.conf
>
> Also seems the C code understand this path change.
Agreed. I think /usr/lib/xen/etc/qemu/ is better than e.g. /etc/xen/qemu
since that might give the impression of affecting the system qemu when
used with Xen.
I think both target-86_64.conf and qemu-bridge-helper both don't do very
much in a Xen system anyway.
> 3. It seems nothing will conflict with system qemu or qemu-kvm any more.
>
> I think it's the right way to go.
I agree.
With your change to --prefix I suspect that --libdir and --includedir
aren't needed, but there's no harm in passing them I suppose.
> I will do more test and report any issues I find.
Thanks.
>
> Thanks,
>
> Zhigang
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-21 14:16 ` Ian Campbell
@ 2014-05-28 16:13 ` Zhigang Wang
2014-06-02 14:40 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Zhigang Wang @ 2014-05-28 16:13 UTC (permalink / raw)
To: Ian Campbell; +Cc: Andrew Cooper, Olaf Hering, Ian Jackson, xen-devel
[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]
On 05/21/2014 10:16 AM, Ian Campbell wrote:
> On Wed, 2014-05-21 at 09:52 -0400, Zhigang Wang wrote:
>
>> Here is my test result with attached patch:
>>
>> 1. qemu_helperdir = libexecdir = $prefix/libexec moves. Affection: /usr/libexec/qemu-bridge-helper moves to /usr/lib/xen/libexec/qemu-bridge-helper.
>>
>> include/net/net.h:#define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
>>
>> As the C code already understands this path change, it's not a problem.
>>
>> 2. qemu_confdir = $prefix/etc/qeum moves. Affection: /usr/etc/qemu/target-x86_64.conf moves to /usr/lib/xen/etc/qemu/target-x86_64.conf
>>
>> Also seems the C code understand this path change.
>
> Agreed. I think /usr/lib/xen/etc/qemu/ is better than e.g. /etc/xen/qemu
> since that might give the impression of affecting the system qemu when
> used with Xen.
>
> I think both target-86_64.conf and qemu-bridge-helper both don't do very
> much in a Xen system anyway.
>
>> 3. It seems nothing will conflict with system qemu or qemu-kvm any more.
>>
>> I think it's the right way to go.
>
> I agree.
>
> With your change to --prefix I suspect that --libdir and --includedir
> aren't needed, but there's no harm in passing them I suppose.
>
>> I will do more test and report any issues I find.
>
> Thanks.
Here is the latest patch: maybe better to put -Wl,-rpath to LDFLAGS instead of CFLAGS.
It works well from my CentOS 6 test env.
Please review.
Thanks,
Zhigang
[-- Attachment #2: xen-tools-qemu-private.patch --]
[-- Type: text/x-patch, Size: 1299 bytes --]
commit e6171e9954901bad7bd118d9c27a030d980a866f
Author: Zhigang Wang <zhigang.x.wang@oracle.com>
Date: Tue May 20 13:30:54 2014 -0400
tools: install qemu libraries to xen private directory and add rpath to it
This patch will prevent our qemu libraries from conflicting with system qemu
libraries.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff --git a/tools/Makefile b/tools/Makefile
index 992fe3e..63382b1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -187,7 +187,9 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
cd qemu-xen-dir; \
$$source/configure --enable-xen --target-list=i386-softmmu \
$(QEMU_XEN_ENABLE_DEBUG) \
- --prefix=$(PREFIX) \
+ --prefix=$(PREFIX)/lib/xen \
+ --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 \
@@ -195,7 +197,8 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
-I$(XEN_ROOT)/tools/xenstore/compat \
$(EXTRA_CFLAGS_QEMU_XEN)" \
--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
- -L$(XEN_ROOT)/tools/xenstore" \
+ -L$(XEN_ROOT)/tools/xenstore \
+ -Wl,-rpath=$(PREFIX)/lib/xen/lib" \
--bindir=$(LIBEXEC) \
--datadir=$(SHAREDIR)/qemu-xen \
--localstatedir=/var \
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-05-28 16:13 ` Zhigang Wang
@ 2014-06-02 14:40 ` Ian Campbell
2014-06-02 14:49 ` Ian Campbell
0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2014-06-02 14:40 UTC (permalink / raw)
To: Zhigang Wang; +Cc: Andrew Cooper, Olaf Hering, Ian Jackson, xen-devel
On Wed, 2014-05-28 at 12:13 -0400, Zhigang Wang wrote:
> Here is the latest patch: maybe better to put -Wl,-rpath to LDFLAGS instead of CFLAGS.
Acked + applied. Please format patches with git format-patch in the
future so I can apply without manual intervention.
Since this is no longer solely about the libraries I reworded the commit
log to:
tools: install qemu into xen private directory and add rpath for the libraries
This patch will prevent our qemu from conflicting with system qemu.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
I hope that's ok.
Cheers.
Ian
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: libcacard is been installed to /usr/lib while libdir=/usr/lib64
2014-06-02 14:40 ` Ian Campbell
@ 2014-06-02 14:49 ` Ian Campbell
0 siblings, 0 replies; 18+ messages in thread
From: Ian Campbell @ 2014-06-02 14:49 UTC (permalink / raw)
To: Zhigang Wang; +Cc: Andrew Cooper, Olaf Hering, Ian Jackson, xen-devel
On Mon, 2014-06-02 at 15:40 +0100, Ian Campbell wrote:
> On Wed, 2014-05-28 at 12:13 -0400, Zhigang Wang wrote:
>
> > Here is the latest patch: maybe better to put -Wl,-rpath to LDFLAGS instead of CFLAGS.
>
> Acked + applied.
BTW, the resulting change to the installed paths was as I expected:
--- ../FILE_LIST.BASE.x86_64 2014-04-25 10:09:37.000000000 +0100
+++ ../FILE_LIST.x86_64 2014-06-02 15:24:38.000000000 +0100
@@ -76,9 +76,6 @@
dist/install/usr/local/bin/xentrace
dist/install/usr/local/bin/xentrace_format
dist/install/usr/local/bin/xentrace_setsize
-dist/install/usr/local/etc
-dist/install/usr/local/etc/qemu
-dist/install/usr/local/etc/qemu/target-x86_64.conf
dist/install/usr/local/include
dist/install/usr/local/include/fsimage_grub.h
dist/install/usr/local/include/fsimage.h
@@ -180,8 +177,6 @@
dist/install/usr/local/include/xs.h
dist/install/usr/local/include/xs_lib.h
dist/install/usr/local/lib
-dist/install/usr/local/libexec
-dist/install/usr/local/libexec/qemu-bridge-helper
dist/install/usr/local/lib/fs
dist/install/usr/local/lib/fs/ext2fs-lib
dist/install/usr/local/lib/fs/ext2fs-lib/fsimage.so
@@ -348,6 +343,11 @@
dist/install/usr/local/lib/xen/boot/vtpmmgr-stubdom.gz
dist/install/usr/local/lib/xen/boot/vtpm-stubdom.gz
dist/install/usr/local/lib/xen/boot/xenstore-stubdom.gz
+dist/install/usr/local/lib/xen/etc
+dist/install/usr/local/lib/xen/etc/qemu
+dist/install/usr/local/lib/xen/etc/qemu/target-x86_64.conf
+dist/install/usr/local/lib/xen/libexec
+dist/install/usr/local/lib/xen/libexec/qemu-bridge-helper
dist/install/usr/local/sbin
dist/install/usr/local/sbin/gdbsx
dist/install/usr/local/sbin/gtracestat
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2014-06-02 14:49 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 0:10 libcacard is been installed to /usr/lib while libdir=/usr/lib64 Zhigang Wang
2014-05-15 15:10 ` Ian Campbell
2014-05-15 15:54 ` Zhigang Wang
2014-05-20 12:40 ` Ian Campbell
2014-05-20 13:00 ` Zhigang Wang
2014-05-20 13:05 ` Olaf Hering
2014-05-20 13:02 ` Olaf Hering
2014-05-20 13:07 ` Andrew Cooper
2014-05-20 13:21 ` Zhigang Wang
2014-05-20 16:55 ` Zhigang Wang
2014-05-21 7:46 ` Olaf Hering
2014-05-21 10:25 ` Ian Campbell
2014-05-21 10:50 ` Olaf Hering
2014-05-21 13:52 ` Zhigang Wang
2014-05-21 14:16 ` Ian Campbell
2014-05-28 16:13 ` Zhigang Wang
2014-06-02 14:40 ` Ian Campbell
2014-06-02 14:49 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).