configure error on centos 5.6 64bit #1

dobe opened this Issue Jun 10, 2011 · 2 comments


None yet
2 participants

dobe commented Jun 10, 2011

hi agentzh

wenn i try to configure ngx_openresty- with luajit i get the following error. (note that the include and lib dirs are there and there are no other lua packages installed on this system) here is the output of configure. any clues?:

./configure     --user=nobody --group=nobody     --with-http_stub_status_module     --with-http_ssl_module     --without-mail_pop3_module     --without-mail_imap_module     --without-mail_smtp_module     --without-http_geo_module     --without-http_memcached_module     --without-http_empty_gif_module     --without-http_autoindex_module     --without-http_fastcgi_module     --without-http_scgi_module     --without-http_uwsgi_module     --without-http_drizzle_module     --without-http_xss_module     --without-http_form_input_module     --without-http_encrypted_session_module     --without-http_array_var_module     --without-http_redis2_module     --without-http_auth_request_module     --without-http_rds_json_module     --without-http_upstream_keepalive_module     --with-luajit
[bd@centi ngx_openresty-]$ ./configure     --user=nobody --group=nobody     --with-http_stub_status_module     --with-http_ssl_module     --without-mail_pop3_module     --without-mail_imap_module     --without-mail_smtp_module     --without-http_geo_module     --without-http_memcached_module     --without-http_empty_gif_module     --without-http_autoindex_module     --without-http_fastcgi_module     --without-http_scgi_module     --without-http_uwsgi_module     --without-http_drizzle_module     --without-http_xss_module     --without-http_form_input_module     --without-http_encrypted_session_module     --without-http_array_var_module     --without-http_redis2_module     --without-http_auth_request_module     --without-http_rds_json_module     --without-http_upstream_keepalive_module     --with-luajit
platform: linux (linux)
cp -r bundle/ build/
cd build
cd LuaJIT-2.0.0-beta7
make PREFIX=/usr/local/openresty/luajit
==== Building LuaJIT 2.0.0-beta7 ====
make -C src
make[1]: Entering directory `/home/bd/tmp/ngx_openresty-'
HOSTCC    buildvm.o
HOSTCC    buildvm_asm.o
HOSTCC    buildvm_peobj.o
HOSTCC    buildvm_lib.o
HOSTCC    buildvm_fold.o
HOSTLINK  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_str.o
CC        lj_tab.o
CC        lj_func.o
CC        lj_udata.o
CC        lj_meta.o
CC        lj_state.o
CC        lj_dispatch.o
CC        lj_vmevent.o
CC        lj_api.o
CC        lj_lex.o
CC        lj_parse.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_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_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   ../lib/vmdef.lua
LINK      luajit
OK        Successfully built LuaJIT
make[1]: Leaving directory `/home/bd/tmp/ngx_openresty-'
==== Successfully built LuaJIT 2.0.0-beta7 ====
make install PREFIX=/usr/local/openresty/luajit DESTDIR=/home/bd/tmp/ngx_openresty-
==== Installing LuaJIT 2.0.0-beta7 to /usr/local/openresty/luajit ====
mkdir -p /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty-
cd src && install -m 0755 luajit /home/bd/tmp/ngx_openresty-
cd src && test -f libluajit.a && install -m 0644 libluajit.a /home/bd/tmp/ngx_openresty- || :
rm -f /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty- /home/bd/tmp/ngx_openresty-
cd src && test -f && \
      install -m 0644 /home/bd/tmp/ngx_openresty- && \
      ldconfig -n /home/bd/tmp/ngx_openresty- && \
      ln -sf /home/bd/tmp/ngx_openresty- && \
      ln -sf /home/bd/tmp/ngx_openresty- || :
/bin/sh: line 2: ldconfig: command not found
cd etc && install -m 0644 luajit.1 /home/bd/tmp/ngx_openresty-
cd etc && sed -e "s|^prefix=.*|prefix=/usr/local/openresty/luajit|" luajit.pc > luajit.pc.tmp && \
      install -m 0644 luajit.pc.tmp /home/bd/tmp/ngx_openresty- && \
      rm -f luajit.pc.tmp
cd src && install -m 0644 lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h /home/bd/tmp/ngx_openresty-
cd lib && install -m 0644 bc.lua v.lua dump.lua dis_x86.lua dis_x64.lua vmdef.lua /home/bd/tmp/ngx_openresty-
==== Successfully installed LuaJIT 2.0.0-beta7 to /usr/local/openresty/luajit ====

Note: the beta releases deliberately do NOT install a symlink for luajit
You can do this now by running this command (with sudo):

  ln -sf luajit-2.0.0-beta7 /home/bd/tmp/ngx_openresty-

export LUAJIT_LIB='/home/bd/tmp/ngx_openresty-'
export LUAJIT_INC='/home/bd/tmp/ngx_openresty-'
cd ..
cd nginx-0.8.54
./configure --prefix=/usr/local/openresty/nginx \
  --with-cc-opt='-O2' \
  --add-module=../echo-nginx-module-0.36rc3 \
  --add-module=../ngx_devel_kit-0.2.17 \
  --add-module=../set-misc-nginx-module-0.21 \
  --add-module=../ngx_lua-0.1.6rc9 \
  --add-module=../headers-more-nginx-module-0.15rc1 \
  --add-module=../srcache-nginx-module-0.12rc4 \
  --add-module=../memc-nginx-module-0.12rc1 \
  --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
  --user=nobody --group=nobody --with-http_stub_status_module --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_geo_module --without-http_memcached_module --without-http_empty_gif_module --without-http_autoindex_module --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module
checking for OS
 + Linux 2.6.18-238.9.1.el5 x86_64
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.1.2 20080704 (Red Hat 4.1.2-50)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-Wl,-rpath,/usr/local/openresty/luajit/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 ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
configuring additional modules
adding module in ../echo-nginx-module-0.36rc3
 + ngx_http_echo_module was configured
adding module in ../ngx_devel_kit-0.2.17
 + ngx_devel_kit was configured
adding module in ../set-misc-nginx-module-0.21
 + ngx_http_set_misc_module was configured
adding module in ../ngx_lua-0.1.6rc9
checking for LuaJIT library in /home/bd/tmp/ngx_openresty- and /home/bd/tmp/ngx_openresty- (specified by the LUAJIT_LIB and LUAJIT_INC env) ... not found
        ./configure: error: the ngx_lua addon requires the lua or luajit library and LUAJIT_LIB is defined as /home/bd/tmp/ngx_openresty- and LUAJIT_INC /home/bd/tmp/ngx_openresty-, but we cannot find LuaJIT there.
failed to run command: ./configure --prefix=/usr/local/openresty/nginx \
  --with-cc-opt='-O2' \
  --add-module=../echo-nginx-module-0.36rc3 \
  --add-module=../ngx_devel_kit-0.2.17 \
  --add-module=../set-misc-nginx-module-0.21 \
  --add-module=../ngx_lua-0.1.6rc9 \
  --add-module=../headers-more-nginx-module-0.15rc1 \
  --add-module=../srcache-nginx-module-0.12rc4 \
  --add-module=../memc-nginx-module-0.12rc1 \
  --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
  --user=nobody --group=nobody --with-http_stub_status_module --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_geo_module --without-http_memcached_module --without-http_empty_gif_module --without-http_autoindex_module --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module

thx in advance, bernd

dobe commented Jun 10, 2011

found it myself ... on would say RTFM ;-) i had to add ldconfig to my path like:
export PATH=$PATH:/sbin

dobe closed this Jun 10, 2011


agentzh commented Jun 10, 2011

I'll add an explicit check for ldconfig in PATH in ngx_openresty's configure script when luajit is enabled. I myself also ran into this issue when building ngx_openresty on a fresh debian box :P

damajor referenced this issue Mar 10, 2012


Make bundle fail #10

@agentzh agentzh added a commit that referenced this issue Mar 16, 2013

@agentzh agentzh upgraded ngx_lua to 0.7.17 and ngx_echo to 0.43. also applied the off…
…icial hotfix #1 patch for LuaJIT 2.0.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment