xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Shriram Rajagopalan <rshriram@cs.ubc.ca>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1 of 5 V2] remus: add libnl3 dependency to autoconf scripts
Date: Wed, 9 Oct 2013 09:27:09 -0700	[thread overview]
Message-ID: <CAP8mzPM9i65XdyPNmksZzfbyZog+ZgAiy3v0sOT6xJjMs=jf0g@mail.gmail.com> (raw)
In-Reply-To: <1381306014.9920.18.camel@kazak.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 2932 bytes --]

On Wed, Oct 9, 2013 at 1:06 AM, Ian Campbell <Ian.Campbell@citrix.com>wrote:

> On Tue, 2013-10-08 at 19:14 -0700, Shriram Rajagopalan wrote:
>
> >
> >         > +# Check for libnl3 >=3.2.8. If present enable remus network
> >         buffering.
> >         > +PKG_CHECK_EXISTS([libnl-3.0 >= 3.2.8 libnl-route-3.0 >=
> >         3.2.8 libnl-cli-3.0 >= 3.2.8],
> >         > +             [libnl3_lib="y"], [libnl3_lib="n"])
> >         > +AC_CHECK_HEADER([netlink/route/qdisc/plug.h],
> >         [libnl3_dev="y"], [libnl3_dev="n"])
> >
> >
> >         Aren't these a bit redundant? i.e. doesn't PKG_CHECK_EXISTS
> >         cover the development headers?
>
> > Unfortunately, libnl3 does not have a pkgconfig .pc file for its dev
> > headers. So there is no standard way to check for these headers.
> > Debian has libnl-3-dev. OpenSUSE has libnl3-devel, etc.
>
> I think you are confused about what pkg-config and .pc files are.
>
> They are part of the "dev headers" and describe how to compile and link
> against the library. You are entitled to assume that if pkg-config
> returns that the pkg exists you can use it and link against it etc.
>
> IOW the .pc file is exactly the standard way to check for these things.
>
>
I am a little confused. I do know that if pkg exists, then
linking/compiling isn't an issue.

The issue with libnl3 is "compiling" - i.e., dev headers, that libxl uses
to invoke libnl API.
There is no pkg-config module for libnl3 development headers (Just like the
ones for
libraries: libnl-3.0, libnl-route-3.0, etc) [see
http://git.infradead.org/users/tgr/libnl.git/tree ]

It has package config files for libnl-3.0.pc (-lnl-3), libnl-route-3.0.pc
(-lnl-route-3)
but none for dev headers.

Do they get installed along with the libraries ? Don't think so (atleast on
debian & ubuntu).

root@localhost:~# apt-cache search libnl
libnl-3-200 - library for dealing with netlink sockets
libnl-3-dev - development library and headers for libnl-3
libnl-cli-3-200 - library for dealing with netlink sockets - cli helpers
libnl-cli-3-dev - development library and headers for libnl-cli-3
libnl-route-3-200 - library for dealing with netlink sockets - route
interface
libnl-route-3-dev - development library and headers for libnl-route-3


So what do you suggest ?

 >         > +         AC_SUBST(remus_netbuf, [n])
> >         > +         ],[
> >         > +         LIBNL3_LIBS="-lnl-3 -lnl-route-3"
> >
> >
> >         Since libnl3 uses pkg-cofnig, these should come from there I
> >         think.
> >         There's probably a macro in pkg-config.m4 to help?
>
> > None that I could find.
>
> Looks like PKG_CHECK_MODULES sets <PKG>_CFLAGS and _LDFLAGS.
>
> See
>
> https://www.flameeyes.eu/autotools-mythbuster/pkgconfig/pkg_check_modules.htmland
> https://developer.gnome.org/anjuta-build-tutorial/stable/library-autotools.html.enfor info (first two hits on google for "pkg-config autoconf")
>
> Ian.
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 4644 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-10-09 16:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 22:16 [PATCH 0 of 5 V2] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-08-29 22:16 ` [PATCH 1 of 5 V2] remus: add libnl3 dependency to autoconf scripts Shriram Rajagopalan
2013-09-04 13:40   ` Ian Campbell
2013-10-09  2:14     ` Shriram Rajagopalan
2013-10-09  8:06       ` Ian Campbell
2013-10-09 16:27         ` Shriram Rajagopalan [this message]
2013-10-09 16:36           ` Ian Campbell
2013-08-29 22:16 ` [PATCH 2 of 5 V2] tools/hotplug: Remus network buffering setup scripts Shriram Rajagopalan
2013-09-04 13:50   ` Ian Campbell
2013-08-29 22:16 ` [PATCH 3 of 5 V2] tools/libxl: setup/teardown Remus network buffering Shriram Rajagopalan
2013-09-04 15:17   ` Ian Campbell
2013-10-14 14:23     ` Shriram Rajagopalan
2013-10-15 10:34       ` Ian Campbell
2013-09-04 16:16   ` Ian Jackson
2013-09-04 17:22     ` Shriram Rajagopalan
2013-10-09 16:32       ` Shriram Rajagopalan
2013-10-14 16:30         ` [PATCH] libxl: Deprecate synchronous waiting for the device model Ian Jackson
2013-11-04 16:50           ` Ian Campbell
2013-11-04 17:03             ` Ian Jackson
2013-11-12 16:58               ` [PATCH RESEND] " Ian Jackson
2013-11-12 17:25                 ` Ian Campbell
2013-11-12 17:27                   ` Ian Jackson
2013-10-14 16:34         ` [PATCH 3 of 5 V2] tools/libxl: setup/teardown Remus network buffering [and 1 more messages] Ian Jackson
2013-08-29 22:16 ` [PATCH 4 of 5 V2] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-09-04 15:19   ` Ian Campbell
2013-09-05 11:25   ` Ian Jackson
2013-08-29 22:16 ` [PATCH 5 of 5 V2] tools/xl: Remus - Network buffering cmdline switch Shriram Rajagopalan
2013-09-04 15:24   ` Ian Campbell
2013-09-04 13:21 ` [PATCH 0 of 5 V2] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-09-04 13:27   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP8mzPM9i65XdyPNmksZzfbyZog+ZgAiy3v0sOT6xJjMs=jf0g@mail.gmail.com' \
    --to=rshriram@cs.ubc.ca \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).