Re: x86_64 configure problem

Lists: pgsql-hackerspgsql-patches
From: Joe Conway <mail(at)joeconway(dot)com>
To: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: x86_64 configure problem
Date: 2004-09-09 18:17:36
Message-ID: 41409E40.4020504@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On an x86_64 machine I'm finding that I cannot configure --with-python
without the attached patch. Undoubtedly there is a better way to fix
this -- any suggestions?

Another configure issue: I find that --enable-depend breaks parallel builds:

make -j 2
[...]
make[3]: Entering directory
`/opt/src/pgsql-cvs/pgsql-8.0/src/backend/utils/mb/conversion_procs/euc_tw_and_big5'
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
-Wmissing-declarations -fpic -I../../../../../../src/include
-D_GNU_SOURCE -I/usr/include/et -c -o big5.o big5.c -MMD
gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes
-Wmissing-declarations -fpic -I../../../../../../src/include
-D_GNU_SOURCE -I/usr/include/et -c -o euc_tw_and_big5.o
euc_tw_and_big5.c -MMD
mkdir: cannot create directory `.deps': File exists
make[3]: *** [big5.o] Error 1
make[3]: *** Deleting file `big5.o'
make[3]: *** Waiting for unfinished jobs....
make[3]: *** Waiting for unfinished jobs....
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/opt/src/pgsql-cvs/pgsql-8.0/src/backend/utils/mb/conversion_procs/euc_tw_and_big5'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/opt/src/pgsql-cvs/pgsql-8.0/src/backend/utils/mb/conversion_procs'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/src/pgsql-cvs/pgsql-8.0/src'
make: *** [all] Error 2

Any ideas about how to fix this?

Thanks,

Joe

Attachment Content-Type Size
current.80.diff text/x-patch 1.5 KB

From: James William Pye <flaw(at)rhid(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-09 19:28:53
Message-ID: 1094758132.487.107.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, 2004-09-09 at 11:17, Joe Conway wrote:
> On an x86_64 machine I'm finding that I cannot configure --with-python
> without the attached patch. Undoubtedly there is a better way to fix
> this -- any suggestions?

python_configdir=`${PYTHON} -c "from distutils.sysconfig import
get_python_lib as f; import os; print os.path.join(f(plat_specific=1,
standard_lib=1),'config')"`

That should work, regardless of the lib directory that Python is
installed to.
(at least it works on my system):

flaw(at)void:~ % py -c "from distutils.sysconfig import get_python_lib as
f; import os; print
os.path.join(f(plat_specific=1,standard_lib=1),'config')"
/usr/local/lib/python2.3/config

--
Regards,
James William Pye


From: James William Pye <flaw(at)rhid(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-09 20:14:23
Message-ID: 1094760863.487.146.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Thu, 2004-09-09 at 12:28, James William Pye wrote:
> That should work, regardless of the lib directory that Python is
> installed to.

Looking at get_python_lib(), I'm not so sure that I'm correct:

if os.name == "posix":
libpython = os.path.join(prefix,
"lib", "python" + get_python_version())

Although, I'm getting a bit confused. I just compiled and installed
Python(CVS) configured as:

./configure --prefix=/usr/dev --libdir=/usr/dev/pylib

But it didn't install anything in /usr/dev/pylib, as one would expect.
It just threw everything in /usr/dev/lib. I even gmake'd distclean to
make sure there wasn't some configure option cache of some sort. Same
thing.

ISTM that Python's libdir wasn't meant to be located anywhere other than
EPREFIX/lib.

--
Regards,
James William Pye


From: Joe Conway <mail(at)joeconway(dot)com>
To: James William Pye <flaw(at)rhid(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-09 20:30:29
Message-ID: 4140BD65.2090906@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

James William Pye wrote:
> Looking at get_python_lib(), I'm not so sure that I'm correct:
>

It does seem to work for me:

# python -c "from distutils.sysconfig import get_python_lib as f; import
os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"
/usr/lib64/python2.3/config

Any other proposals? If not, any objections to the attached patch?

Joe

Attachment Content-Type Size
current.80.diff text/x-patch 1.4 KB

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Clarification of action on Delete
Date: 2004-09-09 21:30:27
Message-ID: NOEFLCFHBPDAFHEIPGBOIEBOCEAA.simon@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches


I've just been asked to clarify what actually happens when a DELETE takes
place, and what happens to TOASTed data. The MVCC never-update-in-place
phrase caused some debate over what happens. I couldn't find a specific and
conclusive comment on this that I trust to be completely up to date. One may
exist however....?

My answer was this, though this was not thought accurate (on the DELETE
aspect):
For DELETEs, the xmax field on the tuple/row header is updated-in-place to
show the xid that deleted the row. Thus, DELETEs of long data rows are just
as efficient as DELETEs of shorter data rows, since both effect only a
single data page. This still allows concurrent access because only one
backend may hold the page lock at any time, so nobody is actively reading
the row at the time of the setting of xmax for the DELETE.

MVCC uses a never-update-in-place algorithm to allow concurrency during
UPDATEs. In general, the whole row is re-written, just as if the data had
been DELETEd and then re-INSERTed. If there are TOASTed fields, then the
TOASTed data is only re-written if it is has changed as part of the UPDATE.
Thus an UPDATE of a row with TOASTed data, yet that doesn't alter the
TOASTed data itself, is no more expensive than an UPDATE of a shorter row,
since it will change only one page (with an equal risk of requiring a new
block write as a result of the insertion of the new main row version).

DELETE does NOT take a full copy of the row and THEN mark the xmax field as
the xid of the deleting transaction, so is NOT similar to an UPDATE action
on the same row.

I've checked heapam.c and tuptoaster.c, and think this is correct.

Any differing views? If possible, please refer me to the code - I'm still
working my way around the heap access code, so feel free to show me the
light...

Best regards, Simon Riggs


From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Clarification of action on Delete
Date: 2004-09-09 21:40:41
Message-ID: 87wtz3t92e.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches


"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:

> I've just been asked to clarify what actually happens when a DELETE takes
> place, and what happens to TOASTed data.

What does this have to do with "x86_64 configure problem"?

--
greg


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification of action on Delete
Date: 2004-09-09 21:49:44
Message-ID: 10892.1094766584@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> My answer was this, though this was not thought accurate (on the DELETE
> aspect):

This is correct as far as it goes, but given the question I imagine some
further detail is appropriate:

* When deleting a row that has out-of-line-toasted fields, we must also
find the TOAST row(s) for those fields and mark them deleted. So it is
not strictly true that deleting a wide row has the same cost as deleting
a narrow one: you will have to touch all the pages containing TOAST data
as well.

* UPDATE is indeed basically equivalent to a DELETE and INSERT, with the
sole optimization being that we carry over any unchanged toasted fields.
So in particular, any changed toasted fields will need to be marked
deleted in the TOAST table.

It would be nice to push the TOAST deletions off to become the
responsibility of VACUUM, but I'm not entirely sure how to do that
without giving up the UPDATE optimization of shared values.

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification of action on Delete
Date: 2004-09-09 22:10:23
Message-ID: 11108.1094767823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>> Tom Lane wrote
>> It would be nice to push the TOAST deletions off to become the
>> responsibility of VACUUM, but I'm not entirely sure how to do that
>> without giving up the UPDATE optimization of shared values.

> That could be optimised, but there are advantages to removing TOASTed values
> immediately since they are potentially big space hogs, so I'm actually glad
> to hear that it works that way.

Well, they certainly aren't going to be *removed* immediately; we
couldn't roll back the deletion if we did. The physical removal
will happen during VACUUM, same as for ordinary table rows. So there's
not really any functional reason why we couldn't have VACUUM do the
marking for removal too, except that it does not know when looking at
the deleted table row whether the toast entries are shared with other
versions of the row.

regards, tom lane


From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clarification of action on Delete
Date: 2004-09-09 22:11:22
Message-ID: NOEFLCFHBPDAFHEIPGBOIECECEAA.simon@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

> Tom Lane wrote
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > My answer was this, though this was not thought accurate (on the DELETE
> > aspect):
>
> This is correct as far as it goes, but given the question I imagine some
> further detail is appropriate:
>
> * When deleting a row that has out-of-line-toasted fields, we must also
> find the TOAST row(s) for those fields and mark them deleted. So it is
> not strictly true that deleting a wide row has the same cost as deleting
> a narrow one: you will have to touch all the pages containing TOAST data
> as well.
>
> * UPDATE is indeed basically equivalent to a DELETE and INSERT, with the
> sole optimization being that we carry over any unchanged toasted fields.
> So in particular, any changed toasted fields will need to be marked
> deleted in the TOAST table.
>

Thanks!

> It would be nice to push the TOAST deletions off to become the
> responsibility of VACUUM, but I'm not entirely sure how to do that
> without giving up the UPDATE optimization of shared values.
>

That could be optimised, but there are advantages to removing TOASTed values
immediately since they are potentially big space hogs, so I'm actually glad
to hear that it works that way.

Best Regards, Simon Riggs


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: x86_64 configure problem
Date: 2004-09-10 00:06:41
Message-ID: 4140F011.5010301@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:
> James William Pye wrote:
>
>> Looking at get_python_lib(), I'm not so sure that I'm correct:
>>
>
> It does seem to work for me:
>
> # python -c "from distutils.sysconfig import get_python_lib as f; import
> os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"
> /usr/lib64/python2.3/config
>
> Any other proposals? If not, any objections to the attached patch?

No one, we have to check also for the presence of distutils package installation.
It's not installed by default and I was bitten by it during the RPM building for
RH AS 2.1

Regards
Gaetano Mendola


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: Clarification of action on Delete
Date: 2004-09-10 00:10:08
Message-ID: 4140F0E0.4010606@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Greg Stark wrote:

> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>
>
>>I've just been asked to clarify what actually happens when a DELETE takes
>>place, and what happens to TOASTed data.
>
>
> What does this have to do with "x86_64 configure problem"?

I believe this was a new thread but Outlook or the new server had a glitch.

Regards
Gaetano Mendola


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Clarification of action on Delete
Date: 2004-09-10 01:01:54
Message-ID: 20040910010154.GB7609@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Fri, Sep 10, 2004 at 02:10:08AM +0200, Gaetano Mendola wrote:
> Greg Stark wrote:
>
> >"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> >
> >
> >>I've just been asked to clarify what actually happens when a DELETE takes
> >>place, and what happens to TOASTed data.
> >
> >What does this have to do with "x86_64 configure problem"?
>
> I believe this was a new thread but Outlook or the new server had a glitch.

No, Simon used another thread. The Reply-To: header was present.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Uno combate cuando es necesario... ¡no cuando está de humor!
El humor es para el ganado, o para hacer el amor, o para tocar el
baliset. No para combatir." (Gurney Halleck)


From: Joe Conway <mail(at)joeconway(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-10 22:19:35
Message-ID: 41422877.9060509@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Gaetano Mendola wrote:
> Joe Conway wrote:
>> # python -c "from distutils.sysconfig import get_python_lib as f;
>> import os; print
>> os.path.join(f(plat_specific=1,standard_lib=1),'config')"
>> /usr/lib64/python2.3/config
>>
>> Any other proposals? If not, any objections to the attached patch?
>
> No one, we have to check also for the presence of distutils package
> installation.
> It's not installed by default and I was bitten by it during the RPM
> building for
> RH AS 2.1

What version of python comes with RH2.1?

In any case, the online documentation for python suggests that it is
reasonable to expect that distutils is already installed (by default for
python >= 1.6, and by the user for python 1.5.2). See:
http://www.python.org/doc/2.2.3/dist/intro.html

If there are no other objections, I'll commit the attached in about 24
hours.

Thanks,

Joe

Attachment Content-Type Size
current.80.diff text/x-patch 1.4 KB

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 18:23:21
Message-ID: 41434299.3070106@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:

> Gaetano Mendola wrote:
>
>> Joe Conway wrote:
>>
>>> # python -c "from distutils.sysconfig import get_python_lib as f;
>>> import os; print
>>> os.path.join(f(plat_specific=1,standard_lib=1),'config')"
>>> /usr/lib64/python2.3/config
>>>
>>> Any other proposals? If not, any objections to the attached patch?
>>
>>
>> No one, we have to check also for the presence of distutils package
>> installation.
>> It's not installed by default and I was bitten by it during the RPM
>> building for
>> RH AS 2.1
>
>
> What version of python comes with RH2.1?

1.5.2

> In any case, the online documentation for python suggests that it is
> reasonable to expect that distutils is already installed (by default for
> python >= 1.6, and by the user for python 1.5.2). See:
> http://www.python.org/doc/2.2.3/dist/intro.html
>
> If there are no other objections, I'll commit the attached in about 24
> hours.

Are you going also to change the configure so it will check the distutils
package installation ?

Regards
Gaetano Mendola


From: Joe Conway <mail(at)joeconway(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 19:14:57
Message-ID: 41434EB1.9030901@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Gaetano Mendola wrote:
> Joe Conway wrote:
>> What version of python comes with RH2.1?
>
> 1.5.2
>
>> In any case, the online documentation for python suggests that it is
>> reasonable to expect that distutils is already installed (by default
>> for python >= 1.6, and by the user for python 1.5.2). See:
>> http://www.python.org/doc/2.2.3/dist/intro.html
>>
>> If there are no other objections, I'll commit the attached in about 24
>> hours.
>
> Are you going also to change the configure so it will check the distutils
> package installation ?

I wasn't going to -- python's own docs say I shouldn't need to. From the
link above:

"the Distutils work just fine with Python 1.5.2, and it is reasonable
(and expected to become commonplace) to expect users of Python 1.5.2 to
download and install the Distutils separately before they can install
your modules"

Joe


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 20:57:47
Message-ID: 414366CB.5070800@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:
> Gaetano Mendola wrote:
>
>> Joe Conway wrote:
>>
>>> What version of python comes with RH2.1?
>>
>>
>> 1.5.2
>>
>>> In any case, the online documentation for python suggests that it is
>>> reasonable to expect that distutils is already installed (by default
>>> for python >= 1.6, and by the user for python 1.5.2). See:
>>> http://www.python.org/doc/2.2.3/dist/intro.html
>>>
>>> If there are no other objections, I'll commit the attached in about
>>> 24 hours.
>>
>>
>> Are you going also to change the configure so it will check the distutils
>> package installation ?
>
>
> I wasn't going to -- python's own docs say I shouldn't need to. From the
> link above:
>
> "the Distutils work just fine with Python 1.5.2, and it is reasonable
> (and expected to become commonplace) to expect users of Python 1.5.2 to
> download and install the Distutils separately before they can install
> your modules"

I'm not native english speakers but that sentence above doesn't imply
Python 1.5.2 => Distutils. So instead of an error like this:

checking Python installation directories... Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: No module named distutils
Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: No module named distutils
/usr/
checking how to link an embedded Python application... no
configure: error: Python Makefile not found
error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)

is better have:

Error: you need to have Distutil installed

Regards
Gaetano Mendola


From: Joe Conway <mail(at)joeconway(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 21:05:44
Message-ID: 414368A8.5060308@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Gaetano Mendola wrote:
> Joe Conway wrote:
>> I wasn't going to -- python's own docs say I shouldn't need to. From
>> the link above:
>>
>> "the Distutils work just fine with Python 1.5.2, and it is reasonable
>> (and expected to become commonplace) to expect users of Python 1.5.2
>> to download and install the Distutils separately before they can
>> install your modules"
>
> I'm not native english speakers but that sentence above doesn't imply
> Python 1.5.2 => Distutils. So instead of an error like this:
>
> checking Python installation directories... Traceback (innermost last):
> File "<string>", line 1, in ?
> ImportError: No module named distutils
> Traceback (innermost last):
> File "<string>", line 1, in ?
> ImportError: No module named distutils
> /usr/
> checking how to link an embedded Python application... no
> configure: error: Python Makefile not found
> error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)
>
> is better have:
>
> Error: you need to have Distutil installed

Perhaps. The first error message seems clear enough to me, but if you
want to send me the necessary distutils test, I can incorporate it. Any
other opinions out there?

Joe


From: James William Pye <flaw(at)rhid(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 21:53:12
Message-ID: 1094939591.5507.27.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

On Sat, 2004-09-11 at 14:05, Joe Conway wrote:
> Perhaps. The first error message seems clear enough to me, but if you
> want to send me the necessary distutils test, I can incorporate it. Any
> other opinions out there?

AC_MSG_CHECKING([for Python distutils module])
if "${PYTHON}" 2>&- -c 'import distutils'
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([distutils module not found])
fi

That should work.

While I'm of the opinion that installations without distutils are
antiquated, I see no reason why we couldn't check for it anyways.
(Gaetano requested it so there would probably be others who would
appreciate it.)

--
Regards,
James William Pye


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: x86_64 configure problem
Date: 2004-09-11 22:06:56
Message-ID: 41437700.1080101@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:

> Gaetano Mendola wrote:
>
>> Joe Conway wrote:
>>
>>> I wasn't going to -- python's own docs say I shouldn't need to. From
>>> the link above:
>>>
>>> "the Distutils work just fine with Python 1.5.2, and it is reasonable
>>> (and expected to become commonplace) to expect users of Python 1.5.2
>>> to download and install the Distutils separately before they can
>>> install your modules"
>>
>>
>> I'm not native english speakers but that sentence above doesn't imply
>> Python 1.5.2 => Distutils. So instead of an error like this:
>>
>> checking Python installation directories... Traceback (innermost last):
>> File "<string>", line 1, in ?
>> ImportError: No module named distutils
>> Traceback (innermost last):
>> File "<string>", line 1, in ?
>> ImportError: No module named distutils
>> /usr/
>> checking how to link an embedded Python application... no
>> configure: error: Python Makefile not found
>> error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)
>>
>> is better have:
>>
>> Error: you need to have Distutil installed
>
>
> Perhaps. The first error message seems clear enough to me, but if you
> want to send me the necessary distutils test, I can incorporate it. Any
> other opinions out there?

python -c "from distutils import *" > /dev/null 2>&1 || (echo "You need distutils installed"; exit 1)

Regards
Gaetano Mendola


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>, Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: x86_64 configure problem
Date: 2004-09-12 20:21:25
Message-ID: 200409122221.25900.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:
> Perhaps. The first error message seems clear enough to me, but if you
> want to send me the necessary distutils test, I can incorporate it.
> Any other opinions out there?

It looks like a waste of space and time to me. We can't really check
for everything, let alone preconditions of what we're really interested
in. We want to find the Python makefile, so let's look for that. The
error message if it's not found is perfectly clear.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: x86_64 configure problem
Date: 2004-09-12 21:22:52
Message-ID: 4144BE2C.2050006@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut wrote:
> Joe Conway wrote:
>
>>Perhaps. The first error message seems clear enough to me, but if you
>>want to send me the necessary distutils test, I can incorporate it.
>>Any other opinions out there?
>
>
> It looks like a waste of space and time to me.

Are you serious ? May you quantify the space and the time lost ?

> The error message if it's not found is perfectly clear.

Is it ?
The error say "no modules named distutils", is the module an external
one that I need to have installed or is a bogus error due the previous
line: File "<string>", line 1, in ?

And most of all why when I wrote about the inability to create the RPM for
RH2.1 no one wrote: you need to install the distutils package, after
having seen this error:

checking Python installation directories... Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: No module named distutils
Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: No module named distutils
/usr/
checking how to link an embedded Python application... no
configure: error: Python Makefile not found
error: Bad exit status from /var/tmp/rpm-tmp.56347 (%build)

may be because the message after all is not concise.

Regards
Gaetano Mendola


From: Joe Conway <mail(at)joeconway(dot)com>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, James William Pye <flaw(at)rhid(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: x86_64 configure problem
Date: 2004-09-15 20:44:46
Message-ID: 4148A9BE.80705@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Gaetano Mendola wrote:
> python -c "from distutils import *" > /dev/null 2>&1 || (echo "You need
> distutils installed"; exit 1)
>

Sorry for the delay -- things got busy around here all of a sudden.

Attached is a version of the patch with James Pye's distutils checking
code. Gaetano, please verify it works properly for you.

Although Peter was clearly not in favor of this, Gaetano and James both
are, and I don't feel strongly either way. So barring any other
objections I'll apply this in a day or so.

One procedural issue did occur to me regarding this kind of change. It
requires someone to run autoconf after applying -- how is that normally
handled?

Thanks,

Joe

Attachment Content-Type Size
current.80.diff text/x-patch 2.0 KB

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, James William Pye <flaw(at)rhid(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: x86_64 configure problem
Date: 2004-09-15 21:04:11
Message-ID: 4148AE4B.2020401@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe Conway wrote:
| Gaetano Mendola wrote:
|
|> python -c "from distutils import *" > /dev/null 2>&1 || (echo "You
|> need distutils installed"; exit 1)
|>
|
| Sorry for the delay -- things got busy around here all of a sudden.
|
| Attached is a version of the patch with James Pye's distutils checking
| code. Gaetano, please verify it works properly for you.

Patch applied and it works. I did the negative test and the positive as
well.

Thanks.

Regards
Gaetano Mendola

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBSK5K7UpzwH2SGd4RAtUYAJ0dEjiGUgPhU0Qyb9PqRK+5nJct7wCgvMti
A/J0qMMGqIVQH3E4BdV0Tu8=
=T+77
-----END PGP SIGNATURE-----


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>, Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, James William Pye <flaw(at)rhid(dot)com>
Subject: Re: x86_64 configure problem
Date: 2004-09-15 23:07:34
Message-ID: 200409160107.34657.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Joe Conway wrote:
> One procedural issue did occur to me regarding this kind of change.
> It requires someone to run autoconf after applying -- how is that
> normally handled?

You run autoconf before you commit and then check it in. Please use
version 2.53.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Joe Conway <mail(at)joeconway(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Gaetano Mendola <mendola(at)bigfoot(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, James William Pye <flaw(at)rhid(dot)com>
Subject: Re: [HACKERS] x86_64 configure problem
Date: 2004-09-16 23:35:41
Message-ID: 414A234D.8010002@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut wrote:
> Joe Conway wrote:
>>One procedural issue did occur to me regarding this kind of change.
>>It requires someone to run autoconf after applying -- how is that
>>normally handled?
>
> You run autoconf before you commit and then check it in. Please use
> version 2.53.
>

Thanks. Attached patch applied.

BTW, if anyone is interested in an autoconf253 source RPM that will
build on Fedora Core 2, let me know.

Joe

Attachment Content-Type Size
current.80.diff text/x-patch 4.2 KB