lua-users home
lua-l archive

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




On Wed, Mar 14, 2018 at 12:38 AM, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "Luiz" == Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:

 Luiz> All feedback welcome. Thanks.

Building on freebsd doesn't work without adding CC=cc (since gcc is not
installed by default and if you install it from ports, it's usually
under a version-specific name such as gcc6), and also enabling readline
requires adding -I/usr/local/include and -L/usr/local/lib, or tweaking
things to use libedit instead.

I've tried these, which all seem to work on my system (though obviously
the presence of a port build would make this somewhat moot):

# with base system libedit:
freebsd:
        $(MAKE) $(ALL) CC="cc" SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit"

# ... with readline from ports:
freebsd-readline:
        $(MAKE) $(ALL) CC="cc" SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/local/include" SYSLIBS="-Wl,-E -L/usr/local/lib -lreadline"

# ... with editing disabled
freebsd-noedit:
        $(MAKE) $(ALL) CC="cc" SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E"

and speaking of readline, it would still be good for lua.c to set
rl_readline_name and (maybe) rl_inhibit_completion as discussed
recently.

--
Andrew.

https://reviews.freebsd.org/D13690

The above is a link to my suggested patches to the Lua 5.3 port for FreeBSD to build on FreeBSD 10-12 (9 should work, I haven't tested below 10. HEAD is 12). This also contains the suggested libedit patch that I came to independently. If desired, I would like to confirm with some NetBSD and OpenBSD fellows to see if we can have a standard target for BSD?

I'll be putting together a port file for 5.4 and posting it for review in the next week or so. Andrew, any testing and reporting you can do would push my patches forward. If your interested in pushing the default Lua version up (currently sits at 5.2), I could use some help with that. Ping me if you're interested. 

Russ