pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
11+ messages / 6 participants
[nested] [flat]

* Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
@ 2010-09-11 17:12 Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Lou Picciano @ 2010-09-11 17:12 UTC (permalink / raw)
  To: pgsql-testers

[TEST REPORT]
[Release]: 9.0 RC1
[Test Type]: Install (Build)
[Test]: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
[Platform]: Solaris 10 Sparc E450 Quad
[Parameters]: 
--with-python \
--with-includes=/usr/local/include/python3.1:/usr/local/include:/usr/local/ssl/include \
--with-libraries=/usr/local/lib/python3.1:/usr/local/lib:/usr/local/ssl/lib \
CONFIGURE OUTPUT: -----------------------------------------
checking for python... /usr/bin/python
checking Python configuration directory... /usr/lib/python2.4/config
checking how to link an embedded Python application... -L/usr/lib -lpython2.4 -lresolv -lsocket -lnsl -lrt -ldl -lm
configure: using CPPFLAGS= -I/usr/local/include/libxml2  -I/usr/local/include/python3.1 -I/usr/local/include -I/usr/local/ssl/include
configure: using LDFLAGS= -L/usr/local/lib  -L/usr/local/lib/python3.1
[Failure]: Can't seem to definitively config PG to a specific version of python - v3.1, at /usr/local/bin/python3
[Results]: configure seems to pick up python 2.4 configuration, but apparently links to (desired) python 3.1 libs.
# ldd plpython2.so
        libpython2.4.so.1.0 =>   /usr/lib/libpython2.4.so.1.0
[Comments]: Tried first to see if configure picks up the PYTHONPATH env variable to find python's configuration.  No joy.  Using this variable might be a reasonable approach for configure?=

^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
@ 2010-09-11 21:36 ` Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  0 siblings, 1 reply; 11+ messages in thread

From: Josh Berkus @ 2010-09-11 21:36 UTC (permalink / raw)
  To: pgsql-testers@postgresql.org, James Pye <lists@jwp.name>


> *[Comments]:* Tried first to see if configure picks up the PYTHONPATH
> env variable to find python's configuration. No joy. Using this variable
> might be a reasonable approach for configure?

I'm pretty sure this was hashed out on hackers, and turned out to be an 
issue with Python and not our fault.  James?

(forwarding James the whole issue report)

-- 
                                   -- Josh Berkus
                                      PostgreSQL Experts Inc.
                                      http://www.pgexperts.com



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
@ 2010-09-11 22:16   ` James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 11+ messages in thread

From: James William Pye @ 2010-09-11 22:16 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-testers

On Sep 11, 2010, at 2:36 PM, Josh Berkus wrote:
>> *[Comments]:* Tried first to see if configure picks up the PYTHONPATH
>> env variable to find python's configuration. No joy. Using this variable
>> might be a reasonable approach for configure?
> 
> I'm pretty sure this was hashed out on hackers, and turned out to be an issue with Python and not our fault.  James?

Nah, this isn't a Python issue. It's our configure script.


I think the problem you're recalling was the discussion of having two libpython's loaded in the same backend process.


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
@ 2010-09-11 23:11     ` Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  0 siblings, 1 reply; 11+ messages in thread

From: Josh Berkus @ 2010-09-11 23:11 UTC (permalink / raw)
  To: James William Pye <lists@jwp.name>; +Cc: pgsql-testers


>> I'm pretty sure this was hashed out on hackers, and turned out to be an issue with Python and not our fault.  James?
>
> Nah, this isn't a Python issue. It's our configure script.

So, is this a bug?  Should we be fixing it before release?


-- 
                                   -- Josh Berkus
                                      PostgreSQL Experts Inc.
                                      http://www.pgexperts.com



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
@ 2010-09-12 00:07       ` James William Pye <lists@jwp.name>
  2010-09-12 22:23         ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 11+ messages in thread

From: James William Pye @ 2010-09-12 00:07 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-testers

On Sep 11, 2010, at 4:11 PM, Josh Berkus wrote:
> So, is this a bug?  Should we be fixing it before release?


Yes to both.



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
@ 2010-09-12 22:23         ` Josh Berkus <josh@agliodbs.com>
  2010-09-13 02:51           ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  0 siblings, 1 reply; 11+ messages in thread

From: Josh Berkus @ 2010-09-12 22:23 UTC (permalink / raw)
  To: James William Pye <lists@jwp.name>; +Cc: pgsql-testers

James,

> On Sep 11, 2010, at 4:11 PM, Josh Berkus wrote:
>> So, is this a bug?  Should we be fixing it before release?
> 
> 
> Yes to both.

Hmmm.  Tom Lane says "pilot error" because there are two versions of
Python in the path.  Specifically:

"In particular, how'd those 3.1 references get in there when the python
version in $PATH is 2.4? It's for damn sure we didn't introduce those."

If Tom is incorrect, please take up the thread on -BUGS.  I don't know
enough about python libs in builds to argue either way.

-- 
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-12 22:23         ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
@ 2010-09-13 02:51           ` James William Pye <lists@jwp.name>
  2010-09-13 03:19             ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: James William Pye @ 2010-09-13 02:51 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-testers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>; Lou Picciano <loupicciano@comcast.net>

On Sep 12, 2010, at 3:23 PM, Josh Berkus wrote:
> Hmmm.  Tom Lane says "pilot error" because there are two versions of
> Python in the path.  Specifically:

ugh, :(

Yeah, that's correct:

--with-python \
--with-includes=/usr/local/include/python3.1:/usr/local/include:/usr/local/ssl/include 
--with-libraries=/usr/local/lib/python3.1:/usr/local/lib:/usr/local/ssl/lib


I was drawing from some trickiness I experienced getting my plpy vs plpython test rig going.
I think it kept favoring python2 when I wanted python3 as both were in $PATH.

IIRC, what he needs to do is remove the python2 bin-directory from the PATH in order to get 3.x selected by configure. Seems less than user friendly...


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-12 22:23         ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-13 02:51           ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
@ 2010-09-13 03:19             ` Tom Lane <tgl@sss.pgh.pa.us>
  2010-09-13 03:26               ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-14 00:16               ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Bill Weinman <wew@bearnet.com>
  0 siblings, 2 replies; 11+ messages in thread

From: Tom Lane @ 2010-09-13 03:19 UTC (permalink / raw)
  To: James William Pye <lists@jwp.name>; +Cc: Josh Berkus <josh@agliodbs.com>; pgsql-testers@postgresql.org, Lou Picciano <loupicciano@comcast.net>

James William Pye <lists@jwp.name> writes:
> I think it kept favoring python2 when I wanted python3 as both were in $PATH.

AFAICS, it'll pick whichever version is executed when you say "python".
Doesn't seem like an unreasonable behavior to me.

You may well need to adjust $PATH before running configure.  I wouldn't
recommend hacking --with-includes or --with-libraries at all, though;
we find out what directories to use by asking "python".

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-12 22:23         ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-13 02:51           ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-13 03:19             ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-09-13 03:26               ` James William Pye <lists@jwp.name>
  1 sibling, 0 replies; 11+ messages in thread

From: James William Pye @ 2010-09-13 03:26 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Josh Berkus <josh@agliodbs.com>; pgsql-testers@postgresql.org, Lou Picciano <loupicciano@comcast.net>

On Sep 12, 2010, at 8:19 PM, Tom Lane wrote:

> James William Pye <lists@jwp.name> writes:
>> I think it kept favoring python2 when I wanted python3 as both were in $PATH.
> 
> AFAICS, it'll pick whichever version is executed when you say "python".
> Doesn't seem like an unreasonable behavior to me.

Perhaps reasonable, but:

jwp@torch[]:python/release31-maint/Include 0% ls /src/build/py32pg90/bin/py*
/src/build/py32pg90/bin/pydoc3			/src/build/py32pg90/bin/python3-config		/src/build/py32pg90/bin/python3.2-config
/src/build/py32pg90/bin/python3			/src/build/py32pg90/bin/python3.2

3.x doesn't have a "python" link by default, so the user will have to make one in order to get ./configure to select it.


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
  2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
  2010-09-11 21:36 ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-11 22:16   ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-11 23:11     ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-12 00:07       ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-12 22:23         ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Josh Berkus <josh@agliodbs.com>
  2010-09-13 02:51           ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment James William Pye <lists@jwp.name>
  2010-09-13 03:19             ` Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Tom Lane <tgl@sss.pgh.pa.us>
@ 2010-09-14 00:16               ` Bill Weinman <wew@bearnet.com>
  1 sibling, 0 replies; 11+ messages in thread

From: Bill Weinman @ 2010-09-14 00:16 UTC (permalink / raw)
  To: pgsql-testers

On 2010-09-12 8:19 PM, Tom Lane wrote:
> AFAICS, it'll pick whichever version is executed when you say "python".
> Doesn't seem like an unreasonable behavior to me.

I would argue that this is not reasonable behavior.

Because most current *NIX systems depend on python 2 for system scripts, 
the only way to reasonably use python 3 is to install it in addition to, 
not instead of, python 2. So most systems with python 3 will run python 
2 when you say "python" and python 3 when you say "python3".

For example, on my Mac running OSX 10.6.4 ...

   $ python -V
   Python 2.6.1

   $ python3 -V
   Python 3.1.1

-- 

Bill Weinman
- Online training: http://bw.org/u/l01

Follow Bill:
- Web: http://bw.org/
- Facebook: http://bw.org/u/fb01
- Linked In: http://bw.org/u/li01
- Twitter: http://bw.org/u/tw01



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment
@ 2010-09-13 01:20 Lou Picciano <loupicciano@comcast.net>
  0 siblings, 0 replies; 11+ messages in thread

From: Lou Picciano @ 2010-09-13 01:20 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: pgsql-testers@postgresql.org, James William Pye <lists@jwp.name>

I would be willing to accept the 'pilot error' tag (I have no instrument rating in this type), but... 


Isn't it common to have multiple versions of libs in an environment? We have several versions of many things, used in different settings - often specifically for purposes of version testing. For example, we kept the python2.4 implementation because we have some code which (we believe) may depend on it. By the way, we have no immediate interest in pl/Python; this compilation attempt was only for testing purposes... 


Yes, the 2.4 version of python is found first in our PATH environment. What seems strange in this case, though, is that - apparently? - no combination of configure options or env variables lets us designate one version consistently. The configure script is itself mixing versions: 





--with-python \ 

--with-includes=/usr/local/include/python3.1:/usr/local/include:/usr/local/ssl/include \ 

--with-libraries=/usr/local/lib/python3.1:/usr/local/lib:/usr/local/ssl/lib \ 


Setting env PYTHON or PYTHONPATH didn't seem to have any impact. 


We are also not such python mavens as to be anything near expert with it... 


- Lou Picciano 

----- Original Message ----- 
From: "Josh Berkus" <josh@agliodbs.com> 
To: "James William Pye" <lists@jwp.name> 
Cc: pgsql-testers@postgresql.org 
Sent: Sunday, September 12, 2010 6:23:23 PM 
Subject: Re: [TESTERS] Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment 

James, 

> On Sep 11, 2010, at 4:11 PM, Josh Berkus wrote: 
>> So, is this a bug? Should we be fixing it before release? 
> 
> 
> Yes to both. 

Hmmm. Tom Lane says "pilot error" because there are two versions of 
Python in the path. Specifically: 

"In particular, how'd those 3.1 references get in there when the python 
version in $PATH is 2.4? It's for damn sure we didn't introduce those." 

If Tom is incorrect, please take up the thread on -BUGS. I don't know 
enough about python libs in builds to argue either way. 

-- 
-- Josh Berkus 
PostgreSQL Experts Inc. 
http://www.pgexperts.com 
- 
HOWTO Alpha/Beta Test: 
http://wiki.postgresql.org/wiki/HowToBetaTest 
To make changes to your subscription: 
http://www.postgresql.org/mailpref/pgsql-testers 

^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2010-09-14 00:16 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11 17:12 Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <LouPicciano@comcast.net>
2010-09-11 21:36 ` Josh Berkus <josh@agliodbs.com>
2010-09-11 22:16   ` James William Pye <lists@jwp.name>
2010-09-11 23:11     ` Josh Berkus <josh@agliodbs.com>
2010-09-12 00:07       ` James William Pye <lists@jwp.name>
2010-09-12 22:23         ` Josh Berkus <josh@agliodbs.com>
2010-09-13 02:51           ` James William Pye <lists@jwp.name>
2010-09-13 03:19             ` Tom Lane <tgl@sss.pgh.pa.us>
2010-09-13 03:26               ` James William Pye <lists@jwp.name>
2010-09-14 00:16               ` Bill Weinman <wew@bearnet.com>
2010-09-13 01:20 Re: Configure/Build 9.0 rc1 - cannot build against python3.1, with two versions of python in the environment Lou Picciano <loupicciano@comcast.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox