lua won't build

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

lua won't build

Larry Wyble

I tried to build a new version of lua because I was getting several
errors trying to incorporate it into Conky. When I tried to build the
newer version I got errors from readline so I installed
readline-6.3.tar.gz but I still get errors like the following trying to
build lua:

make[1]: Entering directory `/usr/local/src/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/usr/local/src/lua-5.2.3/src'
gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/usr/local/src/lua-5.2.3/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/local/src/lua-5.2.3/src'

Any help appreciated, Thanks

Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Jeff Pohlmeyer
On Sat, Aug 9, 2014 at 12:06 PM, Larry Wyble <[hidden email]> wrote:

> but I still get errors like the following trying to build lua:

> make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
> make[2]: Entering directory `/usr/local/src/lua-5.2.3/src'
> gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline
> /usr/local/lib/libreadline.so: undefined reference to `tputs'
>...
> collect2: error: ld returned 1 exit status
> make[2]: *** [lua] Error 1

> Any help appreciated, Thanks


Looks like maybe you need -lncurses ?

 - Jeff

Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Larry Wyble
I'm not getting you. I have ncurses installed You mean I need -lncurses
in the Makefile? Why wouldn't it already be in there if it's required?
Makes no sense to me.  ??

Thanks


On Sat, 9 Aug 2014 12:10:21 -0500
Jeff Pohlmeyer <[hidden email]> wrote:

> On Sat, Aug 9, 2014 at 12:06 PM, Larry Wyble <[hidden email]>
> wrote:
>
> > but I still get errors like the following trying to build lua:
>
> > make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl
> > -lreadline" make[2]: Entering directory
> > `/usr/local/src/lua-5.2.3/src' gcc -o lua   lua.o liblua.a -lm
> > -Wl,-E -ldl -lreadline /usr/local/lib/libreadline.so: undefined
> > reference to `tputs'
> >...
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [lua] Error 1
>
> > Any help appreciated, Thanks
>
>
> Looks like maybe you need -lncurses ?
>
>  - Jeff
>


Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Jeff Pohlmeyer
On Sat, Aug 9, 2014 at 12:41 PM, Larry Wyble <[hidden email]> wrote:

>> Looks like maybe you need -lncurses ?

> I'm not getting you. I have ncurses installed You mean I need -lncurses
> in the Makefile? Why wouldn't it already be in there if it's required?
> Makes no sense to me.  ??

Try this:

make -C src clean all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl
-lreadline -lncurses"

 - Jeff

Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Larry Wyble
I'll be damned.  lol
How could you tell from that error that I needed to call -lncurses?

Anyway, Thanks a bunch.




On Sat, 9 Aug 2014 12:57:02 -0500
Jeff Pohlmeyer <[hidden email]> wrote:

> On Sat, Aug 9, 2014 at 12:41 PM, Larry Wyble <[hidden email]>
> wrote:
>
> >> Looks like maybe you need -lncurses ?
>
> > I'm not getting you. I have ncurses installed You mean I need
> > -lncurses in the Makefile? Why wouldn't it already be in there if
> > it's required? Makes no sense to me.  ??
>
> Try this:
>
> make -C src clean all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl
> -lreadline -lncurses"
>
>  - Jeff
>


Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Luiz Henrique de Figueiredo
In reply to this post by Larry Wyble
> gcc -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline
> /usr/local/lib/libreadline.so: undefined reference to `tputs'

The readme says:

"If you get link errors after that, then try "make linux MYLIBS=-ltermcap"
http://www.lua.org/manual/5.2/readme.html

Could you please try this?

Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Sean Conner
In reply to this post by Larry Wyble
It was thus said that the Great Larry Wyble once stated:
> I'll be damned.  lol
> How could you tell from that error that I needed to call -lncurses?

  From the following output you included in your initial email:

/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
/usr/local/lib/libreadline.so: undefined reference to `BC'

  That means that there's either a missing library during the linking stage.
A "man tputs" or Google "tputs" would reveal it's a curses library call.
With enough experience you know that you need "-lcurses".  If you don't have
the experience, then a few more Google searches would give you the answer
(I think).

  -spc


Reply | Threaded
Open this post in threaded view
|

Re: lua won't build

Larry Wyble
On Sat, 9 Aug 2014 16:01:04 -0400
Sean Conner <[hidden email]> wrote:

> It was thus said that the Great Larry Wyble once stated:
> > I'll be damned.  lol
> > How could you tell from that error that I needed to call -lncurses?

8<  snip
 
>   From the following output you included in your initial email:
>
>   That means that there's either a missing library during the linking
> stage. A "man tputs" or Google "tputs" would reveal it's a curses
> library call. With enough experience you know that you need
> "-lcurses".  If you don't have the experience, then a few more Google
> searches would give you the answer (I think).
>
>   -spc
 
I'll remember that. Thanks