BenV's notes

Archive for July, 2014

Lua 5.2.3 on Slackware64 14.1

by on Jul.04, 2014, under Software

Just ran into this one, noting it down for anyone else with this error:

Trying to compile Lua 5.2.3 (which should try to invest some in autoconf / cmake or something) gave me this lovely error:

make[2]: Entering directory `/usr/src/lua-5.2.3/src'
gcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tputs'
echo Stom product, Makefile editen, dan make MYLIBS="-lncurses" anders breekt ie op readline.
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../lib64/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
make[2]: *** [lua] Error 1
make[2]: Leaving directory `/usr/src/lua-5.2.3/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/src/lua-5.2.3/src'
make: *** [linux] Error 2

Reason: it needs to link against ncursus in Slackware (or alternatively libtermcap, but ncursus worked for me).
Solution – use make MYLIBS=”-lncursus”:

make MYLIBS="-lncurses"
cd src && make linux
make[1]: Entering directory `/usr/src/lua-5.2.3/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/usr/src/lua-5.2.3/src'
gcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline -lncurses
gcc -o luac luac.o liblua.a -lm -Wl,-E -ldl -lreadline -lncurses
make[2]: Leaving directory `/usr/src/lua-5.2.3/src'
make[1]: Leaving directory `/usr/src/lua-5.2.3/src'

Leave a Comment more...

Breaking slackpkg in unexpected ways

by on Jul.04, 2014, under Software

I just ran into something funny:

root@machine:~$ slackpkg update

Your slackpkg.conf is outdated. Please, edit it using slackpkg.conf.new
as example or overwrite it with slackpkg.conf.new.

You can use 'slackpkg new-config' to do that.

root@machine:~$

Huh. I didn’t do anything weird with slackpkg….
Waaait a minute…

root@machine:~$ unset GREP_OPTIONS
root@machine:~$ slackpkg update
# Cut out the fetching of Changelog.txt
No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)?

Apparently slackpkg breaks if you set GREP_OPTIONS to “–color=always”. Good to know for when I break it this way next time 😉

Leave a Comment more...

Archives

  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)