Fix this Sconstruct error

Having trouble getting the game going or understanding something? Look no further.
Post Reply
xenone
Posts: 2
Joined: Tue Sep 22, 2009 7:56 am

Fix this Sconstruct error

Post 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........
fede
Explorer
Explorer
Posts: 33
Joined: Mon Jan 05, 2009 12:43 am
Location: Italy

Re: Fix this Sconstruct error

Post 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.
Blizzard SuCKs
K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: Fix this Sconstruct error

Post by K776 »

You have either too old a version of scons, or too newer version.

Try upgrading/downgrading till it works.
User avatar
Giszmo
Warrior
Warrior
Posts: 261
Joined: Sat Nov 26, 2005 10:23 pm
Location: Germany
Contact:

Re: Fix this Sconstruct error

Post 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
Post Reply