Description
This issue was originally created at: 2009-04-24 12:54:20.
This issue was reported by: rspangler
.
rspangler said at 2009-04-24 12:54:20
The following SConstruct:
e = Environment(tools=['msvc', 'mslink'], HELLO='hello')
e.Program('$HELLO', [])
causes SCons to die:
scons: Reading SConscript files ...
(and that's all the output I get; scons --debug=stacktrace
is the same output)
An older version of SCons (0.98.2) also dies, but reports the following more-helpful error:
scons: Reading SConscript files ...
scons: *** AttributeError `'str' object has no attribute 'exe'' trying to evaluate `$HELLO.exe'
Enclosing the variable in ${}
is a workaround:
e = Environment(tools=['msvc', 'mslink'], HELLO='hello')
e.Program('${HELLO}', [])
gregnoel said at 2009-05-13 20:22:40
Bug party triage. Issue #804 and issue #2404 both deal with "lazy actions" where the command evaluation is delayed until later. It may well be that they are dups; at a minimum, they should be worked together.
One possibility is that the problem occurs when the action is evaluated to make the command an implicit dependency. And Steven sez, "... maybe we're tacking on the suffix and then doing the substitution, when we should be doing it in the opposite order for this case."
Has at least two workarounds, so not a high priority. Assigning to 'research' since we don't know what's going on; as soon as you do, bring it back to be re-triaged by setting the milestone back to '-unspecified-'.
gregnoel said at 2010-07-21 17:00:30
Bug party triage. Bump the priority of this issue.