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

cannot get to work using nginx 1.9.4 #1

Open
MarkBlah opened this issue May 22, 2016 · 3 comments
Open

cannot get to work using nginx 1.9.4 #1

MarkBlah opened this issue May 22, 2016 · 3 comments

Comments

@MarkBlah
Copy link

Hello, thanks for spending the time in writing this,

I'm getting the following error:

2016/05/22 21:33:16 [error] 27095#0: *3 lua entry thread aborted: runtime error: error loading module 'lua/maxminddb' from file '/usr/share/nginx/lualib/lua/maxminddb.so':
/usr/share/nginx/lualib/lua/maxminddb.so: undefined symbol: luaL_setfuncs
stack traceback:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf:84):2: in function <content_by_lua(nginx.conf:84):1>, client: x.x.x.x, server: localhost, request: "GET /test HTTP/1.1",

I've tried compiling with both 5.1 and 5.2 in make file with same result

Let me know your thoughts

@fabled
Copy link
Owner

fabled commented May 23, 2016

Sounds like it's picking the #include headers from wrong lua version. Did you pass LUA_PKG and/or LUA_CFLAGS/LUA_CMOD at build time?

@MarkBlah
Copy link
Author

yes, my bad :) very cool! got it working perfectly with lua5.1!

I am trying to get it loaded using nginx+lua (openresty), getting the following error message:

2016/05/24 15:05:00 [error] 18855#0: *5167 lua entry thread aborted: runtime error: error loading module 'maxminddb' from file '/usr/share/nginx/lualib/maxminddb.so':
/usr/share/nginx/lualib/maxminddb.so: undefined symbol: luaopen_maxminddb
stack traceback:
coroutine 0:
[C]: in function 'require'
content_by_lua(nginx.conf:91):2: in function <content_by_lua(nginx.conf:91):1>, client: x.x.x.x, server: localhost, request: "GET /test HTTP/1.1", host: "x.x.x.x"

has me stumped, if i find the solution i'll share

@fabled
Copy link
Owner

fabled commented May 24, 2016

What is the full CFLAGS/LDFLAGS you are using? The function is defined, but perhaps it is removed by linker if --as-needed was added somewhere. Perhaps adding -Wl,--no-as-needed to LDFLAGS fixes it?

Alternatively could you attach the broken .so, or nm -D dump of it?

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