4

Hi I ve downloaded lua extracted it and tried to make it

sg1@kalanamith:~/lua-5.2.1$ make linux test

after that um getting this error

ar rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o 
ranlib liblua.a
gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.c 
gcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lncurses 
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/home/sg1/lua-5.2.1/src'
make[1]: *** [linux] Error 2 
make[1]: Leaving directory `/home/sg1/lua-5.2.1/src'
make: *** [linux] Error 2

This is my first day with Lua so Ill be great full if any one can give me a help. thank you in advance

Ridcully
23.7k8 gold badges76 silver badges88 bronze badges
asked Dec 26, 2012 at 19:05
3
  • 3
    Do you have ncurses installed? Commented Dec 26, 2012 at 19:08
  • 12.04 is the Linux version Commented Dec 26, 2012 at 19:08
  • eh ncursers? ill check . Commented Dec 26, 2012 at 19:09

2 Answers 2

6

Looks like you're missing the ncurses library. Make sure you've got all dependencies installed, e.g. by using sudo apt-get install libncurses-dev (might depend on your system/version).

answered Dec 26, 2012 at 19:09
Sign up to request clarification or add additional context in comments.

1 Comment

Hey Thank you seems like now the Lua is compiling.
2

Apply the patch used to compile the Debian/Ubuntu package:

Index: lua5.2-5.2.0.obsolete.0.298371916710497/src/Makefile
===================================================================
--- lua5.2-5.2.0.obsolete.0.298371916710497.orig/src/Makefile 2012年05月04日 16:27:35.000000000 +0200
+++ lua5.2-5.2.0.obsolete.0.298371916710497/src/Makefile 2012年05月04日 16:27:35.000000000 +0200
@@ -103,7 +103,7 @@
 generic: $(ALL)
 linux:
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
 macosx:
 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"

Original source: http://patch-tracker.debian.org/patch/series/view/lua5.2/5.2.1-3/no-ncurses-dependency.patch

Cheers

answered Dec 26, 2012 at 23:08

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.