./configure on Zope27HEAD with Python 2.2.2
Hi, Just ran ./configure using Python 2.2.2. I got the following output: (on FreeBSD 5.0) Configuring Zope installation Testing for an acceptable Python interpreter... Python version 2.2.2 found at /usr/local/bin/python let: arith: syntax error: "i = i + 1" let: arith: syntax error: "i = i + 1" [: 1: unexpected operator let: arith: syntax error: "i = i + 1" [: 1: unexpected operator let: arith: syntax error: "i = i + 1" [: 1: unexpected operator let: arith: syntax error: "i = i + 1" FreeBSD's shell doesn't support let "i=i+1" constructs: It works fine if I change the shell to /usr/local/bin/bash. An ugly fix seems to be to rename configure to configure.bash and create a configure such as: #!/bin/sh # force bash shell `which bash` ./configure.bash Other fix is to explain in the docs that you need to run bash ./configure on systems such as FreeBSD Anybody knows a nicer way to fix this? Pieter
Thanks for the warning. I know very little about BSD's shell (I don't even know what the default BSD shell is). FWIW, the need for bash is mentioned in INSTALL.txt (although I admit I thought it would work under other shells). Does anyone care enough to fix configure to work properly on BSD? On Thu, 2003-06-19 at 19:39, PieterB wrote:
Hi,
Just ran ./configure using Python 2.2.2. I got the following output: (on FreeBSD 5.0)
Configuring Zope installation
Testing for an acceptable Python interpreter...
Python version 2.2.2 found at /usr/local/bin/python let: arith: syntax error: "i = i + 1"
let: arith: syntax error: "i = i + 1"
[: 1: unexpected operator let: arith: syntax error: "i = i + 1"
[: 1: unexpected operator let: arith: syntax error: "i = i + 1"
[: 1: unexpected operator let: arith: syntax error: "i = i + 1"
FreeBSD's shell doesn't support let "i=i+1" constructs: It works fine if I change the shell to /usr/local/bin/bash. An ugly fix seems to be to rename configure to configure.bash and create a configure such as: #!/bin/sh # force bash shell `which bash` ./configure.bash Other fix is to explain in the docs that you need to run bash ./configure on systems such as FreeBSD
Anybody knows a nicer way to fix this?
Pieter
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Does anyone care enough to fix configure to work properly on BSD?
i=$(($i+1)) -- Jamie Heilman http://audible.transient.net/~jamie/ "You came all this way, without saying squat, and now you're trying to tell me a '56 Chevy can beat a '47 Buick in a dead quarter mile? I liked you better when you weren't saying squat kid." -Buddy
Jamie Heilman writes:
Does anyone care enough to fix configure to work properly on BSD?
i=$(($i+1))
Whatever happened to the old tried-but-true: i=`expr $i + 1` Running an external process may be slower, but you don't need to run ./configure all that often unless you're developing Zope itself (and even then, not all *that* often). I suspect using expr is more portable to the whole family of sh-derived shells than any of the more new-fangled ways. Sheesh, who ever imagined I'd be the curmudgeon? -Fred -- Fred L. Drake, Jr. <fred at zope.com> PythonLabs at Zope Corporation
Fred L. Drake, Jr. wrote:
Whatever happened to the old tried-but-true: i=`expr $i + 1`
nothing, its just overkill
I suspect using expr is more portable to the whole family of sh-derived shells than any of the more new-fangled ways.
Arithmetic expansion has been around for a long time, I wouldn't worry about it. -- Jamie Heilman http://audible.transient.net/~jamie/ "I was in love once -- a Sinclair ZX-81. People said, "No, Holly, she's not for you." She was cheap, she was stupid and she wouldn't load -- well, not for me, anyway." -Holly
participants (4)
-
Chris McDonough -
Fred L. Drake, Jr. -
Jamie Heilman -
PieterB