Problem with BASH in Puppy2??

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Problem with BASH in Puppy2??

#1 Post by Dougal »

I've been getting the same error with a lot of configure scripts -- scripts that run fine in 1.0.8. This bit of script:

Code: Select all

if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
    (test "X$CXX" != "Xg++"))) ; then
gives an error in the last three parantheses..
Spacing them all out solves the problem, but the question is why the error appeared?

This isn't a new major version of BASH, so maybe it's a result of adding BASH-Diff?

Should this be in the Bugs section? Hmm.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#2 Post by John Doe »

Rarsa and I have run across this also. It's very strange.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#3 Post by rarsa »

I'll talk to william and ask him if he thinks this is a problem with the bashdiff.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#4 Post by BarryK »

I've been scratching my head over that one too. Never occurred to me that
it might be bash-diff.
Oh, maybe I'll go back to plain bash for puppy 2.01, as it's right at the 12th
hour -- I'll make a iso with plain bash and try it.

keenerd
Posts: 176
Joined: Sat 20 Aug 2005, 19:24

#5 Post by keenerd »

Why not just add the spaces? Lots of things in regular bash break if you forget to add the spaces, most notably around the equals sign in an IF test.

For such a small thing that may not really be a bug, getting rid of bash-diff seems a little extreme.

billstclair
Posts: 106
Joined: Mon 27 Feb 2006, 01:23
Location: Upstate New York
Contact:

#6 Post by billstclair »

I investigated this a week or so back. Compiled the latest bash from source. It had the same "problem" with barfing on unspaced closing parens. I tried the unspaced parens in a number of different shells and discovered that bash and ksh don't like unspaced parens, but csh and tcsh do. My conclusion is that the people generating scripts with unspaced parens are probably using csh (or an older version of bash), and neglected to test their scripts with bash. I consider this to be a bug in their scripts.

I used the following line to test the different shells:

Code: Select all

(( echo foo ))

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#7 Post by rarsa »

Here is the reply from William:
William wrote:Curious... since my patch doesn't touch any of command substitution and sub-shell. I seems to remember a discussion in Bash mailing list about something like this issue. By "standard bash", do you mean Bash-3.0.0?

My patch is against Bash-3.0.0. Bash-3.0 goes up to 3.0.16 (I think),
and then there is Bash-3.1. I think I should upgrade. :-)
Last edited by rarsa on Sat 17 Jun 2006, 15:43, edited 1 time in total.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

http://dotpups.de/puppy-releases/2.00/s ... figure.pup

This is just a small script:

Code: Select all

#!/bin/bash

sed -i "s/)))/) ) )/g" configure
Run it, before you run ./configure.

So to compile something:

fixconfigure
./configure --prefix=/usr
make&&make install

Mark

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#9 Post by BarryK »

Yeah, but we don't have this problem in 1.0x though, do we?
1.0x uses standard bash. Perhaps we should install bash-diff in 1.0x and try it.

or, maybe its not the closing braces themselves, but something else in that line.
because, there are other places in the configure scripts that do have ")))" together
and it's no problem.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#10 Post by rarsa »

duplicate
Last edited by rarsa on Sun 18 Jun 2006, 03:10, edited 1 time in total.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#11 Post by rarsa »

I think that we can rule out bashdiff.

I tried the

Code: Select all

(( echo foo ))
In Fedora Core 5 and got the error. It uses bash 3.1.7

The strange part is that I was able to configure subversion without a problem.

I then compiled bash with the bashdiff applied and subversion also configured without a problem.

This leaves us with something in Puppy.

Could it be that one of the variables in that if statement has a value that the configure script is not expecting?
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#12 Post by John Doe »

rarsa wrote:The strange part is that I was able to configure subversion without a problem.
I find it to be very intermittent also. Some apps it's there, some it's not.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#13 Post by rarsa »

John Doe wrote:
rarsa wrote:The strange part is that I was able to configure subversion without a problem.
I find it to be very intermittent also. Some apps it's there, some it's not.
In the case of subversion. the strange part is that it gets the error in Puppy but not in Fedora. In both cases the simple example gave an error.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
fitzhugh
Posts: 217
Joined: Fri 16 Jun 2006, 02:58
Location: Berkeley

What is the status of this please?

#14 Post by fitzhugh »

I'm not clear on this... should I use fixconfigure each time I compile something in order to prevent possible errors? Is there now another solution? Is there any harm in running it just in case?

So far I don't think I've had this problem, but have only compiled a few things.
Fitzhugh

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

Run it in case you get errors.
I had no problems yet using it :)

The better solution will be to find the reason for this behaviour.
Must be a bug, as the compiler is the same in Puppy1 (where you don't get those errors).
Even with fixconfigure I could not compile Mplayer cleanly in Puppy2, in Puppy 108 then it worked like a charm.

Be shure to use the latest update of fixconfigure:
http://www.puppyos.com/nfphpbb/viewtopic.php?t=338

Mark

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#16 Post by rarsa »

It's really not puppy. After some more testing I was able to recreate in Fedora with a very simple example.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Ted Dog
Posts: 3965
Joined: Wed 14 Sep 2005, 02:35
Location: Heart of Texas

BASH fixed available

#17 Post by Ted Dog »


Post Reply