Reputation: 1
In trying to install ruby 1.9.2, I get the error:
Error running 'make -j8', please read $HOME/.rvm/log/ruby-1.9.2-p320/1372884536_make.log There has been an error while running make. Halting the installation.
Then the log says:
gcc: Internal error: Killed (program cc1) Please submit a full bug report. See for instructions. gcc: Internal error: Killed (program cc1) Please submit a full bug report. See for instructions. make[1]: *** [callback-5.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [callback-4.o] Error 1 gcc: Internal error: Killed (program cc1) Please submit a full bug report. See for instructions. make[1]: *** [callback-2.o] Error 1 make[1]: Leaving directory `$HOME/.rvm/src/ruby-1.9.2-p320/ext/dl/callback' make: *** [mkmain.sh] Error 1
Any idea why I am getting this error? I am running Debian 5.0.9 lenny
Answer:
I discovered that the problem was with running make with 8 threads (make -j8). For some reason this does not work on my system. To solve the problem I ran the following function before running rvm install 1.9.2
:
make() { if [[ $@ == "-j8" ]]; then command make -j4; else command make "$@"; fi; }
What this does is whenever make -j8
is ran, the function will replace it with make -j4
If this still does not work, you can just run make normally with the following function:
make() { if [[ $@ == "-j8" ]]; then command make; else command make "$@"; fi; }
Upvotes: 0
Views: 753
Reputation: 53158
RVM by default uses number of threads equal to number to CPU cores, you can override the number of threads on command line:
rvm install 1.9.2 -j 1
this will use only one thread for compiling ruby and seem safest bet if compilation fails with multiple threads.
Upvotes: 2