[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building Lua 5.3 from Lua.org on FreeBSD
- From: Russell Haley <russ.haley@...>
- Date: Wed, 26 Jul 2017 19:28:14 -0700
On Wed, Jul 26, 2017 at 9:18 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> > Can you describe a simple test for dynamic library support?
>>
>> Save this file to dummy.c:
>>
>> [...]
>
> I think there is a simpler way. Just run the following:
>
> $ lua
>> = package.loadlib("a", "b")
>
> If the error message is something about not finding "a" (e.g.,
> "a: cannot open shared object file"), then you have DLL support.
> Otherwise, the error message is something like "dynamic libraries
> not enabled".
Thank you, this test was excellent. LUA_USE_DLOPEN is required to load
a dynamic library in Lua on FreeBSD (12-current). However,
LUA_USE_READLINE seems to have no effect either way. My target was:
freebsd:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN
-I/usr/local/include" SYSLIBS="-L/usr/local/lib -Wl,-E -lreadline"
CC=cc
With -DLUA_USE_DLOPEN:
russellh@prescott:/tmp/lua-5.3.4/src% ./lua
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> = package.loadlib("a", "b")
nil Shared object "a" not found, required by "lua" open
Without:
russellh@prescott:/tmp/lua-5.3.4/src% ./lua
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
> =package.loadlib("a","b")
nil dynamic libraries not enabled; check your Lua installation absent
Russ
- References:
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Charles Heywood
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Russell Haley
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Luiz Henrique de Figueiredo
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Russell Haley
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Luiz Henrique de Figueiredo
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Russell Haley
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Russell Haley
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Luiz Henrique de Figueiredo
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Russell Haley
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Luiz Henrique de Figueiredo
- Re: Building Lua 5.3 from Lua.org on FreeBSD, Roberto Ierusalimschy