lua-users home
lua-l archive

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

On Feb 06, 2005, at 05:16, Diego Nehab wrote:

Sigh... thanks for the clarification. :) I will try to get this to work
with both Lua 5.0 and Lua 5.1 when I release LuaSocket 2.0 final (soon).

That would be great :)

In the meantime, I tried to cargo cult the build, but to no eval:

% cd luasocket-2.0-beta3
% lub
(info) compile: 'gcc -O2 -fno-common -c -o auxiliar.o auxiliar.c'
(info) compile: 'gcc -O2 -fno-common -c -o buffer.o buffer.c'
(info) compile: 'gcc -O2 -fno-common -c -o except.o except.c'
(info) compile: 'gcc -O2 -fno-common -c -o inet.o inet.c'
(info) compile: 'gcc -O2 -fno-common -c -o io.o io.c'
(info) compile: 'gcc -O2 -fno-common -c -o luasocket.o luasocket.c'
(info) compile: 'gcc -O2 -fno-common -c -o mime.o mime.c'
(info) compile: 'gcc -O2 -fno-common -c -o options.o options.c'
(info) compile: 'gcc -O2 -fno-common -c -o select.o select.c'
(info) compile: 'gcc -O2 -fno-common -c -o tcp.o tcp.c'
(info) compile: 'gcc -O2 -fno-common -c -o timeout.o timeout.c'
(info) compile: 'gcc -O2 -fno-common -c -o udp.o udp.c'
(info) compile: 'gcc -O2 -fno-common -c -o usocket.o usocket.c'
(info) link: 'gcc -bundle -undefined dynamic_lookup -o auxiliar.o buffer.o except.o inet.o io.o luasocket.o mime.o options.o select.o tcp.o timeout.o udp.o usocket.o'

Even though it seems to build properly, I get "symbol `_luaopen_socket' not found" when trying "require( 'socket' )":

lua: Example.lua:200: error loading package `socket' (symbol `_luaopen_socket' not found)
stack traceback:
        [C]: in function `require'
        Example.lua:200: in main chunk
        [C]: ?

I tried to rename the luasocket.c "luaopen_socket" function to "_luaopen_socket" but that didn't help.

In any case, this was not an entire waste of time as I took this opportunity to build a diminutive build system named "lub" (aka "Lua build"):

"lub" expects a "lubfile" which describe what to build. Here is one for Luiz's lalarm library:

        [ "" ] = "alarm",
        [ "object.names" ] = { "lalarm" }

I managed to compile, build and use several of Luiz's libraries that way. As well as Kepler's LuaFileSystem.

Thanks to Mike Pall for unlocking the door to the kingdom :)


PA, Onnay Equitursay