release for 2.1.2, plus 2.2.1...
[resend: sorry if you see it twice, but I can't see that the original ever got through...] Ok, I'd like to make the 2.1.2 release some time in the first half of the week starting 7th Jan, assuming that's ok for the folks who'll need to do the work on the PC/Mac packaging. I notice that pep 101 is pretty strongly focussed on the major releases, not the minor ones. Is it worth making a modified version of this PEP with the minor release steps? the things to do: README file. NEWS file - should this have anything other than the socket.sendall() change? I don't have access to creosote.python.org, so someone else's going to need to do this. As far as 2.2.1 goes, I'm happy to keep on the patch czar role. Is trying for a release before the conference too aggressive a timeframe? There seem to be a number of niggles that'd be nice to have fixed... Anthony
"AB" == Anthony Baxter
writes:
AB> [resend: sorry if you see it twice, but I can't see that the AB> original ever got through...] AB> Ok, I'd like to make the 2.1.2 release some time in the first AB> half of the week starting 7th Jan, assuming that's ok for the AB> folks who'll need to do the work on the PC/Mac packaging. One of the things I'd really like to be sure works in 2.1.2 is largefile support. I've had some trouble along these lines on filesystems that I know have largefile (because a Python 2.2 built on the same platform works fine). Do we expect that largefile support should work in Python 2.1.2? I'm okay that autoconf detection fails as long as the instructions in the posix module work: http://www.python.org/doc/current/lib/posix-large-files.html I've had some failures on 2.4.7 kernels w/ ext3 filesystems. AB> I notice that pep 101 is pretty strongly focussed on the major AB> releases, not the minor ones. Is it worth making a modified AB> version of this PEP with the minor release steps? I'd be more inclined to clone PEP 101 into a PEP 102 with micro release instructions. The nice thing about 101 is that you can just go down the list, checking things off in a linear fashion as you complete each item. I'd be loathe to break up the linearity of that. AB> I don't have access to creosote.python.org, so someone else's AB> going to need to do this. I can certainly help with any fiddling necessary on creosote. Then again... AB> As far as 2.2.1 goes, I'm happy to keep on the patch czar AB> role. ...if this is going to be a recurring role, we might just want to give you access to the web cvs tree and creosote. AB> Is trying for a release before the conference too AB> aggressive a timeframe? There seem to be a number of niggles AB> that'd be nice to have fixed... Hey, if you're up for it! dunno-about-you-but-i'm-planning-a-vacation-ly y'rs, -Barry
Do we expect that largefile support should work in Python 2.1.2? I'm okay that autoconf detection fails as long as the instructions in the posix module work:
http://www.python.org/doc/current/lib/posix-large-files.html
I don't think we can get autoconf detection to work on 2.1. The instructions are right. Unfortunately, the code is wrong: It prefers fgetpos in 2.1, but that returns not an integral type on some systems. I think the best approach is to copy the body of _portable_fseek and _portable_ftell from 2.2. With that, I get a setup that atleast looks right (patch attached)
I've had some failures on 2.4.7 kernels w/ ext3 filesystems.
Were these compilation failures, or runtime failures? For the compilation failures, ext3 should be irrelevant, and 2.4.7 should be irrelevant as well - the glibc version would matter (which defines fpos_t to be a struct with an mbstate_t inside). Regards, Martin Index: fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.110 diff -u -r2.110 fileobject.c --- fileobject.c 2001/04/14 17:49:40 2.110 +++ fileobject.c 2002/01/04 10:31:39 @@ -225,20 +225,28 @@ static int _portable_fseek(FILE *fp, Py_off_t offset, int whence) { -#if defined(HAVE_FSEEKO) +#if !defined(HAVE_LARGEFILE_SUPPORT) + return fseek(fp, offset, whence); +#elif defined(HAVE_FSEEKO) && SIZEOF_OFF_T >= 8 return fseeko(fp, offset, whence); #elif defined(HAVE_FSEEK64) return fseek64(fp, offset, whence); #elif defined(__BEOS__) return _fseek(fp, offset, whence); -#elif defined(HAVE_LARGEFILE_SUPPORT) && SIZEOF_FPOS_T >= 8 +#elif SIZEOF_FPOS_T >= 8 /* lacking a 64-bit capable fseek(), use a 64-bit capable fsetpos() and fgetpos() to implement fseek()*/ fpos_t pos; switch (whence) { case SEEK_END: +#ifdef MS_WINDOWS + fflush(fp); + if (_lseeki64(fileno(fp), 0, 2) == -1) + return -1; +#else if (fseek(fp, 0, SEEK_END) != 0) return -1; +#endif /* fall through */ case SEEK_CUR: if (fgetpos(fp, &pos) != 0) @@ -249,7 +257,7 @@ } return fsetpos(fp, &offset); #else - return fseek(fp, offset, whence); +#error "Large file support, but no way to fseek." #endif } @@ -260,17 +268,19 @@ static Py_off_t _portable_ftell(FILE* fp) { -#if SIZEOF_FPOS_T >= 8 && defined(HAVE_LARGEFILE_SUPPORT) +#if !defined(HAVE_LARGEFILE_SUPPORT) + return ftell(fp); +#elif defined(HAVE_FTELLO) && SIZEOF_OFF_T >= 8 + return ftello(fp); +#elif defined(HAVE_FTELL64) + return ftell64(fp); +#elif SIZEOF_FPOS_T >= 8 fpos_t pos; if (fgetpos(fp, &pos) != 0) return -1; return pos; -#elif defined(HAVE_FTELLO) && defined(HAVE_LARGEFILE_SUPPORT) - return ftello(fp); -#elif defined(HAVE_FTELL64) && defined(HAVE_LARGEFILE_SUPPORT) - return ftell64(fp); #else - return ftell(fp); +#error "Large file support, but no way to ftell." #endif }
"MvL" == Martin v Loewis
writes:
MvL> I don't think we can get autoconf detection to work on MvL> 2.1. I don't mind. MvL> The instructions are right. Unfortunately, the code is MvL> wrong: It prefers fgetpos in 2.1, but that returns not an MvL> integral type on some systems. Right. MvL> I think the best approach is to copy the body of MvL> _portable_fseek and _portable_ftell from 2.2. With that, I MvL> get a setup that atleast looks right (patch attached) Unfortunately that's not enough, I suspect. >> I've had some failures on 2.4.7 kernels w/ ext3 filesystems. MvL> Were these compilation failures, or runtime failures? For the MvL> compilation failures, ext3 should be irrelevant, and 2.4.7 MvL> should be irrelevant as well - the glibc version would matter MvL> (which defines fpos_t to be a struct with an mbstate_t MvL> inside). Vanilla release21-maint will give compilation failures, which go away with the patch (essentially what I tried on other systems). But even with these patches, test_largefile fails on the seek(2**31L). So something else too is going on. FTR: this is a stock Mandrake 8.1 system w/ glibc 2.2.4. I don't have much time to spend looking into this right now, but it would be good to fix for 2.1.2. -Barry
Hi folks,
I'm subscribed to the list, but I'm still not quite sure if I'm supposed to
be posting here... I suppose I should go read the charter. Please flame me
if this list is for the "in crowd" only. ;-)
I tried to get the 21-maintbranch LFS working using the directions that are
provided in the current docs
(http://www.python.org/doc/current/lib/posix-large-files.html), but it fails
to compile for me as a result. Someone has suggested that it's not the
instructions that are broken, but the code. Can this be confirmed?
Because ZC is forced to stick with Python 2.1.X (as opposed to 2.2.X) for
the current crop of Zope releases, and because we often need large file
support under Zope, it's pretty important for us to get a 2.1.X release
under which LFS works. A workaround is fine as well.
I don't think I have the knowhow to fix it, but if I can help in any way by
testing under various Linuxii, please let me know.
-C
----- Original Message -----
From: "Barry A. Warsaw"
"MvL" == Martin v Loewis
writes: MvL> I don't think we can get autoconf detection to work on MvL> 2.1.
I don't mind.
MvL> The instructions are right. Unfortunately, the code is MvL> wrong: It prefers fgetpos in 2.1, but that returns not an MvL> integral type on some systems.
Right.
MvL> I think the best approach is to copy the body of MvL> _portable_fseek and _portable_ftell from 2.2. With that, I MvL> get a setup that atleast looks right (patch attached)
Unfortunately that's not enough, I suspect.
>> I've had some failures on 2.4.7 kernels w/ ext3 filesystems.
MvL> Were these compilation failures, or runtime failures? For the MvL> compilation failures, ext3 should be irrelevant, and 2.4.7 MvL> should be irrelevant as well - the glibc version would matter MvL> (which defines fpos_t to be a struct with an mbstate_t MvL> inside).
Vanilla release21-maint will give compilation failures, which go away with the patch (essentially what I tried on other systems). But even with these patches, test_largefile fails on the seek(2**31L).
So something else too is going on.
FTR: this is a stock Mandrake 8.1 system w/ glibc 2.2.4.
I don't have much time to spend looking into this right now, but it would be good to fix for 2.1.2.
-Barry
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev
"CM" == Chris McDonough
writes:
CM> I'm subscribed to the list, but I'm still not quite sure if CM> I'm supposed to be posting here... I suppose I should go read CM> the charter. Please flame me if this list is for the "in CM> crowd" only. ;-) You did fine, Chris! :) Welcome. CM> I tried to get the 21-maintbranch LFS working using the CM> directions that are provided in the current docs CM> (http://www.python.org/doc/current/lib/posix-large-files.html), CM> but it fails to compile for me as a result. Someone has CM> suggested that it's not the instructions that are broken, but CM> the code. Can this be confirmed? Confirmed. The compilation errors can be fixed with the patch that Martin sent around earlier in this thread. So that probably ought to be added to Python 2.1.2. But the patch + the posix-large-file instructions still don't enable large file support for me on glibc 2.2.4. So something more is needed. CM> Because ZC is forced to stick with Python 2.1.X (as opposed to CM> 2.2.X) for the current crop of Zope releases, and because we CM> often need large file support under Zope, it's pretty CM> important for us to get a 2.1.X release under which LFS works. CM> A workaround is fine as well. CM> I don't think I have the knowhow to fix it, but if I can help CM> in any way by testing under various Linuxii, please let me CM> know. I do plan to get back to this if nobody else fixes it in the meantime, but I've got a couple of higher priority things to deal with right now. I'd say LFS in Python 2.1.2 should be a high priority. -Barry
Confirmed. The compilation errors can be fixed with the patch that Martin sent around earlier in this thread. So that probably ought to be added to Python 2.1.2. But the patch + the posix-large-file instructions still don't enable large file support for me on glibc 2.2.4. So something more is needed.
Hm, is it possible that glibc 2.2.4 is too old to support large files?
I'd say LFS in Python 2.1.2 should be a high priority.
Yes. --Guido van Rossum (home page: http://www.python.org/~guido/)
----- Original Message -----
From: "Guido van Rossum"
Confirmed. The compilation errors can be fixed with the patch that Martin sent around earlier in this thread. So that probably ought to be added to Python 2.1.2. But the patch + the posix-large-file instructions still don't enable large file support for me on glibc 2.2.4. So something more is needed.
Hm, is it possible that glibc 2.2.4 is too old to support large files? s I would be surprised if glibc 2.2.4 does not support LFS. Some months ago I installed Python 2.1 on a "older" RH 7.1 system with LFS support. The glibc version of RH7.1 is most likely older than 2.2.4.
Andreas
"GvR" == Guido van Rossum
writes:
GvR> Hm, is it possible that glibc 2.2.4 is too old to support GvR> large files? Doubtful. This is the stock glibc that comes with Mandrake 8.1, which is their latest offering. And besides, Python 2.2 on the same box supports LFS just fine! -Barry
[Barry]
I'd say LFS in Python 2.1.2 should be a high priority.
I'd say it's a show-stopper. Zope isn't the only client for large files; besides, we could just tell Zope customers to upgrade to Windows, where LFS has been part of the Win32 API since before Linus learned how to spell Perl <wink>.
Confirmed. The compilation errors can be fixed with the patch that Martin sent around earlier in this thread. So that probably ought to be added to Python 2.1.2. But the patch + the posix-large-file instructions still don't enable large file support for me on glibc 2.2.4. So something more is needed.
One possible difference between your and my installation is that you probably followed the Linux instructions, whereas I followed the Solaris instructions (even though my system is Linux). I did so because of martin@mira:~/work/python/dist/src> getconf LFS_CFLAGS -D_FILE_OFFSET_BITS=64 So getconf works fine on Linux, as well, and DTRT. Could please recompile your installation using the getconf approach alone?
I do plan to get back to this if nobody else fixes it in the meantime, but I've got a couple of higher priority things to deal with right now.
I'd say LFS in Python 2.1.2 should be a high priority.
I'd like to see an independent confirmation first that there still is a problem to solve. Regards, Martin
I'm subscribed to the list, but I'm still not quite sure if I'm supposed to be posting here... I suppose I should go read the charter. Please flame me if this list is for the "in crowd" only. ;-)
This list is for development *of* Python. Anybody is free to post questions and comments on that topic, like you just did; I don't like it when people post questions of the "how do I ... in Python" kind that you typically see on python-list - this is not a list to get better help :-)
I tried to get the 21-maintbranch LFS working using the directions that are provided in the current docs (http://www.python.org/doc/current/lib/posix-large-files.html), but it fails to compile for me as a result. Someone has suggested that it's not the instructions that are broken, but the code. Can this be confirmed?
Well, you did not describe exactly how it fails to compile for you. Assuming you got an error that something is not an integral type, then that is clearly an error in the code. You might want to investigate the error message you get more closely; please confirm that it refers to the return value of fgetpos. If you need further confimation, I recommend that you invoke the gcc line that fails adding --save-temps, and inspect the resulting fileobject.i. You will likely find that fpos_t is a structure, and that Python attempts to return it in a place where an integer is needed (or vice versa).
Because ZC is forced to stick with Python 2.1.X (as opposed to 2.2.X) for the current crop of Zope releases, and because we often need large file support under Zope, it's pretty important for us to get a 2.1.X release under which LFS works. A workaround is fine as well.
Please try the patch I posted, and report whether test_largefile passes or fails (or, if it fails to compile, what the exact error messages are). Regards, Martin
Martin> I don't like it when people post questions of the "how do I Martin> ... in Python" kind that you typically see on python-list - this Martin> is not a list to get better help :-) Somewhat au contraire from this neck of the woods... In my Unicode filename thread I decided it would be best to post here for a couple reasons: * I figured most good answers would come from Martin and Marc-Andrè. * It's not clear that the "right way" to do this stuff appears to be settled, which I think has been proven out somewhat by the extended thread and the long thread Jack started about Unicode and getargs.c. Skip
* I figured most good answers would come from Martin and Marc-Andr�.
That alone is not a good reason. python-dev is not a place to get free consulting (which, of course, is more bothersome to whoever gives the consulting, than to who receives it).
* It's not clear that the "right way" to do this stuff appears to be settled, which I think has been proven out somewhat by the extended thread and the long thread Jack started about Unicode and getargs.c.
Well, I was mostly referring to things that are either documented, or can be found easily through source inspection. IOW, I expect that python-dev posters do their homework before posting. Things like "is it really that you cannot do X, but that it should be possible to do so", or "what is the exact rationale for Y happening" are definitely python-dev issues. Regards, Martin
Well, you did not describe exactly how it fails to compile for you. Assuming you got an error that something is not an integral type, then that is clearly an error in the code. You might want to investigate the error message you get more closely; please confirm that it refers to the return value of fgetpos.
Yes, apologies. I should have provided more details.
I'm using a stock Red Hat Linux 7.2, which has glibc 2.2.4 (Linux
kernel version 2.4.7).
With a Python built successfully from the 21-maintbranch without any
additional compiler flags indicating that I want large file support, I
get this when attempting to run the test_largefile test:
[chrism@kurtz tmp]$ python /usr/local/lib/python2.1/test/test_largefile.py
Traceback (most recent call last):
File "/usr/local/lib/python2.1/test/test_largefile.py", line 22, in ?
raise test_support.TestSkipped, \
test_support.TestSkipped: platform does not have largefile support
What's going on "under the hood" here is that a bit of code like this:
open('foo', 'w').seek(2147483649L)
.. raises an IOError 22, (invalid argument) out of the seek.
When I attempt to compile the code from the same branch using the
instructions for Solaris from
http://www.python.org/doc/current/lib/posix-large-files.html, it craps
out during a successive make:
gcc -c -g -O2 -I. -I./Include -DHAVE_CONFIG_H -o Objects/fileobject.o
Objects/fileobject.c
Objects/fileobject.c: In function `_portable_ftell':
Objects/fileobject.c:267: incompatible types in return
make: *** [Objects/fileobject.o] Error 1
[chrism@kurtz src]$
As a result, I am not able to compile successfully. (Note: FYI, the
same thing happens when following the slightly different current doc
instructions for Linux.)
So be it. With the patch you supplied earlier (and providing *either*
the "Solaris" or "Linux" largefile support flags to configure) I am able
to compile successfully and when invoking the resulting executable
against test_largefile.py, I get what looks like success, e.g.:
create large file via seek (may be sparse file) ...
2500000001L =?= 2500000001L ... yes
check file size with os.fstat
check file size with os.stat
2500000001L =?= 2500000001L ... yes
play around with seek() and read() with the built largefile
0L =?= 0 ... yes
..
create large file via seek (may be sparse file) ... 2500000001L =?= 2500000001L ... yes check file size with os.fstat check file size with os.stat 2500000001L =?= 2500000001L ... yes play around with seek() and read() with the built largefile 0L =?= 0 ... yes ..
..
I have taken this is as success also. I don't know how Barry found that the tests fail, but must likely, one of the expect calls failed, resulting in a TestFailed exception - which would have been clearly visible. Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> I don't know how Barry found that the tests fail, but must MvL> likely, one of the expect calls failed, resulting in a MvL> TestFailed exception - which would have been clearly visible. Okay, it's a build problem. For whatever reason, the -D flags set in configure weren't getting passed to gcc during the make. If I add that explicitly, everything works. So Py2.1.2 is fine with Martin's patch, which should be committed to the maint branch. If I come up with a better recipe for posix-large-files I'll submit it as a doc-fix. -Barry
"MvL" == Martin v Loewis
writes:
MvL> I don't know how Barry found that the tests fail, but must MvL> likely, one of the expect calls failed, resulting in a MvL> TestFailed exception - which would have been clearly visible.
"BAW" == Barry A Warsaw
writes:
BAW> Okay, it's a build problem. For whatever reason, the -D BAW> flags set in configure weren't getting passed to gcc during BAW> the make. If I add that explicitly, everything works. So BAW> Py2.1.2 is fine with Martin's patch, which should be BAW> committed to the maint branch. BAW> If I come up with a better recipe for posix-large-files I'll BAW> submit it as a doc-fix. I think the following is a better suggestion: % CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure CC is propagated to the Makefile so that just "make" is necessary, but OPT and CFLAGS is not. (Although, I seem to vaguely remember that OPT /used/ to propagate -- I must be mis-remebering.) -Barry
Barry A. Warsaw writes:
CC is propagated to the Makefile so that just "make" is necessary, but OPT and CFLAGS is not. (Although, I seem to vaguely remember that OPT /used/ to propagate -- I must be mis-remebering.)
Or it used to work -- that's how I remember it as well. Perhaps we should fix this. Feel free to file a bug report and assign it to me. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
"Fred" == Fred L Drake, Jr
writes:
Fred> Or it used to work -- that's how I remember it as well. Fred> Perhaps we should fix this. It looks like OPT propagates in Python2.2-cvs, e.g. try: % OPT=-g ./configure So maybe it's just a bug in release21-maint. Fred> Feel free to file a bug report and assign it to me. Done. -Barry
"Fred" == Fred L Drake, Jr
writes: Fred> Or it used to work -- that's how I remember it as well. Fred> Perhaps we should fix this.
It looks like OPT propagates in Python2.2-cvs, e.g. try:
% OPT=-g ./configure
So maybe it's just a bug in release21-maint.
Fred> Feel free to file a bug report and assign it to me.
Done.
Before changing the documentation, I'd like to understand the problem Barry is seeing first, or I'd like to hear independent confirmation that the docs have a bug. Chris' report, in http://mail.python.org/pipermail/python-dev/2002-January/019177.html is contradicting: On one hand, he says that following the instructions, he got an interpreter that does LFS correctly; but he also says that the compilation line is just gcc -c -g -O2 -I. -I./Include -DHAVE_CONFIG_H -o Objects/fileobject.o which cannot possibly have the desired effect, AFAICT. Regards, Martin
I think the following is a better suggestion:
% CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure
CC is propagated to the Makefile so that just "make" is necessary, but OPT and CFLAGS is not. (Although, I seem to vaguely remember that OPT /used/ to propagate -- I must be mis-remebering.)
What version of configure are you using? On my system, with configure 1.207.2.7, doing CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g -O2 $CFLAGS" ./configure will result in a line OPT= -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 in the Makefile. This, in turn, will result in a compilation line gcc -c -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I./Include -DHAVE_CONFIG_H -o Objects/fileobject.o Objects/fileobject.c Something else is going on on your system. Did you remove config.cache before running configure? Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> What version of configure are you using? On my system, with MvL> configure 1.207.2.7, doing 1.207.2.7 is at the head of the release21-maint branch, so that's definitely the version I'm using. MvL> CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g MvL> -O2 $CFLAGS" ./configure MvL> will result in a line MvL> OPT= -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 MvL> in the Makefile. Not for me. In fact the -D symbols never make it into the Makefile at all. MvL> This, in turn, will result in a compilation MvL> line MvL> gcc -c -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 MvL> -I. -I./Include -DHAVE_CONFIG_H -o Objects/fileobject.o MvL> Objects/fileobject.c MvL> Something else is going on on your system. Did you remove MvL> config.cache before running configure? Of course! I always "make distclean" before running configure again. -Barry
MvL> OPT= -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
MvL> in the Makefile.
Not for me. In fact the -D symbols never make it into the Makefile at all.
That is very puzzling. I just did a fresh checkout on cf.sf.net (the debian installation), using cvs -z9 -d:pserver:anonymous@cvs.python.sourceforge.net:/cvsroot/python co -d py21 -rrelease21-maint python/dist/src cd py21 CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g -O2 $CFLAGS" ./configure make The earliest indication that it was accepted correctly is in checking whether the C compiler (gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ) works... yes In the end, Makefile will have OPT= -g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 Can you please try the same sequence of actions on the SF compile farm, and report what it does for you? Alternatively, can you spot the error in the commands I used? Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> That is very puzzling. I just did a fresh checkout on MvL> cf.sf.net (the debian installation), using MvL> Can you please try the same sequence of actions on the SF MvL> compile farm, and report what it does for you? Alternatively, MvL> can you spot the error in the commands I used? Actually, let's do something different. My laptop is a pretty stock Mandrake 8.1 installation, while my desktop is a RH 6.1-ish system (with a few kernel and other package updates). On a fresh checkout of the release21-maint branch on the RH system, everything works fine; the posix-large-file recipe does indeed propagate the extended OPT macro into the Makefile. A fresh checkout on the Mandrake system it does not. Weird. What's different? On both systems we're using autoconf 2.13, and m4 version 1.4. On the RH system I've got GNU make version 3.77, but on Mandrake it's 3.79.1 so that's one obvious difference. But I'd be surprised if this is a make bug because I didn't think make was invoked during the configure phase. I've gotta run, but I'll try to look into this some more later on. -Barry
What's different? On both systems we're using autoconf 2.13, and m4 version 1.4.
Should be irrelevant, since you are using the generated configure (I hope).
On the RH system I've got GNU make version 3.77, but on Mandrake it's 3.79.1 so that's one obvious difference. But I'd be surprised if this is a make bug because I didn't think make was invoked during the configure phase.
Right. That leaves it to /bin/sh. Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> Right. That leaves it to /bin/sh. Yup. A bash bug? /bin/sh (aka bash) version 2.03.8 on RH6.1 vs. 2.05.1 on MD8.1. It isn't sed, which is at version 3.02 on both. Hmm, a bash bug? -Barry
Yup. A bash bug?
/bin/sh (aka bash) version 2.03.8 on RH6.1 vs. 2.05.1 on MD8.1. It isn't sed, which is at version 3.02 on both.
Hmm, a bash bug?
Could be a test problem as well. Line 1451 in configure currently reads if test -z "$OPT" My guess that this is where the environment setting is overwritten. Just put echo "Current value of OPT is x${OPT}x" before this test, and echo "New value of OPT is x${OPT}x" after the if statement. Actually, after re-reading the autoconf documentation, I think I see what's happending. $OPT starts with a - (HYPHEN MINUS), so test treats it as an option. Please try replacing the test with if test ${OPT+set} != set HTH, Martin
Okay, I'm totally confuggled now. Let's boil this down. Take this simple program: -------------------- snip snip --------------------/tmp/foo.sh #! /bin/sh echo "OPT = x${OPT}x" echo "CFLAGS= x${CFLAGS}x" -------------------- snip snip -------------------- and invoke it like: % CFLAGS='one' OPT="two $CFLAGS" /tmp/foo.sh What do you get? What do you *expect* to get? Am I boiling things down correctly? On every system I've tested, the following output is what I get: % CFLAGS='one' OPT="two $CFLAGS" /tmp/foo.sh OPT = xtwo x CFLAGS= xonex So, why should any of this work anywhere? Should we ever expect $OPT to get the right value? i-must-be-missing-something-really-obvious,-obvious-ly y'rs, -Barry
Okay, I'm totally confuggled now. Let's boil this down. Take this simple program:
-------------------- snip snip --------------------/tmp/foo.sh #! /bin/sh echo "OPT = x${OPT}x" echo "CFLAGS= x${CFLAGS}x" -------------------- snip snip --------------------
and invoke it like:
% CFLAGS='one' OPT="two $CFLAGS" /tmp/foo.sh
What do you get? What do you *expect* to get? Am I boiling things down correctly?
On every system I've tested, the following output is what I get:
% CFLAGS='one' OPT="two $CFLAGS" /tmp/foo.sh OPT = xtwo x CFLAGS= xonex
So, why should any of this work anywhere? Should we ever expect $OPT to get the right value?
I haven't followed this, but from the above it appears that if you use the form VAR1=val1 VAR2=val2 ... program args then all of val1, val2, ... are evaluated simultaneously using the previous values of VAR1, VAR2, ... rather than left-to-right. That's mildly surprising but not really upsetting to me. --Guido van Rossum (home page: http://www.python.org/~guido/)
I haven't followed this, but from the above it appears that if you use the form
VAR1=val1 VAR2=val2 ... program args
then all of val1, val2, ... are evaluated simultaneously using the previous values of VAR1, VAR2, ... rather than left-to-right.
That's mildly surprising but not really upsetting to me.
What *is* upsetting is that different shells behave differently; or else the current documentation would not have been written the way it is now (and Barry and me would not have spent the week-end researching that). Recent bash versions, and Korn shell evaluate from left to right (bash now documents that assignments occur *after* args have been expanded). Regards, Martin
"Barry A. Warsaw" wrote:
Okay, I'm totally confuggled now. Let's boil this down. Take this simple program:
-------------------- snip snip --------------------/tmp/foo.sh #! /bin/sh echo "OPT = x${OPT}x" echo "CFLAGS= x${CFLAGS}x" -------------------- snip snip --------------------
and invoke it like:
% CFLAGS='one' OPT="two $CFLAGS" /tmp/foo.sh
I think the intent was to use single quotes for OPT='two $CFLAGS'. (You could also do OPT="two \$CFLAGS".) This will pass the string "$CFLAGS" in OPT, not the value of the shell variable $CFLAGS. While your shell script will print out: OPT = xtwo $CFLAGSx This is ok since it will/should get expanded properly in the Makefile. Or I've totally missed the point too. :-) Neal
"NN" == Neal Norwitz
writes:
NN> I think the intent was to use single quotes for OPT='two NN> $CFLAGS'. (You could also do OPT="two \$CFLAGS".) This will NN> pass the string "$CFLAGS" in OPT, not the value of the shell NN> variable $CFLAGS. NN> While your shell script will print out: OPT = xtwo $CFLAGSx NN> This is ok since it will/should get expanded properly in the NN> Makefile. Unfortunately, none of this really helps. Getting $(CFLAGS) into $OPT just results in this: Makefile:737: *** Recursive variable `CFLAGS' references itself (eventually). Stop. Let me suggest the following, and then I'm going to stop here. Martin's patch to fileobject.c should be applied -- that's a given. As for configure: CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure works for me. I'll leave it up to others to decide what to change, although IMHO posix-large-file is broken (and also because those instructions shouldn't be necessary for Python 2.2). -Barry
Barry A. Warsaw wrote Let me suggest the following, and then I'm going to stop here. Martin's patch to fileobject.c should be applied -- that's a given. As for configure: CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure works for me.
That's good enough for me - I'll test it on the boxes I can find...
I'll leave it up to others to decide what to change,
Documentation?
although IMHO posix-large-file is broken
You mean, even with these new build instructions?
(and also because those instructions shouldn't be necessary for Python 2.2).
They are still going to be necessary for 2.1.2 - I don't want to try and play the game of getting this change in and turned on by default at this stage of the game... :/ Anthony
CC='gcc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure
That's good enough for me - I'll test it on the boxes I can find...
I'd strongly advise against putting that into the documentation. There are numerous assignments to CC inside configure.in, which would override this setting. Setting OPT and CFLAGS is the right way to pass these configuration options.
I'll leave it up to others to decide what to change,
Documentation?
Please, not the way Barry proposes. Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> I'd strongly advise against putting that into the MvL> documentation. There are numerous assignments to CC inside MvL> configure.in, which would override this setting. Setting OPT MvL> and CFLAGS is the right way to pass these configuration MvL> options. >> I'll leave it up to others to decide what to change, >> Documentation? MvL> Please, not the way Barry proposes. Here's another suggestion: add a make variable that isn't used or anything else, has a default empty value, and is used to create the compilation command. Let's say $LARGEFILE. Then the configure command would be % LARGEFILE='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure and that should work on all shells, and without having to permanently export a variable to the environment, which I think we should avoid recommending. -Barry
Barry A. Warsaw writes:
Here's another suggestion: add a make variable that isn't used or anything else, has a default empty value, and is used to create the compilation command. Let's say $LARGEFILE.
This seems tolerable. We should probably look for getconf in the configure script, and make the default value the result of "getconf LFS_CFLAGS" if available. This seems like it would do "the right thing" more often without user intervention and is safe when getconf is not available. If LARGEFILE were set in the environment (by a command line such as you suggest), we'd just use that instead. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
"Fred" == Fred L Drake, Jr
writes:
Fred> This seems tolerable. We should probably look for getconf Fred> in the configure script, and make the default value the Fred> result of "getconf LFS_CFLAGS" if available. This seems Fred> like it would do "the right thing" more often without user Fred> intervention and is safe when getconf is not available. If Fred> LARGEFILE were set in the environment (by a command line Fred> such as you suggest), we'd just use that instead. +1 BTW, does anybody have a manpage for getconf? -Barry
Barry A. Warsaw writes:
+1
BTW, does anybody have a manpage for getconf?
Not for Linux, but you aleady have the command line we care about. I've attached a Solaris manpage. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation User Commands getconf(1) NAME getconf - get configuration values SYNOPSIS getconf [ -v _s_p_e_c_i_f_i_c_a_t_i_o_n ] _s_y_s_t_e_m__v_a_r getconf [ -v _s_p_e_c_i_f_i_c_a_t_i_o_n ] _p_a_t_h__v_a_r _p_a_t_h_n_a_m_e getconf -a DESCRIPTION In the first synopsis form, the getconf utility will write to the standard output the value of the variable specified by _s_y_s_t_e_m__v_a_r, in accordance with _s_p_e_c_i_f_i_c_a_t_i_o_n if the -v option is used. In the second synopsis form, getconf will write to the stan- dard output the value of the variable specified by _p_a_t_h__v_a_r for the path specified by _p_a_t_h_n_a_m_e, in accordance with _s_p_e_c_i_f_i_c_a_t_i_o_n if the -v option is used. In the third synopsis form, config will write to the stan- dard output the names of the current system configuration variables. The value of each configuration variable will be determined as if it were obtained by calling the function from which it is defined to be available. The value will reflect condi- tions in the current operating environment. OPTIONS The following options are supported: -a Writes the names of the current system configuration variables to the standard output. -v _s_p_e_c_i_f_i_c_a_t_i_o_n Gives the specification which governs the selection of values for configuration variables. OPERANDS The following operands are supported: _p_a_t_h__v_a_r A name of a configuration variable whose value is available from the pathconf(2) function. All of the values in the following table are supported: LINK_MAX _N_A_M_E__M_A_X POSIX_CHOWN_RESTRICTED MAX_CANON _P_A_T_H__M_A_X POSIX_NO_TRUNC MAX_INPUT PIPE_BUF POSIX_VDISABLE SunOS 5.8 Last change: 30 Jan 1998 1 User Commands getconf(1) _p_a_t_h_n_a_m_e A path name for which the variable specified by _p_a_t_h__v_a_r is to be determined. _s_y_s_t_e_m__v_a_r A name of a configuration variable whose value is available from confstr(3C) or sysconf(3C). All of the values in the following table are supported: ARG_MAX _B_C__B_A_S_E__M_A_X BC_DIM_MAX _B_C__S_C_A_L_E__M_A_X BC_STRING_MAX CHAR_BIT CHARCLASS_NAME_MAX CHAR_MAX CHAR_MIN CHILD_MAX CLK_TCK COLL_WEIGHTS_MAX CS_PATH EXPR_NEST_MAX INT_MAX INT_MIN LFS64_CFLAGS LFS64_LDFLAGS LFS64_LIBS LFS64_LINTFLAGS LFS_CFLAGS LFS_LDFLAGS LFS_LIBS LFS_LINTFLAGS LINE_MAX LONG_BIT LONG_MAX LONG_MIN MB_LEN_MAX NGROUPS_MAX NL_ARGMAX NL_LANGMAX NL_MSGMAX NL_NMAX NL_SETMAX NL_TEXTMAX NZERO OPEN_MAX POSIX2_BC_BASE_MAX POSIX2_BC_DIM_MAX POSIX2_BC_SCALE_MAX POSIX2_BC_STRING_MAX POSIX2_C_BIND POSIX2_C_DEV POSIX2_CHAR_TERM POSIX2_COLL_WEIGHTS_MAX POSIX2_C_VERSION POSIX2_EXPR_NEST_MAX POSIX2_FORT_DEV POSIX2_FORT_RUN POSIX2_LINE_MAX POSIX2_LOCALEDEF POSIX2_RE_DUP_MAX POSIX2_SW_DEV POSIX2_UPE POSIX2_VERSION _POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VERSION RE_DUP_MAX SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN SSIZE_MAX STREAM_MAX TMP_MAX TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX WORD_BIT SunOS 5.8 Last change: 30 Jan 1998 2 User Commands getconf(1) XBS5_ILP32_OFF32 XBS5_ILP32_OFF32_CFLAGS XBS5_ILP32_OFF32_LDFLAGS XBS5_ILP32_OFF32_LIBS XBS5_ILP32_OFF32_LINTFLAGS XBS5_ILP32_OFFBIG XBS5_ILP32_OFFBIG_CFLAGS XBS5_ILP32_OFFBIG_LDFLAGS XBS5_ILP32_OFFBIG_LIBS XBS5_ILP32_OFFBIG_LINTFLAGS XBS5_LP64_OFF64 XBS5_LP64_OFF64_CFLAGS XBS5_LP64_OFF64_LDFLAGS XBS5_LP64_OFF64_LIBS XBS5_LP64_OFF64_LINTFLAGS XBS5_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG_CFLAGS XBS5_LPBIG_OFFBIG_LDFLAGS XBS5_LPBIG_OFFBIG_LIBS XBS5_LPBIG_OFFBIG_LINTFLAGS _XOPEN_CRYPT _XOPEN_ENH_I18N _XOPEN_LEGACY _XOPEN_SHM _XOPEN_VERSION _XOPEN_XCU_VERSION _XOPEN_XPG2 _XOPEN_XPG3 _XOPEN_XPG4 The symbol PATH also is recognized, yielding the same value as the confstr() name value CS_PATH. USAGE See largefile(5) for the description of the behavior of getconf when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). EXAMPLES Example 1: Writing the value of a variable This example illustrates the value of {NGROUPS_MAX}: example% getconf NGROUPS_MAX Example 2: Writing the value of a variable for a specific directory This example illustrates the value of NAME_MAX for a specific directory: example% getconf NAME_MAX /usr Example 3: Dealing with unspecified results This example shows how to deal more carefully with results that might be unspecified: if value=$(getconf PATH_MAX /usr); then if [ "$value" = "undefined" ]; then echo PATH_MAX in /usr is infinite. else echo PATH_MAX in /usr is $value. fi else SunOS 5.8 Last change: 30 Jan 1998 3 User Commands getconf(1) echo Error in getconf. fi Note that sysconf(_SC_POSIX_C_BIND); and system("getconf POSIX2_C_BIND"); in a C program could give different answers. The sysconf call supplies a value that corresponds to the conditions when the program was either compiled or executed, depending on the implementation; the system call to getconf always supplies a value corresponding to conditions when the pro- gram is executed. ENVIRONMENT VARIABLES See environ(5) for descriptions of the following environment variables that affect the execution of getconf: LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS The following exit values are returned: 0 The specified variable is valid and information about its current state was written successfully. >0 An error occurred. ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |______________________________|______________________________| | Availability | SUNWcsu | |______________________________|______________________________| SEE ALSO pathconf(2), confstr(3C), sysconf(3C), attributes(5), environ(5), largefile(5) SunOS 5.8 Last change: 30 Jan 1998 4
Here's another suggestion: add a make variable that isn't used or anything else, has a default empty value, and is used to create the compilation command. Let's say $LARGEFILE.
Then the configure command would be
% LARGEFILE='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure
and that should work on all shells, and without having to permanently export a variable to the environment, which I think we should avoid recommending.
"is used to create the compilation command" may be tricky to implement. Anyway, what is wrong with my earlier suggestion export CFLAGS OPT CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' OPT="-g -O2 $CFLAGS" ./configure ??? Regards, Martin
(trimming the cc list... i think everyone on it is a p-dev'er) Martin> Anyway, what is wrong with my earlier suggestion Martin> export CFLAGS OPT Martin> CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' Martin> OPT="-g -O2 $CFLAGS" Martin> ./configure I know I'm coming into this discussion late, but why even involve CFLAGS? export OPT OPT='-g -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' ./configure Skip
I know I'm coming into this discussion late, but why even involve CFLAGS?
Because without it, autoconf won't detect that large file support is available, and fail to define HAVE_LARGEFILE. This is because configure uses CFLAGS on its own for the test scripts, but won't use OPT. I don't think anything in the configure machinery should change for 2.1.2, since 2.2 does it all in a different and better way. Regards, Martin
"MvL" == Martin v Loewis
writes:
MvL> "is used to create the compilation command" may be tricky to MvL> implement. Anyway, what is wrong with my earlier suggestion | export CFLAGS OPT | CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' | OPT="-g -O2 $CFLAGS" | ./configure Two problems: 1) This requires you to export two variables into the outer shell's environment. As a general rule, I think this is a bad idea for tricking configure. What else might you be affecting? Others might not care as much. 2) Any time you overload a make variable that has existing semantics, you have to worry about losing the original value. Personally, I think it's easier to get CC overloading right than get OPT or CFLAGS overloading (and easier than getting them both right). But maybe that's just me. -Barry
Barry A. Warsaw wrote:
"MvL" == Martin v Loewis
writes: MvL> "is used to create the compilation command" may be tricky to MvL> implement. Anyway, what is wrong with my earlier suggestion
| export CFLAGS OPT | CFLAGS='-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64' | OPT="-g -O2 $CFLAGS" | ./configure
Two problems:
1) This requires you to export two variables into the outer shell's environment. As a general rule, I think this is a bad idea for tricking configure. What else might you be affecting? Others might not care as much.
OTOH, if MvL's code is in a shell script, this objection doesn't apply. -- --- Aahz (@pobox.com) Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ Androgynous poly kinky vanilla queer het Pythonista We must not let the evil of a few trample the freedoms of the many.
"AM" == Aahz Maruch
writes:
AM> OTOH, if MvL's code is in a shell script, this objection AM> doesn't apply. I must have missed that. Was Martin suggesting a shell script, like "configure-lfs"? -Barry
Barry A. Warsaw writes:
I must have missed that. Was Martin suggesting a shell script, like "configure-lfs"?
As long as configure captures the values to the Makefile, it doesn't matter whether the user types CFLAGS=... OPT=... export OPT CFLAGS ./configure or CFLAGS=... OPT=... ./configure is a matter of syntax, not functionality. We should not rely on any special environment variables being set after configure has been run. I think we're wasting time arguing about syntax at this point, and not making any progress. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
Barry A. Warsaw wrote:
"AM" == Aahz Maruch
writes: AM> OTOH, if MvL's code is in a shell script, this objection AM> doesn't apply.
I must have missed that. Was Martin suggesting a shell script, like "configure-lfs"?
Martin didn't, but it answers your objection. ;-) -- --- Aahz (@pobox.com) Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/ Androgynous poly kinky vanilla queer het Pythonista We must not let the evil of a few trample the freedoms of the many.
AM> OTOH, if MvL's code is in a shell script, this objection AM> doesn't apply.
I must have missed that. Was Martin suggesting a shell script, like "configure-lfs"?
No, I was really talking about the instructions in the manual, which would then indeed result in OPT being in the environment after configure has completed. If that is considered unacceptable, I'm fine with documenting that CC should be set in the environment - even though such instruction may also break on some systems. Enhancing configure to take into account more environment variables is worse: the risk of introducing new errors is just too high. Regards, Martin
2) Any time you overload a make variable that has existing semantics, you have to worry about losing the original value. Personally, I think it's easier to get CC overloading right than get OPT or CFLAGS overloading (and easier than getting them both right). But maybe that's just me.
Ok. For Solaris and Linux, the instruction about setting CC is about right, so I'm no longer objecting to changing the documentation in that direction. It is just that if you specify --without-gcc, or are on SGI or BSD/OS, that your environment setting of CC will be ignored. Regards, Martin
"MvL" == Martin v Loewis
writes:
>> 2) Any time you overload a make variable that has existing >> semantics, you have to worry about losing the original value. >> Personally, I think it's easier to get CC overloading right >> than get OPT or CFLAGS overloading (and easier than getting >> them both right). But maybe that's just me. MvL> Ok. For Solaris and Linux, the instruction about setting CC MvL> is about right, so I'm no longer objecting to changing the MvL> documentation in that direction. It is just that if you MvL> specify --without-gcc, or are on SGI or BSD/OS, that your MvL> environment setting of CC will be ignored. Good point. This should definitely be mentioned in the docs. then-again-future-google-searches-are-sure-to-turn-up-this-entire-painful -thread-ly y'rs, -Barry
"AB" == Anthony Baxter
writes:
>> I'll leave it up to others to decide what to change, AB> Documentation? >> although IMHO posix-large-file is broken AB> You mean, even with these new build instructions? Oops, sorry, I meant: I think the instructions on that page are broken! LFS support seems to work just fine w/ Martin's patch and the new instructions. >> (and also because those instructions shouldn't be necessary for >> Python 2.2). AB> They are still going to be necessary for 2.1.2 - I don't want AB> to try and play the game of getting this change in and turned AB> on by default at this stage of the game... :/ I agree completely! The 2.2 docs should probably say that those instructions aren't necessary, but in the 2.1.2 branch it should say they /are/ needed to turn on LFS. -Barry
I think the intent was to use single quotes for OPT='two $CFLAGS'. (You could also do OPT="two \$CFLAGS".) This will pass the string "$CFLAGS" in OPT, not the value of the shell variable $CFLAGS.
While your shell script will print out: OPT = xtwo $CFLAGSx This is ok since it will/should get expanded properly in the Makefile.
Or I've totally missed the point too. :-)
The intent really was that the later assigment takes into account the earlier one, by means of shell expansion. Setting OPT to a value that depends on CFLAGS would give you a cyclic expansion in the Makefile - so that clearly was not the intent. You need to set both because one ends up in the Makefile (OPT) whereas the other (CFLAGS) is needed to convince configure that HAVE_LARGEFILE should be turned on. Regards, Martin
What do you get?
martin@mira:~> CFLAGS='one' OPT="two $CFLAGS" ./foo.sh OPT = xtwo onex CFLAGS= xonex martin@mira:~> echo $BASH_VERSION 2.05.0(1)-release
What do you *expect* to get?
What I get, both in zsh and bash. I'd expect environment variable assignments to be evaluated from left to right, one-by-one. The bash documentation says # The order of expansions is: brace expansion, tilde expansion, # parameter, variable and arithmetic expansion and command # substitution (done in a left-to-right fashion), word splitting, and # pathname expansion. The only way I can produce an error is by martin@mira:~> env CFLAGS='one' OPT="two $CFLAGS" ./foo.sh OPT = xtwo x CFLAGS= xonex This is the result of the exact procedure used by bash: # When a simple command is executed, the shell performs the following # expansions, assignments, and redirections, from left to right. # # 1. The words that the parser has marked as variable assignments # (those preceding the command name) and redirections are # saved for later processing. # # 2. The words that are not variable assignments or redirections are # expanded. If any words remain after expansion, the first word # is taken to be the name of the command and the remaining words # are the arguments. # # 3. Redirections are performed as described above under REDIRECTION. # # 4. The text after the = in each variable assignment undergoes tilde # expansion, parameter expansion, command substitution, arithmetic # expansion, and quote removal before being assigned to the # variable. So variable left-more assignments have effect on right-more assignments, but not on any other words in the command line.
Am I boiling things down correctly?
I would say so. That also indicates the right change to the documentation: Just put each assignment in an individual export statement: export CFLAGS OPT;CFLAGS='one';OPT="two $CFLAGS";./foo.sh I'm still surprised that it fails on your bash; I get the same (IMO correct) behaviour with bash 2.03 on Solaris. I get failures with bash 2.02, and with /bin/sh on Solaris. /bin/ksh and /usr/xpg4/bin/sh work fine (/usr/xpg4/bin/sh actually is ksh).
So, why should any of this work anywhere? Should we ever expect $OPT to get the right value?
i-must-be-missing-something-really-obvious,-obvious-ly y'rs,
I'd say (without further research) that this was unspecified for Bourne Shell, and got clarified for POSIX Shell - so both recent Bash versions, and the Solaris ksh work fine. Regards, Martin
MvL> I think the best approach is to copy the body of MvL> _portable_fseek and _portable_ftell from 2.2. With that, I MvL> get a setup that atleast looks right (patch attached)
Unfortunately that's not enough, I suspect.
I can't see a problem.
Vanilla release21-maint will give compilation failures, which go away with the patch (essentially what I tried on other systems). But even with these patches, test_largefile fails on the seek(2**31L).
Not for me (i.e. it passes just fine). How exactly does it fail? What version of the test? Can you produce an strace?
FTR: this is a stock Mandrake 8.1 system w/ glibc 2.2.4.
That should be good enough.
I don't have much time to spend looking into this right now, but it would be good to fix for 2.1.2.
Somebody else should probably try this as well. I would not stop the release for that: if it compiles fine when following the instructions, and does the right thing for small files, I think the release should go. Regards, Martin
Barry A. Warsaw wrote AB> Ok, I'd like to make the 2.1.2 release some time in the first AB> half of the week starting 7th Jan, assuming that's ok for the AB> folks who'll need to do the work on the PC/Mac packaging.
I'm doing this this evening; i.e. now.
I'd be more inclined to clone PEP 101 into a PEP 102 with micro release instructions. The nice thing about 101 is that you can just go down the list, checking things off in a linear fashion as you complete each item. I'd be loathe to break up the linearity of that.
Ok. I'm doing this as I go. Should I just check in PEP 102 directly, or is that Not The Done Thing?
AB> I don't have access to creosote.python.org, so someone else's AB> going to need to do this. I can certainly help with any fiddling necessary on creosote. Then again... ...if this is going to be a recurring role, we might just want to give you access to the web cvs tree and creosote.
Whichever works for you.
thanks,
Anthony
--
Anthony Baxter
I notice that pep 101 is pretty strongly focussed on the major releases, not the minor ones. Is it worth making a modified version of this PEP with the minor release steps?
If you don't think you'd get it "right", adding a delta section might be reasonable. Specifically: Don't create a release branch. Instead, just call a code freeze on the maintainance branch, and release from the maintainance branch (just putting on the release tag, i.e. r212) As for the things still to be done, don't forget Include/patchlevel.h :-)
NEWS file - should this have anything other than the socket.sendall() change?
If you can, producing a list of bugs fixed would be nice. It does not need to be exhaustive.
As far as 2.2.1 goes, I'm happy to keep on the patch czar role. Is trying for a release before the conference too aggressive a timeframe?
I'd very much encourage a release in that time frame. Regards, Martin
Ok, I'd like to make the 2.1.2 release some time in the first half of the week starting 7th Jan, assuming that's ok for the folks who'll need to do the work on the PC/Mac packaging.
Cool! I can't speak for the Mac folks -- they may still be exhausted from the 2.2 release effort -- but I can't imagine this would be much of a problem.
I notice that pep 101 is pretty strongly focussed on the major releases, not the minor ones. Is it worth making a modified version of this PEP with the minor release steps?
Great idea!
the things to do:
README file. NEWS file - should this have anything other than the socket.sendall() change?
The 2.1.1 NEWS file had a SF reference of each and every bug that was fixed. Is this worth doing? (If it were me, the answer would be an emphatic "no".)
I don't have access to creosote.python.org, so someone else's going to need to do this.
Barry & I are at your service. I'm guessing you'll also need Fred's help to roll out the docs (are there going to be 2.1.2 docs?) and Tim's for the windows installer (which may be a bit of a pain since we've switched installer builders for 2.2).
As far as 2.2.1 goes, I'm happy to keep on the patch czar role. Is trying for a release before the conference too aggressive a timeframe? There seem to be a number of niggles that'd be nice to have fixed...
That would be very cool! Should be plenty of time if we aim low. --Guido van Rossum (home page: http://www.python.org/~guido/)
[Guido]
I'm guessing you'll also need Fred's help to roll out the docs (are there going to be 2.1.2 docs?) and Tim's for the windows installer (which may be a bit of a pain since we've switched installer builders for 2.2).
Ouch. More than a bit -- I'd have to find the old Wise floppy first (it's not on my disk anymore). But the 16-bit installer is itself "a bug" (often doesn't work) on the recent MS high-end OSes (2000 and XP), so creating another of those is a dubious exercise. We were probably shipping different versions of expat and/or zlib on Windows for 2.1 too (but at least I can suck those binaries out of an installed 2.1 -- or was Windows 2.1 compiled with a binary-incompatible MSVC 5?). Etc. If I do this, it's going to consume at least a day to straighten out all the issues.
[Guido]
I'm guessing you'll also need Fred's help to roll out the docs (are there going to be 2.1.2 docs?) and Tim's for the windows installer (which may be a bit of a pain since we've switched installer builders for 2.2).
[Tim]
Ouch. More than a bit -- I'd have to find the old Wise floppy first (it's not on my disk anymore). But the 16-bit installer is itself "a bug" (often doesn't work) on the recent MS high-end OSes (2000 and XP), so creating another of those is a dubious exercise. We were probably shipping different versions of expat and/or zlib on Windows for 2.1 too (but at least I can suck those binaries out of an installed 2.1 -- or was Windows 2.1 compiled with a binary-incompatible MSVC 5?). Etc. If I do this, it's going to consume at least a day to straighten out all the issues.
2.1 was solidly MSVC 6, so I don't think there were any MSVC 5 issues. Would it be a problem if we used the new installer for 2.1.2? That would be much easier on Tim. There are still some issues (e.g. expat) but I'm not qualified to rule on those. --Guido van Rossum (home page: http://www.python.org/~guido/)
[Guido]
2.1 was solidly MSVC 6, so I don't think there were any MSVC 5 issues.
That matches my recollection, but while I'd bet your life on it I wouldn't bet mine <wink>.
Would it be a problem if we used the new installer for 2.1.2? That would be much easier on Tim.
The real reason to use the new installer is that the old one is, and increasingly as 2000 and XP get more popular, itself "a bug". Getting a 32-bit installer is increasingly necessary, and the old installer can't deal with the Win2K privilege maze at all (usually spelling "insufficient privilege" as "corrupt installation detected" before its first dialog box even appears -- the old Wise 16-bit-installer builder was released when Win95 was brand new).
There are still some issues (e.g. expat) but I'm not qualified to rule on those.
I'll ask Fred about that one offline. It's all doable, it's just going to consume some time.
Would it be a problem if we used the new installer for 2.1.2? That would be much easier on Tim. There are still some issues (e.g. expat) but I'm not qualified to rule on those.
My guess is that 2.1.2 will compile fine with whatever expat installation Tim currently has, if it does, pyexpat will certainly work correctly (or: as good as it did in 2.1.1). Regards, Martin
[Martin v. Loewis]
My guess is that 2.1.2 will compile fine with whatever expat installation Tim currently has, if it does, pyexpat will certainly work correctly (or: as good as it did in 2.1.1).
It changes the structure of the distribution, though: 2.1 Windows Python shipped with xmlparse.dll and xmltok.dll, 2.2 with neither of those but with a single expat.dll instead. Regardless of whether "it works" for Python, I don't think a bugfix release is the time to change the *set* of DLLs we ship. The MSVC project files on the 2.1 branch also have no idea what to do with the current expat setup, and last-second changes just multiply if I fight that too (the 2.1 PCbuild README would also need to be changed; etc). 2.2 is better here, but the old expat setup wasn't "a bug"; people who want the new setup should upgrade to 2.2, where it was first introduced.
It changes the structure of the distribution, though: 2.1 Windows Python shipped with xmlparse.dll and xmltok.dll, 2.2 with neither of those but with a single expat.dll instead. Regardless of whether "it works" for Python, I don't think a bugfix release is the time to change the *set* of DLLs we ship.
Right, I agree on all accounts. Do whatever is most convenient for you. On that topic, is there anybody else in this list who has the necessary software to build a Python Windows release? I feel quite uncomfortable thinking that, if your PC crashes, Windows people would be without Python (actually, *that* uncomfortable is that thought not :-) This would probably the time to step forward offering to build the official 2.1.2 binary distribution. Regards, Martin
On that topic, is there anybody else in this list who has the necessary software to build a Python Windows release? I feel quite uncomfortable thinking that, if your PC crashes, Windows people would be without Python (actually, *that* uncomfortable is that thought not :-)
I have the whole suite working on my laptop too.
This would probably the time to step forward offering to build the official 2.1.2 binary distribution.
But I'm not volunteering. --Guido van Rossum (home page: http://www.python.org/~guido/)
Tim Peters wrote:
[Guido]
I have the whole suite working on my laptop too.
I wasn't going to admit that: that one's a serious license violation <wink>.
Is it really ? Most desktop apps nowadays allow one additional laptop installation. Totally off-topic, of course, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
[Guido]
I have the whole suite working on my laptop too.
[Tim]
I wasn't going to admit that: that one's a serious license violation <wink>.
[MAL]
Is it really ? Most desktop apps nowadays allow one additional laptop installation.
Yes, and my laptop != Guido's laptop. Look at all the trouble you're getting us into here ...
[Martin v. Loewis]
Right, I agree on all accounts. Do whatever is most convenient for you.
I don't care what's convenient, I want to do what's *right* for 2.1.2. I think this got confused because Guido sold "use the new installer-builder" on the grounds that it would be easier for me, but, while that's true, it's also true that the old installer-builder produces broken installers (useless for many Win2K/XP users). The latter is the real reason I want to use the new installer-builder; the old one is quite arguably "a bug".
On that topic, is there anybody else in this list who has the necessary software to build a Python Windows release? I feel quite uncomfortable thinking that, if your PC crashes, Windows people would be without Python (actually, *that* uncomfortable is that thought not :-)
The only pieces you can't get for free over the Web are MSVC 6 and Wise
8.14; the MSVC and Wise project files are in CVS, so it's only the MS and
Wise executables someone would have to obtain. PythonLabs has the physical
CDs for those, so it doesn't matter much if my box crashes; I also have at
least 3 copies of them on backup tapes, and two other copies on two other
machines. Hmm. I probably violated the license agreements at least 4 times
there
This would probably the time to step forward offering to build the official 2.1.2 binary distribution.
Don't I wish. I would like to see us move to a free installer. I built (and checked in) an Inno Setup project file that does "almost all" the good stuff, and advertised on c.l.py for volunteers to take it over. Alas, nobody bit, and I can't justify spending more of my time on it (I could at the time because I wasn't making any progress then getting Wise to let us use a new version of their stuff, and Inno Setup was the only feasible alternative).
Martin v. Loewis writes:
My guess is that 2.1.2 will compile fine with whatever expat installation Tim currently has, if it does, pyexpat will certainly work correctly (or: as good as it did in 2.1.1).
I like that answer. ;-) The catch is that I think Python 2.1.1 includes Expat 1.2, and the Python API changes slightly based on the Expat version. So I think it best to use the Expat shipped with Python 2.1.1. The pyexpat extension should need no changes. -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
participants (12)
-
aahz@rahul.net
-
Andreas Jung
-
Anthony Baxter
-
barry@zope.com
-
Chris McDonough
-
Fred L. Drake, Jr.
-
Guido van Rossum
-
M.-A. Lemburg
-
Martin v. Loewis
-
Neal Norwitz
-
Skip Montanaro
-
Tim Peters