views:

35

answers:

1

This should be a pretty straightforward issue -- I'm trying to compile Lua (or rather lua-vec, which is a minor variant) on a CentOS Linux install, and I get the following error:

[jt@flyboy src]#make linux
make all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
make[1]: Entering directory `/jt/flyboy/fly/lua/lua-vec/src'
gcc -o lua  lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lhistory -lncurses
/usr/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status
make[1]: *** [lua] Error 1

That would suggest the readline lib is not installed. But...

[jt@flyboy src]#ls /usr/lib/libreadline*
/usr/lib/libreadline.so.5  /usr/lib/libreadline.so.5.1

Interestingly, if I rearrange the order of readline/history/ncurses, whichever is first triggers the same error, so I suspect that this is some sort of a folder-specification problem, not a missing library problem.

Any ideas?


yum install readline-devel.x86_64 readline-devel.i386 ncurses-devel.i386 ncurses-devel.x86_64  

seems to have done the trick! The odd thing is I have compiled this before without these libs... but enough time pondering life's mysteries...

+1  A: 

libreadline is not enough. You need libreadline-dev.

mcandre
or readline-devel on CentOS. `yum install readline-devel`
nos
Thank you, nos.
mcandre
The package names are different on CentOS. I had actually tried this solution earlier, but got tripped up by the different names -- see my posted solution for the correct ones.
Tony Nirvalla