Sunday, February 8, 2009

colorgcc from within SCons error: uninitialized value

Eror: Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string at /usr/local/bin/g++ line 211.

Solution, see here:

Replace

$configFile = $ENV{"HOME"} . "/.colorgccrc";

with

my($found_HOME) = 0;
while (my ($key, $value) = each (%ENV))
{
if ($key =~ /HOME/)
{
$found_HOME = 1;
last;
}
}

if ($found_HOME == 0)
{
$ENV{"HOME"} = "/";
}
$configFile = $ENV{"HOME"} . "/.colorgccrc";

No comments: