Question

What's the correct way of using scons with distcc? The obvious way of using CC="distcc g++" or CXX doesn't work.

Did anyone ever succeed in combining the two?

Thanks!

Was it helpful?

Solution

Have you configured CC or CXX via an environment variable? SCons doesn't pollute its default environment with variables from the calling environment. However, you may initialize the SCons environment from the OS environment (or preferably a subset of it):

import os
env = Environment(ENV = os.environ)
env.Program('yourprogram.cpp')

Alternatively, this could also work (haven't used SCons in a long time):

env = Environment(CXX='distcc g++')
env.Program('yourprogram.cpp')

Have a look at the man page for an overview of all the variables used in SCons.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top