Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to make when use 'make -j' #22

Closed
cloudaice opened this issue Jan 8, 2013 · 2 comments
Closed

fail to make when use 'make -j' #22

cloudaice opened this issue Jan 8, 2013 · 2 comments

Comments

@cloudaice
Copy link

i built openresty ngx_openresty-1.2.4.14 on my osx 10.8.1
but when use make -j the error info like this:

make[2]: gcc: Resource temporarily unavailable
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -g -I/usr/local/Cellar/pcre/8.31/include -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR -DNDK_SET_VAR -DNDK_SET_VAR -DLUA_DEFAULT_PATH='"/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua"' -DLUA_DEFAULT_CPATH='"/usr/local/openresty/lualib/?.so"' -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/http -I src/http/modules -I src/os/unix -I ../ngx_devel_kit-0.2.17/objs -I objs/addon/ndk -I /Users/xiangchao/Downloads/ngx_openresty-1.2.4.14/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.0 -I ../ngx_lua-0.7.9/src/api -I objs
-o objs/ngx_modules.o
objs/ngx_modules.c
make[2]: gcc: Resource temporarily unavailable
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
make[1]: *** [build] Error 2
make: *** [all] Error 2

it seems that more process to built it case an error ...

@agentzh
Copy link
Member

agentzh commented Jan 8, 2013

Hello!

On Tue, Jan 8, 2013 at 11:06 AM, 项超 notifications@github.com wrote:

i built openresty ngx_openresty-1.2.4.14 on my osx 10.8.1
but when use make -j the error info like this:

make[2]: gcc: Resource temporarily unavailable

When Gnu make is invoked with the -j option without an integer parameter,
Gnu make will spawn parallel job workers as many as possible, easily
exhausting your system resources, as demonstrated above.

Basically, if your system has N CPU cores, you should specify -j N or -j
(N+1), for example, in case of a dual core CPU:

make -j2

or

make -j3

Best regards,
-agentzh

@cloudaice
Copy link
Author

thank you very much 。I know make with -j option will spawn parallel job as many as possible . it can make ti runs more faster . while i built other software with -j ,it aways ok 。Now I realize it is a bad habit . thanks for your advice!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants