大家好!
不知道大家有没有在MAC上安装openresty的经验,我在安装openresty是报错,希望大爱能够帮帮忙:
我的MAC OS 10.8.4 ,xcode 5,openresty 1.2.8.5.
我执行./configure --prefix=/usr/local --without-lua51 --with-luajit 正常
make 时报错,不知道是什么原因,怎么解决。
gcc -c -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR -DNDK_SET_VAR -DNDK_SET_VAR -DLUA_DEFAULT_PATH='"/usr/local/gcstorage/lualib/?.lua;/usr/local/gcstorage/lualib/?/init.lua"' -DLUA_DEFAULT_CPATH='"/usr/local/gcstorage/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.18/objs -I objs/addon/ndk -I /opt/gcs_setup/common/ngx_openresty-1.2.8.5/build/luajit-root/usr/local/gcstorage/luajit/include/luajit-2.0 -I ../ngx_lua-0.8.2/src/api -I /opt/local/include -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c
src/core/nginx.c:220:44: error: expected ')'
ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED);
^
src/core/nginx.c:220:25: note: to match this '('
ngx_write_stderr("nginx version: " NGINX_VER NGX_LINEFEED);
^
src/core/nginx.c:426:35: error: use of undeclared identifier 'NGINX_VAR'
inherited = (u_char *) getenv(NGINX_VAR);
^
src/core/nginx.c:447:66: error: expected ')'
"invalid socket number \"%s\" in " NGINX_VAR
^
src/core/ngx_log.h:77:67: note: expanded from macro 'ngx_log_error'
if ((log)->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__)
^
src/core/nginx.c:446:17: note: to match this '('
ngx_log_error(NGX_LOG_EMERG, cycle->log, 0,
^
src/core/ngx_log.h:77:54: note: expanded from macro 'ngx_log_error'
if ((log)->log_level >= level) ngx_log_error_core(level, log, __VA_ARGS__)
^
src/core/nginx.c:594:28: error: use of undeclared identifier 'NGINX_VAR'
var = ngx_alloc(sizeof(NGINX_VAR)
^
src/core/nginx.c:602:25: error: use of undeclared identifier 'NGINX_VAR'
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
^
src/core/ngx_string.h:103:60: note: expanded from macro 'ngx_cpymem'
#define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
^
/usr/include/secure/_string.h:55:36: note: expanded from macro 'memcpy'
? __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest)) \
^
src/core/nginx.c:602:25: error: use of undeclared identifier 'NGINX_VAR'
src/core/ngx_string.h:103:60: note: expanded from macro 'ngx_cpymem'
#define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
^
/usr/include/secure/_string.h:56:33: note: expanded from macro 'memcpy'
: __inline_memcpy_chk (dest, src, len))
^
src/core/nginx.c:602:47: error: use of undeclared identifier 'NGINX_VAR'
p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));
^
src/core/ngx_string.h:103:72: note: expanded from macro 'ngx_cpymem'
#define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
^
src/core/nginx.c:1025:45: error: use of undeclared identifier 'NGX_OLDPID_EXT'
ccf->oldpid.len = ccf->pid.len + sizeof(NGX_OLDPID_EXT);
^
src/core/nginx.c:1033:16: error: use of undeclared identifier 'NGX_OLDPID_EXT'
NGX_OLDPID_EXT, sizeof(NGX_OLDPID_EXT));
^
src/core/ngx_string.h:102:54: note: expanded from macro 'ngx_memcpy'
#define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n)
^
/usr/include/secure/_string.h:55:36: note: expanded from macro 'memcpy'
? __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest)) \
^
src/core/nginx.c:1033:16: error: use of undeclared identifier 'NGX_OLDPID_EXT'
src/core/ngx_string.h:102:54: note: expanded from macro 'ngx_memcpy'
#define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n)
^
/usr/include/secure/_string.h:56:33: note: expanded from macro 'memcpy'
: __inline_memcpy_chk (dest, src, len))
^
10 errors generated.
make[2]: *** [objs/src/core/nginx.o] Error 1
make[1]: *** [build] Error 2
make: *** [all] Error 2