Skip to content

Instantly share code, notes, and snippets.

@jgonggrijp
Last active October 1, 2015 06:44
Show Gist options
  • Save jgonggrijp/f90feab8247687cf105d to your computer and use it in GitHub Desktop.
Save jgonggrijp/f90feab8247687cf105d to your computer and use it in GitHub Desktop.
Problem trying to install OpenResty 1.9.3.1 on OS X 10.10.5

Downloaded and extracted ngx_openresty-1.9.3.1.tar.gz to /Volumes/scratch (a RAM disk) and from within the openresty directory did

./configure --with-ipv6 --with-cc-opt="-I/opt/local/include -I/usr/local/include" --with-ld-opt="-L/opt/local/lib -L/usr/local/lib" --with-http_postgres_module

See configure_output.txt for the output of the configuration script and build_nginx-1.9.3_objs_autoconf.err for the contents of build/nginx-1.9.3/objs/autoconf.err.

I have made multiple attempts with slightly varying configure options, all with very similar results if not exactly the same.

----------------------------------------
checking for C compiler
----------------------------------------
checking for --with-ld-opt="-Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib"
----------------------------------------
checking for gcc builtin atomic operations
----------------------------------------
checking for C99 variadic macros
----------------------------------------
checking for gcc variadic macros
----------------------------------------
checking for unistd.h
----------------------------------------
checking for inttypes.h
----------------------------------------
checking for limits.h
----------------------------------------
checking for sys/filio.h
----------------------------------------
checking for sys/param.h
----------------------------------------
checking for sys/mount.h
----------------------------------------
checking for sys/statvfs.h
----------------------------------------
checking for crypt.h
objs/autotest.c:3:10: fatal error: 'crypt.h' file not found
#include <crypt.h>
^
1 error generated.
----------
#include <sys/param.h>
#include <crypt.h>
int main() {
return 0;
}
----------
cc -o objs/autotest objs/autotest.c
----------
----------------------------------------
checking for kqueue's EVFILT_TIMER
----------------------------------------
checking for Darwin 64-bit kqueue millisecond timeout bug
----------------------------------------
checking for sendfile()
----------------------------------------
checking for atomic(3)
----------------------------------------
checking for poll()
----------------------------------------
checking for /dev/poll
objs/autotest.c:4:10: fatal error: 'sys/devpoll.h' file not found
#include <sys/devpoll.h>
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/devpoll.h>
int main() {
int n, dp; struct dvpoll dvp;
dp = 0;
dvp.dp_fds = NULL;
dvp.dp_nfds = 0;
dvp.dp_timeout = 0;
n = ioctl(dp, DP_POLL, &dvp);
if (n == -1) return 1;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for crypt()
----------------------------------------
checking for F_READAHEAD
objs/autotest.c:7:14: error: use of undeclared identifier 'F_READAHEAD'
fcntl(0, F_READAHEAD, 1);;
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
int main() {
fcntl(0, F_READAHEAD, 1);;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for posix_fadvise()
objs/autotest.c:7:5: warning: implicit declaration of function 'posix_fadvise' is invalid in C99 [-Wimplicit-function-declaration]
posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);;
^
objs/autotest.c:7:28: error: use of undeclared identifier 'POSIX_FADV_SEQUENTIAL'
posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);;
^
1 warning and 1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
int main() {
posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for O_DIRECT
objs/autotest.c:7:23: error: use of undeclared identifier 'O_DIRECT'
fcntl(0, F_SETFL, O_DIRECT);;
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
int main() {
fcntl(0, F_SETFL, O_DIRECT);;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for F_NOCACHE
----------------------------------------
checking for directio()
objs/autotest.c:8:5: warning: implicit declaration of function 'directio' is invalid in C99 [-Wimplicit-function-declaration]
directio(0, DIRECTIO_ON);;
^
objs/autotest.c:8:17: error: use of undeclared identifier 'DIRECTIO_ON'
directio(0, DIRECTIO_ON);;
^
1 warning and 1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/fcntl.h>
int main() {
directio(0, DIRECTIO_ON);;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for statfs()
----------------------------------------
checking for statvfs()
----------------------------------------
checking for dlopen()
----------------------------------------
checking for sched_yield()
----------------------------------------
checking for SO_SETFIB
objs/autotest.c:7:31: error: use of undeclared identifier 'SO_SETFIB'
setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 0);
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
int main() {
setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for SO_REUSEPORT
----------------------------------------
checking for SO_ACCEPTFILTER
objs/autotest.c:7:31: error: use of undeclared identifier 'SO_ACCEPTFILTER'
setsockopt(0, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0);
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
int main() {
setsockopt(0, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for TCP_DEFER_ACCEPT
objs/autotest.c:9:32: error: use of undeclared identifier 'TCP_DEFER_ACCEPT'
setsockopt(0, IPPROTO_TCP, TCP_DEFER_ACCEPT, NULL, 0);
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
int main() {
setsockopt(0, IPPROTO_TCP, TCP_DEFER_ACCEPT, NULL, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for TCP_KEEPIDLE
objs/autotest.c:9:32: error: use of undeclared identifier 'TCP_KEEPIDLE'
setsockopt(0, IPPROTO_TCP, TCP_KEEPIDLE, NULL, 0);
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
int main() {
setsockopt(0, IPPROTO_TCP, TCP_KEEPIDLE, NULL, 0);
setsockopt(0, IPPROTO_TCP, TCP_KEEPINTVL, NULL, 0);
setsockopt(0, IPPROTO_TCP, TCP_KEEPCNT, NULL, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for TCP_FASTOPEN
objs/autotest.c:9:32: error: use of undeclared identifier 'TCP_FASTOPEN'
setsockopt(0, IPPROTO_TCP, TCP_FASTOPEN, NULL, 0);
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
int main() {
setsockopt(0, IPPROTO_TCP, TCP_FASTOPEN, NULL, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for TCP_INFO
objs/autotest.c:9:24: error: invalid application of 'sizeof' to an incomplete type 'struct tcp_info'
socklen_t optlen = sizeof(struct tcp_info);
^ ~~~~~~~~~~~~~~~~~
objs/autotest.c:9:38: note: forward declaration of 'struct tcp_info'
socklen_t optlen = sizeof(struct tcp_info);
^
objs/autotest.c:10:35: error: variable has incomplete type 'struct tcp_info'
struct tcp_info ti;
^
objs/autotest.c:9:38: note: forward declaration of 'struct tcp_info'
socklen_t optlen = sizeof(struct tcp_info);
^
objs/autotest.c:15:46: error: use of undeclared identifier 'TCP_INFO'
getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen);
^
3 errors generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
int main() {
socklen_t optlen = sizeof(struct tcp_info);
struct tcp_info ti;
ti.tcpi_rtt = 0;
ti.tcpi_rttvar = 0;
ti.tcpi_snd_cwnd = 0;
ti.tcpi_rcv_space = 0;
getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for accept4()
objs/autotest.c:7:5: warning: implicit declaration of function 'accept4' is invalid in C99 [-Wimplicit-function-declaration]
accept4(0, NULL, NULL, SOCK_NONBLOCK);
^
objs/autotest.c:7:28: error: use of undeclared identifier 'SOCK_NONBLOCK'
accept4(0, NULL, NULL, SOCK_NONBLOCK);
^
1 warning and 1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
int main() {
accept4(0, NULL, NULL, SOCK_NONBLOCK);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for eventfd()
objs/autotest.c:4:10: fatal error: 'sys/eventfd.h' file not found
#include <sys/eventfd.h>
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/eventfd.h>
int main() {
(void) eventfd(0, 0);
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for eventfd() (SYS_eventfd)
objs/autotest.c:7:13: error: use of undeclared identifier 'SYS_eventfd'
int n = SYS_eventfd;
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <sys/syscall.h>
int main() {
int n = SYS_eventfd;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for int size
----------------------------------------
checking for long size
----------------------------------------
checking for long long size
----------------------------------------
checking for void * size
----------------------------------------
checking for uint64_t
----------------------------------------
checking for sig_atomic_t
----------------------------------------
checking for sig_atomic_t size
----------------------------------------
checking for socklen_t
----------------------------------------
checking for in_addr_t
----------------------------------------
checking for in_port_t
----------------------------------------
checking for rlim_t
checking for uintptr_t
checking for system byte ordering
----------------------------------------
checking for size_t size
----------------------------------------
checking for off_t size
----------------------------------------
checking for time_t size
----------------------------------------
checking for AF_INET6
----------------------------------------
checking for setproctitle()
objs/autotest.c:7:5: warning: implicit declaration of function 'setproctitle' is invalid in C99 [-Wimplicit-function-declaration]
setproctitle("test");;
^
1 warning generated.
Undefined symbols for architecture x86_64:
"_setproctitle", referenced from:
_main in autotest-d67511.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
----------
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
int main() {
setproctitle("test");;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for pread()
----------------------------------------
checking for pwrite()
----------------------------------------
checking for sys_nerr
107
----------------------------------------
checking for localtime_r()
----------------------------------------
checking for posix_memalign()
----------------------------------------
checking for memalign()
objs/autotest.c:5:28: fatal error: 'malloc.h' file not found
#include <malloc.h>
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <malloc.h>
int main() {
void *p; p = memalign(4096, 4096);
if (p == NULL) return 1;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib
----------
----------------------------------------
checking for mmap(MAP_ANON|MAP_SHARED)
----------------------------------------
checking for mmap("/dev/zero", MAP_SHARED)
----------------------------------------
checking for System V shared memory
----------------------------------------
checking for POSIX semaphores
objs/autotest.c:8:23: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
if (sem_init(&sem, 1, 0) == -1) return 1;
^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
^
objs/autotest.c:9:19: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
sem_destroy(&sem);;
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
2 warnings generated.
----------------------------------------
checking for POSIX semaphores in libpthread
objs/autotest.c:8:23: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
if (sem_init(&sem, 1, 0) == -1) return 1;
^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
^
objs/autotest.c:9:19: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
sem_destroy(&sem);;
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
2 warnings generated.
----------------------------------------
checking for POSIX semaphores in librt
objs/autotest.c:8:23: warning: 'sem_init' is deprecated [-Wdeprecated-declarations]
if (sem_init(&sem, 1, 0) == -1) return 1;
^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
^
objs/autotest.c:9:19: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations]
sem_destroy(&sem);;
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
2 warnings generated.
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
----------
#include <sys/types.h>
#include <unistd.h>
#include <semaphore.h>
int main() {
sem_t sem;
if (sem_init(&sem, 1, 0) == -1) return 1;
sem_destroy(&sem);;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib -lrt
----------
----------------------------------------
checking for struct msghdr.msg_control
----------------------------------------
checking for ioctl(FIONBIO)
----------------------------------------
checking for struct tm.tm_gmtoff
----------------------------------------
checking for struct dirent.d_namlen
----------------------------------------
checking for struct dirent.d_type
----------------------------------------
checking for sysconf(_SC_NPROCESSORS_ONLN)
----------------------------------------
checking for openat(), fstatat()
----------------------------------------
checking for getaddrinfo()
----------------------------------------
checking for libpq library (via pg_config)
----------------------------------------
checking for libpq library version 9.1
90404
----------------------------------------
checking for LuaJIT library in /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib and /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl)
objs/autotest.c:8:5: error: unsupported Lua language version
# error unsupported Lua language version
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <lauxlib.h>
int main() {
#if LUA_VERSION_NUM != 501
# error unsupported Lua language version
#endif
(void) luaL_newstate();;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -I /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib -L/Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib -lluajit-5.1 -lm -ldl
----------
----------------------------------------
checking for LuaJIT library in /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib and /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env)
objs/autotest.c:8:5: error: unsupported Lua language version
# error unsupported Lua language version
^
1 error generated.
----------
#include <sys/types.h>
#include <unistd.h>
#include <lauxlib.h>
int main() {
#if LUA_VERSION_NUM != 501
# error unsupported Lua language version
#endif
(void) luaL_newstate();;
return 0;
}
----------
cc -pipe -O2 -I/opt/local/include -I/usr/local/include -I /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 -o objs/autotest objs/autotest.c -Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib -L/Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib -lluajit-5.1 -lm
----------
platform: macosx (darwin)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20150622
make TARGET_STRIP=@: CCDEBUG=-g CC=cc PREFIX=/usr/local/openresty/luajit
==== Building LuaJIT 2.1.0-alpha ====
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src
HOSTCC host/minilua.o
HOSTLINK host/minilua
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTCC host/buildvm_asm.o
HOSTCC host/buildvm_peobj.o
HOSTCC host/buildvm_lib.o
HOSTCC host/buildvm_fold.o
HOSTLINK host/buildvm
BUILDVM lj_vm.S
ASM lj_vm.o
CC lj_gc.o
BUILDVM lj_ffdef.h
CC lj_err.o
CC lj_char.o
BUILDVM lj_bcdef.h
CC lj_bc.o
CC lj_obj.o
CC lj_buf.o
CC lj_str.o
CC lj_tab.o
CC lj_func.o
CC lj_udata.o
CC lj_meta.o
CC lj_debug.o
CC lj_state.o
CC lj_dispatch.o
CC lj_vmevent.o
CC lj_vmmath.o
CC lj_strscan.o
CC lj_strfmt.o
CC lj_api.o
CC lj_profile.o
CC lj_lex.o
CC lj_parse.o
CC lj_bcread.o
CC lj_bcwrite.o
CC lj_load.o
CC lj_ir.o
CC lj_opt_mem.o
BUILDVM lj_folddef.h
CC lj_opt_fold.o
CC lj_opt_narrow.o
CC lj_opt_dce.o
CC lj_opt_loop.o
CC lj_opt_split.o
CC lj_opt_sink.o
CC lj_mcode.o
CC lj_snap.o
CC lj_record.o
CC lj_crecord.o
BUILDVM lj_recdef.h
CC lj_ffrecord.o
CC lj_asm.o
CC lj_trace.o
CC lj_gdbjit.o
CC lj_ctype.o
CC lj_cdata.o
CC lj_cconv.o
CC lj_ccall.o
CC lj_ccallback.o
CC lj_carith.o
CC lj_clib.o
CC lj_cparse.o
CC lj_lib.o
CC lj_alloc.o
CC lib_aux.o
BUILDVM lj_libdef.h
CC lib_base.o
CC lib_math.o
CC lib_bit.o
CC lib_string.o
CC lib_table.o
CC lib_io.o
CC lib_os.o
CC lib_package.o
CC lib_debug.o
CC lib_jit.o
CC lib_ffi.o
CC lib_init.o
AR libluajit.a
CC luajit.o
BUILDVM jit/vmdef.lua
DYNLINK libluajit.so
LINK luajit
OK Successfully built LuaJIT
==== Successfully built LuaJIT 2.1.0-alpha ====
make install TARGET_STRIP=@: CCDEBUG=-g CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=/Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root
==== Installing LuaJIT 2.1.0-alpha to /usr/local/openresty/luajit ====
mkdir -p /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/bin /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/share/man/man1 /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/pkgconfig /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/share/luajit-2.1.0-alpha/jit /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/share/lua/5.1 /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/lua/5.1
cd src && install -m 0755 luajit /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/bin/luajit-2.1.0-alpha
cd src && test -f libluajit.a && install -m 0644 libluajit.a /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.a || :
rm -f /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.2.1.0.dylib /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.dylib /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.2.dylib
cd src && test -f libluajit.so && \
install -m 0755 libluajit.so /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.2.1.0.dylib && \
: /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib && \
ln -sf libluajit-5.1.2.1.0.dylib /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.dylib && \
ln -sf libluajit-5.1.2.1.0.dylib /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/libluajit-5.1.2.dylib || :
cd etc && install -m 0644 luajit.1 /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/share/man/man1
cd etc && sed -e "s|^prefix=.*|prefix=/usr/local/openresty/luajit|" -e "s|^multilib=.*|multilib=lib|" luajit.pc > luajit.pc.tmp && \
install -m 0644 luajit.pc.tmp /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib/pkgconfig/luajit.pc && \
rm -f luajit.pc.tmp
cd src && install -m 0644 lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1
cd src/jit && install -m 0644 bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua dis_x86.lua dis_x64.lua dis_arm.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua vmdef.lua /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/share/luajit-2.1.0-alpha/jit
==== Successfully installed LuaJIT 2.1.0-alpha to /usr/local/openresty/luajit ====
Note: the development releases deliberately do NOT install a symlink for luajit
You can do this now by running this command (with sudo):
ln -sf luajit-2.1.0-alpha /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/bin/luajit
export LUAJIT_LIB='/Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='/Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
cd nginx-1.9.3
sh ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2 -I/opt/local/include -I/usr/local/include' \
--add-module=../ngx_devel_kit-0.2.19 \
--add-module=../echo-nginx-module-0.58 \
--add-module=../xss-nginx-module-0.05 \
--add-module=../ngx_coolkit-0.2rc3 \
--add-module=../set-misc-nginx-module-0.29 \
--add-module=../form-input-nginx-module-0.11 \
--add-module=../encrypted-session-nginx-module-0.04 \
--add-module=../ngx_postgres-1.0rc7 \
--add-module=../srcache-nginx-module-0.30 \
--add-module=../ngx_lua-0.9.16 \
--add-module=../ngx_lua_upstream-0.03 \
--add-module=../headers-more-nginx-module-0.26 \
--add-module=../array-var-nginx-module-0.04 \
--add-module=../memc-nginx-module-0.16 \
--add-module=../redis2-nginx-module-0.12 \
--add-module=../redis-nginx-module-0.3.7 \
--add-module=../rds-json-nginx-module-0.14 \
--add-module=../rds-csv-nginx-module-0.06 \
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib' \
--with-ipv6 --with-http_ssl_module
checking for OS
+ Darwin 14.5.0 x86_64
checking for C compiler ... found
+ using Clang C compiler
+ clang version: 7.0.0 (clang-700.0.72)
checking for --with-ld-opt="-Wl,-rpath,/usr/local/openresty/luajit/lib -L/opt/local/lib -L/usr/local/lib" ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... not found
checking for Darwin specific features
+ kqueue found
checking for kqueue's EVFILT_TIMER ... found
checking for Darwin 64-bit kqueue millisecond timeout bug ... not found
checking for sendfile() ... found
checking for atomic(3) ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for crypt() ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... not found
checking for O_DIRECT ... not found
checking for F_NOCACHE ... found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... not found
checking for TCP_KEEPIDLE ... not found
checking for TCP_FASTOPEN ... not found
checking for TCP_INFO ... not found
checking for accept4() ... not found
checking for eventfd() ... not found
checking for eventfd() (SYS_eventfd) ... not found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... not found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found but is not working
checking for System V shared memory ... found
checking for POSIX semaphores ... found but is not working
checking for POSIX semaphores in libpthread ... found but is not working
checking for POSIX semaphores in librt ... not found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in ../ngx_devel_kit-0.2.19
+ ngx_devel_kit was configured
adding module in ../echo-nginx-module-0.58
+ ngx_http_echo_module was configured
adding module in ../xss-nginx-module-0.05
+ ngx_http_xss_filter_module was configured
adding module in ../ngx_coolkit-0.2rc3
+ ngx_coolkit_module was configured
adding module in ../set-misc-nginx-module-0.29
found ngx_devel_kit for ngx_set_misc; looks good.
+ ngx_http_set_misc_module was configured
adding module in ../form-input-nginx-module-0.11
found ngx_devel_kit for ngx_form_input; looks good.
+ ngx_http_form_input_module was configured
adding module in ../encrypted-session-nginx-module-0.04
+ ngx_http_encrypted_session_module was configured
adding module in ../ngx_postgres-1.0rc7
checking for libpq library (via pg_config) ... found
checking for libpq library version 9.1 ... found
+ ngx_postgres was configured
adding module in ../srcache-nginx-module-0.30
+ ngx_http_srcache_filter_module was configured
adding module in ../ngx_lua-0.9.16
checking for LuaJIT library in /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib and /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... not found
checking for LuaJIT library in /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib and /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 (specified by the LUAJIT_LIB and LUAJIT_INC env) ... not found
./configure: error: ngx_http_lua_module requires the Lua or LuaJIT library and LUAJIT_LIB is defined as /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/lib and LUAJIT_INC (path for lua.h) /Volumes/scratch/ngx_openresty-1.9.3.1/build/luajit-root/usr/local/openresty/luajit/include/luajit-2.1, but we cannot find LuaJIT there.
ERROR: failed to run command: sh ./configure --prefix=/usr/local/openresty/nginx \...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment