Status: New
Owner: ----
New issue 897 by [email protected]: Can't select
/opt/csw/gcc4/bin/g{cc,++} as the compiler in the presence of /usr/bin/cc
http://code.google.com/p/v8/issues/detail?id=897
The immediate symptom is as follows:
{{{
mac...@testing10x [testing10x]:~/src/v8 > scons
scons: Reading SConscript files ...
TypeError: cannot concatenate 'str' and 'NoneType' objects:
File "/home/maciej/src/v8/SConstruct", line 666:
'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')'
}}}
The reported Environment()["TOOLS"] is:
['default', 'sunlink', 'suncc', 'sunc++', 'sunf95', 'as', 'sunar',
'filesystem', 'gs', 'jar', 'javac', 'javah', 'lex', 'm4', 'rmic', 'rpcgen',
'SCCS', 'tar', 'yacc', 'zip']
I tried a couple options, mainly based on:
http://www.scons.org/wiki/FrequentlyAskedQuestions#head-8d710d3c19337fd42220f0957bdd6bed75985bc8
Here's what I tried:
{{{
diff --git a/SConstruct b/SConstruct
index 2a39583..f1681d0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -645,7 +645,9 @@ def Abort(message):
def GuessToolchain(os):
- tools = Environment()['TOOLS']
+ env_path = ["/opt/csw/gcc4/bin", "/opt/csw/bin", "/usr/bin"]
+ tools = Environment(ENV={"PATH": env_path})['TOOLS']
+ print tools
if 'gcc' in tools:
return 'gcc'
elif 'msvc' in tools:
}}}
{{{
scons toolchain=gcc
}}}
Looking deeper, I inspected Environment().items()["PATH"] and found the
following:
{{{
('ENV',
{'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ccs/bin'}),
}}}
If passing ENV={"PATH": env_path} does not cut it, how to tell scons to use
/opt/csw/gcc4/bin/g{cc,++}?
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev