error with envvars.sh when building VMMaker image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

error with envvars.sh when building VMMaker image

Robert Withers
 
I am also getting an error on the image side, I've found, when running
buildspurtrunkvmmakerimage.sh.

~/warren/image$ ./buildspurtrunkvmmakerimage.sh
./buildspurtrunkvmmakerimage.sh: 26: ./envvars.sh: Syntax error: "("
unexpected

thanks,
Robert

Reply | Threaded
Open this post in threaded view
|

Re: error with envvars.sh when building VMMaker image

David T. Lewis
 
On Mon, Oct 12, 2015 at 06:25:48AM -0400, Robert Withers wrote:

>
> I am also getting an error on the image side, I've found, when running
> buildspurtrunkvmmakerimage.sh.
>
> ~/warren/image$ ./buildspurtrunkvmmakerimage.sh
> ./buildspurtrunkvmmakerimage.sh: 26: ./envvars.sh: Syntax error: "("
> unexpected
>
> thanks,
> Robert

I think I recall encountering that one. Some of the scripts specified /bin/sh
in the shebang line, but the scripts required /bin/bash to run. For security
reasons, some recent Linux distros (Ubuntu, maybe others) are linking /bin/sh
to /bin/dash rather than to /bin/bash.

Edit the first line of those scripts and change /bin/sh to /bin/bash and the
problem should go away.

(Eliot, sorry if I forgot to mention this earlier).

Dave

Reply | Threaded
Open this post in threaded view
|

Re: error with envvars.sh when building VMMaker image

Robert Withers
 
David,

I just checked an buildspurtrunkvmmakerimage.sh was set to /bin/sh.
However, envvars.sh, which is where this error occurred, was already
/bin/bash. Strange.

Ok, so I changed buildspurtrunkvmmakerimage.sh to be /bin/bash and it is
still failing, but carrying on past this. I am missing image/changes so
it fails.  Below is the output from buildsputtrunkvmmakerimage.sh:

thanks,
Robert



robert@quotar:~/warren/image$ ./buildspurtrunkvmmakerimage.sh
./updatespurimage.sh: 26: ./envvars.sh: Syntax error: "(" unexpected
cp: cannot stat ‘trunk50.image’: No such file or directory
cp: cannot stat ‘trunk50.changes’: No such file or directory
/usr/bin/md5sum: cogspurlinuxht/lib/squeak/5.0-3427/squeak: No such file
or directory
/usr/bin/md5sum: cogspurlinuxht-15.33.3427.tgz: No such file or directory
--2015-10-12 09:33:17--
http://www.mirandabanda.org/files/Cog/VM/VM.r3427//cogspurlinuxht-15.33.3427.tgz
Resolving www.mirandabanda.org (www.mirandabanda.org)... 69.163.128.250
Connecting to www.mirandabanda.org
(www.mirandabanda.org)|69.163.128.250|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5260651 (5.0M) [text/plain]
Saving to: ‘cogspurlinuxht-15.33.3427.tgz’

cogspurlinuxht-15.33.3427 100%[====================================>]  
5.02M  1.43MB/s in 3.7s

2015-10-12 09:33:21 (1.37 MB/s) - ‘cogspurlinuxht-15.33.3427.tgz’ saved
[5260651/5260651]

cogspurlinuxht/squeak SpurVMMaker.image BuildSqueakSpurTrunkVMMakerImage.st
Could not open the Squeak image file `SpurVMMaker.image'.




On 10/12/2015 08:29 AM, David T. Lewis wrote:

>  
> On Mon, Oct 12, 2015 at 06:25:48AM -0400, Robert Withers wrote:
>> I am also getting an error on the image side, I've found, when running
>> buildspurtrunkvmmakerimage.sh.
>>
>> ~/warren/image$ ./buildspurtrunkvmmakerimage.sh
>> ./buildspurtrunkvmmakerimage.sh: 26: ./envvars.sh: Syntax error: "("
>> unexpected
>>
>> thanks,
>> Robert
> I think I recall encountering that one. Some of the scripts specified /bin/sh
> in the shebang line, but the scripts required /bin/bash to run. For security
> reasons, some recent Linux distros (Ubuntu, maybe others) are linking /bin/sh
> to /bin/dash rather than to /bin/bash.
>
> Edit the first line of those scripts and change /bin/sh to /bin/bash and the
> problem should go away.
>
> (Eliot, sorry if I forgot to mention this earlier).
>
> Dave
>

--
thanks,
Robert

Reply | Threaded
Open this post in threaded view
|

Re: error with envvars.sh when building VMMaker image

Tim Olson
In reply to this post by Robert Withers


On Oct 12, 2015, at 5:25 AM, Robert Withers <[hidden email]> wrote:

> I am also getting an error on the image side, I've found, when running buildspurtrunkvmmakerimage.sh.
>
> ~/warren/image$ ./buildspurtrunkvmmakerimage.sh
> ./buildspurtrunkvmmakerimage.sh: 26: ./envvars.sh: Syntax error: "(“ unexpected

I think this is due to incorrect bash function declaration syntax in that file, which uses both the keyword “function” and the empty parenthesis “()”.

In the syntax described here:

        http://tldp.org/LDP/abs/html/functions.html 

a bash function should either have the form:

        function function_name {
                command…
        }

OR
        function_name () {
                command…
        }

i.e. not both the keyword “function” and the parenthesis.

        — tim

Reply | Threaded
Open this post in threaded view
|

Re: error with envvars.sh when building VMMaker image

Robert Withers
 
Thank you for this info. I started working in Pharo and got their vm
building. The biggest issue was ensuring the build.sh was calling
gcc-4.6, not gcc-4.9.

thanks so much ^^
Robert

On 10/14/2015 12:28 PM, Tim Olson wrote:

>
>
> On Oct 12, 2015, at 5:25 AM, Robert Withers <[hidden email]> wrote:
>
>> I am also getting an error on the image side, I've found, when running buildspurtrunkvmmakerimage.sh.
>>
>> ~/warren/image$ ./buildspurtrunkvmmakerimage.sh
>> ./buildspurtrunkvmmakerimage.sh: 26: ./envvars.sh: Syntax error: "(“ unexpected
>
> I think this is due to incorrect bash function declaration syntax in that file, which uses both the keyword “function” and the empty parenthesis “()”.
>
> In the syntax described here:
>
> http://tldp.org/LDP/abs/html/functions.html
>
> a bash function should either have the form:
>
> function function_name {
> command…
> }
>
> OR
> function_name () {
> command…
> }
>
> i.e. not both the keyword “function” and the parenthesis.
>
> — tim
>