[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: Fri, 28 Jul 2017 13:28:54 -0700
On Fri, Jul 28, 2017 at 9:05 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> I try to draw attention to the inconsistency, especially since you
>> went to the trouble to make a target for FreeBSD.
>
> I'd love if we could make the bsd and freebsd targets the same:
>
> bsd:
> $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
>
>
> freebsd:
> $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
>
> Currently, the difference is just support for LUA_USE_READLINE.
> Any bsd experts around? Does the bsd target work in freebsd or vice-versa?
>
> Support for readline is the major source of noise in the Makefile,
> even in Linux. It currently requires that the readline headers be
> installed, and they come from a dev package which is not in the default
> installation.
>
>> A mathematician's solution would be to generalize, Linux, Max OSX and
>> FreeBSD all being special cases of OSIX (something not quite POSIX,
>> get it?) Then LUA_USE_OSIX offends no one and is understood by
>> no one. Fair enough?
>
> I'd love if all *ix system were the same and reduce the targets to
> posix and ix, but alas life is not simple. Not even POSIX systems are
> the same: some support for dynamic loading, some don't. Some that do,
> required -ldl, others don't. Some require "-Wl,-E", others don't. Hence
> the many variations:
>
> bsd:
> SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
>
> freebsd:
> SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"
>
> linux:
> SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
>
> macosx:
> SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
>
> posix:
> SYSCFLAGS="-DLUA_USE_POSIX"
>
> solaris:
> SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"
>
> I'd love to reduce the number of targets if this would reduce noise
> and at the same time worked in many platforms. But I don't know how.
> I welcome concrete suggestions from those who have access to these
> platforms.
>
Getting a large diverse task like this that requires money and a
central organizer are where the FreeBSD foundation kicks in for the
FreeBSD project. These problems are where I see something like a Lua
Foundation being a very useful tool for Lua.org.
Perhaps the alternative could be for PUC-Rio to get someone to do a
thesis (or whatever it is you smart people call it) on the portability
of Lua?
However an external organization would be ideal because it could
rotate out volunteers and ensure consistency over longer periods of
time.
$0.02,
Russ