libcacard is been installed to /usr/lib while libdir=/usr/lib64
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/binlibrary 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.
Thanks,
Zhigang
tools/Makefile +1 -0
@@ -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 \
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Zhigang Wang
Is this expected? I thought it should be installed into
/usr/lib64as all other xen libs.
I think it depends on how you configured the Xen build -- what options did you use?
Quoted 1 line
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.
Quoted 9 lines
Signed-off-by Zhigang Wang <[email protected]>Thanks,
Zhigang
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Zhigang Wang
Is this expected? I thought it should be installed into
/usr/lib64as all other xen libs.I think it depends on how you configured the Xen build -- what options did you use?
Quoted 1 line
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
Quoted 13 lines · Zhigang Wang
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Zhigang Wang
Is this expected? I thought it should be installed into
/usr/lib64as all other xen libs.I think it depends on how you configured the Xen build -- what options did you use?
Quoted 1 line
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.
Quoted 7 lines
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.
Quoted 6 lines
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.
Quoted 41 lines · Ian Campbell
Quoted 14 lines · Zhigang Wang
Quoted 4 lines · Ian Campbell
Quoted 2 lines · Zhigang Wang
Is this expected? I thought it should be installed into
/usr/lib64as all other xen libs.Quoted 8 lines
I think it depends on how you configured the Xen build -- what options did you use?
Quoted 2 lines
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.
Quoted 8 lines
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.
Quoted 11 lines
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
Quoted 2 lines
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.
Quoted 9 lines
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
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.
tools/Makefile +1 -0
@@ -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 \
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Olaf Hering
NAKtools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 191
Quoted 6 lines · Zhigang Wang
+++ b/tools/Makefile
tools/Makefile +1
-0@@ -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
Quoted 4 lines · Ian Campbell
Quoted 1 line
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
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line
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.
Quoted 7 lines
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
Quoted 18 lines · Andrew Cooper
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line
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.
Quoted 7 lines
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.
Quoted 6 lines
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
Quoted 31 lines · Zhigang Wang
Quoted 18 lines · Andrew Cooper
Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line
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.
Quoted 7 lines
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.
Quoted 6 lines
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.
Quoted 6 lines
But keep our libcacard under
/usr/libalso 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
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.
tools/Makefile +3 -0
@@ -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" \
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 190
Quoted 5 lines · Zhigang Wang
+++ b/tools/Makefile
tools/Makefile +0
-0@@ -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
Quoted 10 lines · Olaf Hering
tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 190
Quoted 5 lines · Zhigang Wang
+++ b/tools/Makefile
tools/Makefile +0
-0@@ -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?
Quoted 1 line
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.
Quoted 12 lines · Ian Campbell
Quoted 10 lines · Olaf Hering
tools/Makefile subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 190
Quoted 5 lines · Zhigang Wang
+++ b/tools/Makefile
tools/Makefile +0
-0@@ -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
Quoted 6 lines
I think it would be nice to get our special qemu build out of general $PATH. Ian J -- do you agree?
Quoted 1 line
and see if anything needs adjustment.
libxl certainly will I think, in
qemu_xen_pathat 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
Quoted 17 lines · Olaf Hering
Quoted 15 lines · Ian Campbell
Quoted 10 lines · Olaf Hering
Review subdir-all-qemu-xen-dir: qemu-xen-dir-find · line 190
Quoted 5 lines · Zhigang Wang
+++ b/tools/Makefile
(quoted diff) +0
-0@@ -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?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
and see if anything needs adjustment.
libxl certainly will I think, in
qemu_xen_pathat leastThis 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
commit 50e098b1ea0b2ca0f81e29279071ba230d841b7b
Author: Zhigang Wang <[email protected]> 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.
tools/Makefile +4 -1
@@ -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" \
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines · Zhigang Wang
Here is my test result with attached patch:
1.
qemu_helperdir= libexecdir = $prefix/libexec moves. Affection:/usr/libexec/qemu-bridge-helpermoves to/usr/lib/xen/libexec/qemu-bridge-helper.include/net/net.h:#define
DEFAULT_BRIDGE_HELPERCONFIG_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.confmoves to/usr/lib/xen/etc/qemu/target-x86_64.confAlso 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.
Quoted 3 lines
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.
Quoted 1 line
I will do more test and report any issues I find.
Thanks.
Quoted 6 lines
Thanks,
Zhigang
Quoted 25 lines · Ian Campbell
Quoted 11 lines · Zhigang Wang
Here is my test result with attached patch:
1.
qemu_helperdir= libexecdir = $prefix/libexec moves. Affection:/usr/libexec/qemu-bridge-helpermoves to/usr/lib/xen/libexec/qemu-bridge-helper.include/net/net.h:#define
DEFAULT_BRIDGE_HELPERCONFIG_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.confmoves to/usr/lib/xen/etc/qemu/target-x86_64.confAlso seems the C code understand this path change.
Agreed. I think
/usr/lib/xen/etc/qemu/is better than e.g./etc/xen/qemusince 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.
Quoted 3 lines
3. It seems nothing will conflict with system qemu or qemu-kvm any more.
I think it's the right way to go.
Quoted 8 lines
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.
Quoted 1 line
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
commit e6171e9954901bad7bd118d9c27a030d980a866f
Author: Zhigang Wang <[email protected]> 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.
tools/Makefile +5 -2
@@ -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 \
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ian Campbell
Acked-byQuoted 1 line · Zhigang Wang
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.
I hope that's ok.
Cheers.
Ian
Quoted 5 lines · Ian Campbell
Quoted 1 line · Zhigang Wang
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.x86_64 renamed from FILE_LIST.BASE.x86_64 +5 -5
@@ -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