fukiki opened a new issue #3281:
URL: https://github.com/apache/apisix/issues/3281


   # Improve Docs
   
   
   ## Please describe which part of docs should be improved or typo fixed
   
   When using the latest master branch code, apisix failed to run `make init`:
   ```sh
   ./bin/apisix init
   lua: error loading module 'socket.core' from file 
'/Users/kiki/Documents/DevelopTools/src/github-apisix/deps/lib/lua/5.1/socket/core.so':
        
dlopen(/Users/kiki/Documents/DevelopTools/src/github-apisix/deps/lib/lua/5.1/socket/core.so,
 6): Symbol not found: _luaL_openlib
     Referenced from: 
/Users/kiki/Documents/DevelopTools/src/github-apisix/deps/lib/lua/5.1/socket/core.so
     Expected in: dynamic lookup
   stack traceback:
        [C]: in ?
        [C]: in function 'require'
        ...lopTools/src/github-apisix/deps/share/lua/5.1/socket.lua:12: in main 
chunk
        [C]: in function 'require'
        ...ols/src/github-apisix/deps/share/lua/5.1/socket/http.lua:10: in main 
chunk
        [C]: in function 'require'
        ./apisix/cli/etcd.lua:22: in main chunk
        [C]: in function 'require'
        ./apisix/cli/ops.lua:18: in main chunk
        [C]: in function 'require'
        ./bin/apisix:34: in main chunk
        [C]: in ?
   make: *** [init] Error 1
   ```
   
   **Reason**
   
   LuaSocket uses the _luaL_openlib function from Lua 5.0. It should also be 
available on Lua 5.1 (and 5.2) if certain compatibility flags are defined in 
luaconf.h while building the Lua executable. Maybe, when installing luaSocket 
by executing `make deps` (`luarocks install luasocket`), the executable was 
built without compatibility flags.
   
   ## Describe the solution you'd like
   
   Download the source code to compile and install luasocket, then replace the 
executable file in deps for the project.
   
   Document 
[how-to-build.md](https://github.com/apache/apisix/blob/master/doc/how-to-build.md)
 should be improved, add the method and steps of compiling luasocket.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to