lua-users home
lua-l archive

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


On Wed, Jul 26, 2017 at 4:24 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> My make skills are weak and there may be a sexier way to do this, but
>> the link below is the minimum change required to build Lua on FreeBSD.
>> I threw in LUA_USE_POSIX and it didn't visibly change the build (tee
>> hee, that's funny).
>>
>> http://termbin.com/geo9
>
> I'd just use SYSCFLAGS and SYSCFLAGS. And you need to use LUA_USE_LINUX
> if you want dynamic libraries and LUA_USE_READLINE if you want readline
> support:
>
> freebsd:
>         $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -I/usr/local/include" SYSLIBS="-L/usr/local/lib -Wl,-E -lreadline" CC=cc
>
> The question remains whether you need to add "-ldl" to SYSLIBS. The bsd
> target does not include "-ldl" and so I guess the same applies to freebsd.
>
> Note that LUA_USE_LINUX only does this in luaconf.h:
>
> #if defined(LUA_USE_LINUX)
> #define LUA_USE_POSIX
> #define LUA_USE_DLOPEN          /* needs an extra library: -ldl */
> #define LUA_USE_READLINE        /* needs some extra libraries */
> #endif
>
> There is nothing really specific about Linux here.

Sorry, I'm doing too many things and clipping details by mistake. This
define points out something that didn't come up last night. If -ldl is
used I get a compiler error (I'm not on FBSD this morning). I don't
see it in the tarball Makefile so I wonder out loud if this is
something that is different in the git Makefile (and hence why it
didn't come up last night when modifying the tarball)? In the past I
have used the git head revision and built with LUA_USE_LINUX and
removed the -ldl flag. I'll have to do more research on what -ldl does
and what is meant by dynamic libraries in this context, and if it's
applicable to FreeBSD.   :)

Just an FYI I'm also discussions with the current FreeBSD Lua53 port
maintainer to take over maintainership as he doesn't use FreeBSD at
work anymore and isn't comfortable patching Lua. While the bug list
for lua 5.3.4 is daunting (wink), my love for the language has
overwhelmed my better judgement. Anyone who has concerns about this
please shoot me an email, scream "NOOOOO!" on the mailing list, or
forever hold your peace (or at least until 5.4 comes out).

Regards,
Russ