From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH for-4.5] systemd: use pkg-config to determine systemd library availability Date: Fri, 5 Dec 2014 10:51:46 +0100 Message-ID: <20141205095146.GA16843@aepfle.de> References: <1417533090-29651-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1417533090-29651-1-git-send-email-wei.liu2@citrix.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: Wei Liu Cc: Mark Pryor , Ian Campbell , "Luis R. Rodriguez" , Ian Jackson , xen-devel@lists.xen.org, Anthony Perard List-Id: xen-devel@lists.xenproject.org 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