[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 alpha Makefile issue
- From: Chris Babcock <cbabcock@...>
- Date: Thu, 3 Feb 2011 16:15:20 -0700
On Thu, Feb 3, 2011 at 10:52 AM, Hisham <hisham.hm@gmail.com> wrote:
> On Thu, Feb 3, 2011 at 9:10 AM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>>> The make target for linux still needs to include ncurses in order to
>>> compile on certain Red Hat flavored distros, including Centos.
>>>
>>> linux:
>>> $(MAKE) $(ALL) MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl
>>> -lreadline -lncurses"
>>>
>>> This is in the 5.1.4 Makefile, but someone either forgot why or
>>> thought that the RH bug this addresses might have been fixed by this time.
>>
>> Indeed. We mostly have Ubuntu nowadays here and plain -lreadline works
>> fine for them and others, such as Mac OS X. Thanks for the report.
>>
>> This has been discussed here before:
>> http://lua-users.org/lists/lua-l/2010-11/msg00220.html
>>
>> Now, should it be -lncurses or -ltermcap?
>
> For reference: in my box I have libncurses* and don't have libtermcap*
> (and it's a fairly complete desktop machine with X, KDE, etc.). 'make
> linux' from lua-5.2.0-alpha worked fine; no need to modify any flags.
>
> I also logged into a Fedora 13 box and got the same results with the
> build. In a 32-bit Fedora 13 box there are both libncurses.so and
> libtermcap.so; in a 64-bit Fedora 13 box (with no build tools
> installed), there was only libncurses.so and no libtermcap.so
> installed. So, I'd say go with "-lncurses".
>
> -- Hisham
On Centos 5.5, both ncurses and libtermcap are in the base repo but
require installation of the development RPMs in order to have the
shared objects available. I've been beating on this machine too long
to know whether either would be installed already on a virgin machine.
The libtermcap-devel RPM is 54KB as opposed to 4.8MB for
ncurses-devel, so (all else being equal) -ltermcap would be better.
Then there's this approach...
linux:
$(MAKE) $(ALL) MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl
-lreadline" || $(MAKE) $(ALL) MYCFLAGS="-DLUA_USE_LINUX"
MYLIBS="-Wl,-E -ldl -lreadline -ltermcap" || $(MAKE) $(ALL)
MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lreadline -lncurses"
The output can get scary, but it compiles correctly and it doesn't ask
users for dev packages they may not need.
Chris
--
51st century guy