[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luasocket problem
- From: manfred <manfred.lotz@...>
- Date: Sat, 19 Nov 2005 21:09:27 +0100
On Sat, 19 Nov 2005 13:41:22 -0200, Pedro Martelletto wrote:
> On Sat, Nov 19, 2005 at 01:35:47PM +0100, Manfred Lotz wrote:
>> I'm running FreeBSD and I downloaded luasocket-2.0-beta3. I could build
>> it and when trying a small test script I got errors.
>
> Doesn't FreeBSD have an updated port of LuaSocket?
>
No, only an older one: version 1.4
> If that's the case, perhaps taking look at the OpenBSD port can be of
> some help as to what compile options/directives or patches are needed:
>
> http://www.openbsd.org/cgi-bin/cvsweb.cgi/ports/net/luasocket/
>
> -p.
In the end it helped me to experiment in a better way and to
get it done although I don't feel like understanding very much about how
dynamic linking is organized under FreeBSD.
I got it working by linking like this:
ld -o lsocket.so -L/usr/local/lib -llua -llualib -shared $(LOBJS)
As Jens said in his answer it seems important to make available the
symbols of the Lua C API.
First I tried -fPIC and -DPIC but it seems it works without.
Then I tried -DUSE_POPEN=1 -DUSE_DLOPEN=1 but this isn't necessary
either.
Thanks a lot.
--
Manfred