lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


there is no need to compile luasocket yourself if you
are running debian.

If you do want to build them all, the sequence(if
memory serve) is :

lua 5.1.3
make linux
make install

luasocket
make 
make install

make sure luasocket use the same directory as lua
5.1.3(I believe both default to /usr/local rather than
the debian default of /usr)

--- mark morreny <markmorreny@gmail.com> wrote:

> Hi,
> After modifying config file to include
> -I/usr/src/lua-5.1.3/src, I managed
> to get the make process to run.  However, after the
> make is completed, I
> still can't run the luasocket and doing a find
> indicates that socket.lua is
> not found in my system.  Could someone tell me
> what's wrong?
> 
> linux:/usr/src/luasocket-2.0.2# make clean
> cd src; make clean
> make[1]: Entering directory
> `/usr/src/luasocket-2.0.2/src'
> rm -f socket.so.2.0.2  luasocket.o timeout.o
> buffer.o io.o auxiliar.o
> options.o inet.o tcp.o udp.o except.o select.o
> usocket.o
> rm -f mime.so.1.0.2 unix.so mime.o  buffer.o
> auxiliar.o options.o timeout.o
> io.o usocket.o unix.o
> 
> make[1]: Leaving directory
> `/usr/src/luasocket-2.0.2/src'
> linux:/usr/src/luasocket-2.0.2# make
> cd src; make all
> make[1]: Entering directory
> `/usr/src/luasocket-2.0.2/src'
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o luasocket.o luasocket.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o timeout.o timeout.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o buffer.o buffer.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o io.o io.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o auxiliar.o auxiliar.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o options.o options.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o inet.o inet.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o tcp.o tcp.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o udp.o udp.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o except.o except.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o select.o select.c
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o usocket.o usocket.c
> gcc  -O -shared -fpic -o socket.so.2.0.2 luasocket.o
> timeout.o buffer.o io.o
> auxiliar.o options.o inet.o tcp.o udp.o except.o
> select.o usocket.o
> gcc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic
> -I/usr/src/lua-5.1.3/src
> -c -o mime.o mime.c
> gcc  -O -shared -fpic -o mime.so.1.0.2 mime.o
> make[1]: Leaving directory
> `/usr/src/luasocket-2.0.2/src'
> 
> 
> linux:/usr/src/luasocket-2.0.2# lua
> Lua 5.1.3  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> > socket=require("socket")
> stdin:1: module 'socket' not found:
>     no field package.preload['socket']
>     no file './socket.lua'
>     no file '/usr/local/share/lua/5.1/socket.lua'
>     no file
> '/usr/local/share/lua/5.1/socket/init.lua'
>     no file '/usr/local/lib/lua/5.1/socket.lua'
>     no file '/usr/local/lib/lua/5.1/socket/init.lua'
>     no file '/usr/share/lua/5.1/socket.lua'
>     no file '/usr/share/lua/5.1/socket/init.lua'
>     no file './socket.so'
>     no file '/usr/local/lib/lua/5.1/socket.so'
>     no file '/usr/lib/lua/5.1/socket.so'
>     no file '/usr/local/lib/lua/5.1/loadall.so'
> stack traceback:
>     [C]: in function 'require'
>     stdin:1: in main chunk
>     [C]: ?
> >
> 
> 
> 
> 
> > You need to have lua.h somewhere that the
> luasocket makefile will find
> > it; there are two ways to do that, either to
> install lua.h and friends
> > to somewhere on the default search path, or to use
> > -I/usr/src/lua-5.1.3/src or similar in the
> luasocket makefile.
> >
> >
>