All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix
Date: Mon, 14 May 2012 10:51:31 +0100	[thread overview]
Message-ID: <4FB0D5A3.9000304@citrix.com> (raw)
In-Reply-To: <20397.16177.826755.879002@mariner.uk.xensource.com>

Ian Jackson escribió:
> Roger Pau Monne writes ("[Xen-devel] [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix"):
>> NetBSD `python-conf --ldflags` doesn't return the library dir, so we
>> have to add it to LDFLAGS based on the prefix returned by `python-conf
>> --prefix`. Also the include dir has been added to CFLAGS using the
>> same technique.
> ...
>>       dnl If python-config is found use it
>> -    CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
>> -    LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
>> +    ac_python_prefix=`$PYTHON-config --prefix`
>> +    CPPFLAGS="$CFLAGS `$PYTHON-config --cflags` -I$ac_python_prefix/include"
>> +    LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags` -L$ac_python_prefix/lib"
>
> Shouldn't the -I and particulary the -L come first ?

According to man ld (from Debian):

"All -L options apply to all -l options, regardless of the order in 
which the options appear."

So it should be ok to specify -L after -l.

> TBH I'm
> surprised that this works since it looks like it ought to generate
>     -lpython2.6 -L/usr/blah/lib/bleh/python2.6
> or something, which I wouldn't expect to work.

python-config --prefix on the systems I've tested (that's NetBSD and 
Debian) returns the prefix path used for install, that's /usr on Debian 
and /usr/pkg on NetBSD.

Anyway, forget about this patch, a latter patch 3/3, fixes the library 
path search, so it's just easier to pass APPEND_LIB=/usr/pkg/lib to 
configure rather than touching the python_dev code.

  reply	other threads:[~2012-05-14  9:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 14:13 [PATCH 0/3] Minor fixes to the build system for NetBSD Roger Pau Monne
2012-05-11 14:13 ` [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix Roger Pau Monne
2012-05-11 16:32   ` Ian Jackson
2012-05-14  9:51     ` Roger Pau Monne [this message]
2012-05-14 14:08       ` Ian Jackson
2012-05-11 14:13 ` [PATCH 2/3] build/tools: disable libvchan build on NetBSD Roger Pau Monne
2012-05-16 15:35   ` Christoph Egger
2012-06-08 15:22     ` Ian Jackson
2012-06-18 10:08       ` Roger Pau Monne
2012-06-18 10:38         ` Christoph Egger
2012-06-18 10:46         ` Roger Pau Monne
2012-05-11 14:13 ` [PATCH 3/3] autoconf: correctly parse *_INCLUDES and *_LIB env vars Roger Pau Monne
2012-06-08 15:22   ` Ian Jackson
2012-06-12 12:02     ` Roger Pau Monne
2012-06-26 16:32       ` Roger Pau Monne

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=4FB0D5A3.9000304@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Jackson@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.