Question

I have two gcc versions installed on my linux host, one is 4.8.1, another is 4.4.7. I want to use 4.8.1 while compile my code. After i set distcc, gcc -v will print the collect 4.8.1, but distcc -v will still print 4.4.7.

So when i use pump make -j4 CC=distcc CXX=distcc to compile my project, it will pop below error:

cc1plus: error: unrecognized command line option "-std=c++11"

It seems that distcc don't use the correct compiler. How can i specified the compiler for distcc?

Was it helpful?

Solution

Still didn't find the easy way, but can compile like below:

GCC_HOME=/path/of/gcc make -j4 CC="LD_LIBRARY_PATH=$GCC_HOME/mpfr-3.1.2/lib:$GCC_HOME/mpc-1.0.1/lib:$GCC_HOME/gmp-5.1.2/lib:$GCC_HOME/lib:$GCC_HOME/lib64 distcc $GCC_HOME/bin/gcc" CXX="LD_LIBRARY_PATH=$GCC_HOME/mpfr-3.1.2/lib:$GCC_HOME/mpc-1.0.1/lib:$GCC_HOME/gmp-5.1.2/lib:$GCC_HOME/lib:$GCC_HOME/lib64 distcc $GCC_HOME/bin/g++"

But in my invironment, distcc still can't work for pump mode

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