Cannot find GOOS

Bug #934020 reported by Russel Winder on 2012-02-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SCons Go Tools
Undecided
Unassigned

Bug Description

Just retried a Go build using SCons for the Go versions of one of my "toy examples", and got:

KeyError: 'GOOS':
  File "/home/users/russel/Progs/Applications/Pi_Quadrature/SConstruct", line 214:
    goEnvironment = Environment ( tools = [ 'go' ] )
  File "/home/Checkouts/Mercurial/SCons/bootstrap/src/engine/SCons/Environment.py", line 999:
    apply_tools(self, tools, toolpath)
  File "/home/Checkouts/Mercurial/SCons/bootstrap/src/engine/SCons/Environment.py", line 105:
    env.Tool(tool)
  File "/home/Checkouts/Mercurial/SCons/bootstrap/src/engine/SCons/Environment.py", line 1783:
    tool(self)
  File "/home/Checkouts/Mercurial/SCons/bootstrap/src/engine/SCons/Tool/__init__.py", line 180:
    self.generate(env, *args, **kw)
  File "/home/users/russel/.scons/site_scons/site_tools/go/go.py", line 389:
    goos, goarch = _get_host_platform(env)
  File "/home/users/russel/.scons/site_scons/site_tools/go/go.py", line 97:
    return config['GOOS'], config['GOARCH']

Not sure why this should be:

|> printenv | grep ^GO
GOOGLETEST_HOME=/home/users/russel/lib.Linux.x86_64/GoogleTest
GOBIN=/home/Checkouts/Mercurial/Go/bin_Linux_x86_64
GOARCH=amd64
GOROOT=/home/Checkouts/Mercurial/Go
GOOS=linux

I also checked that os.environ['GOOS'] was set and correct when SCons executes.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers