chef / dep-selector-libgecode

Bundled Gecode Libraries for dep-selector
Apache License 2.0
11 stars 26 forks source link

Use default number of parallel jobs #32

Closed miry closed 9 years ago

miry commented 10 years ago

Sometime we use not very super buper hardware. And 5 parallel compile workers eat memory and CPU. So the simple instance from Digital Ocean could not build the gem.

virtual memory exhausted: Cannot allocate memory
make[1]: *** [gecode/int/count.o] Error 1
make[1]: *** Waiting for unfinished jobs....
g++: internal compiler error: Killed (program cc1plus)

To change the number of jobs, you can provide via env: MAKEOPTS ='-j 5'

ymmtmdk commented 10 years ago

This patch is nice for me. In AWS, I can build the gem if I use this and Clang.

danielsdeleo commented 9 years ago

This will slow down the build by default for anyone who doesn't know in advance to set the magical environment variable. In the comments to this pull request, I've described a way you can use ohai to auto detect the available ram and scale the concurrency: https://github.com/opscode/dep-selector-libgecode/pull/19