Page 1 of 1

Fix this Sconstruct error

Posted: Wed Sep 23, 2009 10:32 am
by xenone
I'm using Linux, I've downloaded the latest glob2-0.9.4.4.tar.gz and installed all dependencies listed in the official web site. But when tring to compile the source using typing 'scons'. It shows this error msg

scons: Reading SConscript files ...
NameError: global name 'AddOption' is not defined:
File "/home/user/Downs/pks/glob2-0.9.4.4/SConstruct", line 321:
main()
File "/home/user/Downs/pks/glob2-0.9.4.4/SConstruct", line 221:
AddOption('--portaudio',

A file called Sconstruct is in my source directory and in its line 220 to 236 shows this

def main():
AddOption('--portaudio',
dest='portaudio',
type='string',
nargs=1,
action='store',
metavar='portaudio',
help='should portaudio be used')
env = Environment()
try:
env.Clone()
except AttributeError:
env.Clone = env.Copy

if not env['CC']:
print "No compiler found in PATH. Please install gcc or another compiler."
Exit(1)

The line 321 only shows this:
main()

Should I edit this file for get away from this compile trouble. Or is there anything ?
PLease help me........

Re: Fix this Sconstruct error

Posted: Thu Sep 24, 2009 3:59 pm
by fede
no, the SConstruct file is good, you just get errors by your computer configuration (missing packages or so), probably compiler shows lines of code where these missings appears.
Let's go ahead on other post.

Re: Fix this Sconstruct error

Posted: Fri Sep 25, 2009 12:33 am
by K776
You have either too old a version of scons, or too newer version.

Try upgrading/downgrading till it works.

Re: Fix this Sconstruct error

Posted: Tue Jan 26, 2010 11:39 am
by Giszmo
this issue was me being too fast at "fixing" a deprecated warning of scons. try now. it should be fixed in source.
hg clone http://hg.globulation2.org/glob2-new
cd glob2-new
hg update beta4-rc
scons

or go to your existing hg clone and do
hg pull
hg update beta4-rc
scons

regards