Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Tue, Dec 02, Wei Liu wrote: AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is incorrect, even in the event systemd library is available. Use PKG_CHECK_MODULES instead. Tested on Debian Jessie and Arch Linux. I just tested this and got this failure. The reason is that the LDFLAGS come before the objects. If I move LDFLAGS after $^ linking works. Will send a patch to fix the failure. Olaf make[3]: Entering directory '/work/olaf/factory/github/olafhering/xen.git/tools/xenstore' gcc-Wl,-rpath,/opt/xen/upstream/staging-honor_prefix/lib64 -lsystemd xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o xenstored_posix.o /work/olaf/factory/github/olafhering/xen.git/tools/xenstore/../../tools/libxc/libxenctrl.so -o xenstored xenstored_core.o: In function `xs_validate_active_socket': xenstored_core.c:(.text.unlikely+0x38): undefined reference to `sd_notifyf' xenstored_core.c:(.text.unlikely+0x59): undefined reference to `sd_is_socket_unix' xenstored_core.c:(.text.unlikely+0x77): undefined reference to `sd_is_socket_unix' xenstored_core.o: In function `main': xenstored_core.c:(.text.startup+0x1df): undefined reference to `sd_booted' xenstored_core.c:(.text.startup+0x23c): undefined reference to `sd_booted' xenstored_core.c:(.text.startup+0x25b): undefined reference to `sd_listen_fds' xenstored_core.c:(.text.startup+0x563): undefined reference to `sd_booted' xenstored_core.c:(.text.startup+0x8f9): undefined reference to `sd_notifyf' xenstored_core.c:(.text.startup+0x958): undefined reference to `sd_notifyf' xenstored_core.c:(.text.startup+0xb0d): undefined reference to `sd_notify' collect2: error: ld returned 1 exit status Makefile:80: recipe for target 'xenstored' failed make[3]: *** [xenstored] Error 1 ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Fri, 2014-12-05 at 10:51 +0100, Olaf Hering wrote: On Tue, Dec 02, Wei Liu wrote: AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is incorrect, even in the event systemd library is available. Use PKG_CHECK_MODULES instead. Tested on Debian Jessie and Arch Linux. I just tested this and got this failure. The reason is that the LDFLAGS come before the objects. If I move LDFLAGS after $^ linking works. Will send a patch to fix the failure. Was this a new failure with this change? AFAICT LDFLAGS is still set (via SYSTEMD_LIBS) in the same place relative to non-systemd stuff. FWIW the reason I don't see this in my pre-commit test is that I don't have the systemd headers installed. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Fri, Dec 05, Ian Campbell wrote: On Fri, 2014-12-05 at 10:51 +0100, Olaf Hering wrote: On Tue, Dec 02, Wei Liu wrote: AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is incorrect, even in the event systemd library is available. Use PKG_CHECK_MODULES instead. Tested on Debian Jessie and Arch Linux. I just tested this and got this failure. The reason is that the LDFLAGS come before the objects. If I move LDFLAGS after $^ linking works. Will send a patch to fix the failure. Was this a new failure with this change? AFAICT LDFLAGS is still set (via SYSTEMD_LIBS) in the same place relative to non-systemd stuff. No, happens even without it. I just realized that I missed a git rebase. My own packages do not have systemd-devel yet, so I did not spot this earlier. Maybe it just happens with the latest toolchain in Factory. Last time it worked well in 13.1 at least, SLE12 was ok as well. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, 2014-12-03 at 10:51 +, Ian Campbell wrote: On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? The implication here being that Wei's original patch is correct. Konrad, do you think this is OK for the release? Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Thu, 2014-12-04 at 07:13 -0500, Konrad Rzeszutek Wilk wrote: On Dec 4, 2014 6:55 AM, Ian Campbell ian.campb...@citrix.com wrote: On Wed, 2014-12-03 at 10:51 +, Ian Campbell wrote: On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? The implication here being that Wei's original patch is correct. Konrad, do you think this is OK for the release? Yes. Release-Axked-By: Konrad Rzeszutek Wilk konrad.w...@oracle.com Applied, thanks. Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, Dec 03, Ian Campbell wrote: On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? Yes. Anything before 208 is stale. At least I dont have anything older around for testing. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, Dec 03, 2014 at 11:55:22AM +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? Yes. Anything before 208 is stale. At least I dont have anything older around for testing. And for Fedora it is Fedora 21 or later. F20 has 208 so we are OK there. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Wed, 3 Dec 2014, Konrad Rzeszutek Wilk wrote: On Wed, Dec 03, 2014 at 11:55:22AM +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: On Wed, 2014-12-03 at 11:49 +0100, Olaf Hering wrote: On Wed, Dec 03, Ian Campbell wrote: Ah I didn't know about the sd_listen_fds thing, so I think that what we need then is to use pkg-config first to determine if systemd-daemon is present at all, and then check for specific symbols we require using the pkg-config supplied CFLAGS and LDFLAGS rather than assuming -lsystemd-daemon. Correction: sd_listen_fds is available since at least v1. git describe --contains abbbea81a8fa70badb7a05e518d6b07c360fc09d v1~390 In that case I don't think we realistically need to check for it? Yes. Anything before 208 is stale. At least I dont have anything older around for testing. And for Fedora it is Fedora 21 or later. F20 has 208 so we are OK there. Fedora 21 is going through its final release candidates now so it will stick to Xen 4.4 . The first Fedora release that might use this code (if I decide to use it - at the moment I have reservations) would be Fedora 22. Michael Young ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Tue, 2014-12-02 at 15:11 +, Wei Liu wrote: AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is incorrect, even in the event systemd library is available. Use PKG_CHECK_MODULES instead. Tested on Debian Jessie and Arch Linux. Please rerun autogen.sh after applying this patch. Reported-by: Mark Pryor tlvie...@yahoo.com Signed-off-by: Wei Liu wei.l...@citrix.com Cc: Ian Campbell ian.campb...@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Anthony Perard anthony.per...@citrix.com Cc: Luis R. Rodriguez mcg...@do-not-panic.com Cc: Mark Pryor tlvie...@yahoo.com Acked-by: Ian Campbell ian.campb...@citrix.com I think you should make reference in the commit log to the fact that the library has change name upstream but that a compatibility pkg-config is provided for the old name. It'd be nice if there was a less repetitive way to handle defaults + overriding in the autoconf stuff, but for a freeze exception this is the way to go. Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability
On Tue, Dec 02, 2014 at 03:11:30PM +, Wei Liu wrote: AC_CHECK_LIB fails on Debian Jessie since the ld flag it generates is incorrect, even in the event systemd library is available. Use PKG_CHECK_MODULES instead. Tested on Debian Jessie and Arch Linux. And Fedora and SuSE? CC-ing the other distro maintainers for their input. Please rerun autogen.sh after applying this patch. Reported-by: Mark Pryor tlvie...@yahoo.com Signed-off-by: Wei Liu wei.l...@citrix.com Cc: Ian Campbell ian.campb...@citrix.com Cc: Ian Jackson ian.jack...@eu.citrix.com Cc: Anthony Perard anthony.per...@citrix.com Cc: Luis R. Rodriguez mcg...@do-not-panic.com Cc: Mark Pryor tlvie...@yahoo.com --- m4/systemd.m4 | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/m4/systemd.m4 b/m4/systemd.m4 index a832d59..b04964b 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -42,13 +42,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - AC_CHECK_HEADER([systemd/sd-daemon.h], [ - AC_CHECK_LIB([systemd-daemon], [sd_listen_fds], [libsystemddaemon=y]) - ]) - AS_IF([test x$libsystemddaemon = x], [ - AC_MSG_ERROR([Unable to find a suitable libsystemd-daemon library]) - ]) - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon]) dnl pkg-config older than 0.24 does not set these for dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 @@ -98,9 +91,8 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [ - AC_CHECK_HEADER([systemd/sd-daemon.h], [ - AC_CHECK_LIB([systemd-daemon], [sd_listen_fds], [systemd=y]) - ]) + PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd=y], + [systemd=n]) ]) dnl Enables systemd by default and requires a --disable-systemd option flag -- 2.1.3 ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel