Slackware This Forum is for the discussion of Slackware Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
12-31-2016, 05:51 AM
#1
Member
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102
Rep:
error when compile lua 5.3.3
i try to compile lua 5.3.3 using slackbuild with changed version and have this error:
Code:
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 lutf8lib.o loadlib.o linit.o
ranlib liblua.a
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c
gcc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../lib64/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
Makefile:63: recipe for target 'lua' failed
make[2]: *** [lua] Error 1
make[2]: Leaving directory '/usr/src/lua-5.3.3/src'
Makefile:110: recipe for target 'linux' failed
make[1]: *** [linux] Error 2
make[1]: Leaving directory '/usr/src/lua-5.3.3/src'
Makefile:55: recipe for target 'linux' failed
make: *** [linux] Error 2
how to fix it?
12-31-2016, 06:04 AM
#2
LQ Guru
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,494
libreadline is failing to find certain functions from other libraries. tgoto and several others come from termcap. tputs is from ncurses. You should have both of these but maybe not in the right place.
12-31-2016, 09:54 AM
#3
Member
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 328
Rep:
Just pass "-ncurses" in LDFLAGS. For completeness, this is the core of my slackbuild:
Code:
sed -i "s|/usr/local|/usr|" src/luaconf.h
sed -i "s|lib/lua|lib64/lua|" src/luaconf.h
sed -i "s|/usr/local|/usr|" etc/lua.pc
sed -i "s|prefix}/lib|prefix}/lib64|g" etc/lua.pc
make linux CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" LDFLAGS="-lncurses" INSTALL_TOP=/usr INSTALL_LIB=/usr/lib64 INSTALL_LMOD=/usr/share/lua/5.3 INSTALL_CMOD=/usr/lib64/lua/5.3 || exit 1
make linux install CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" LDFLAGS="-lncurses" INSTALL_TOP=$PKG/usr INSTALL_LIB=$PKG/usr/lib64 INSTALL_LMOD=$PKG/usr/share/lua/5.3 INSTALL_CMOD=$PKG/usr/lib64/lua/5.3 || exit 1
mkdir -p shared
cd shared
ar -x $PKG/usr/lib64/liblua.a
gcc -ldl -lreadline -lhistory -lncurses -lm -shared *.o -o liblua.so.$VERSION
cp -a liblua.so.$VERSION $PKG/usr/lib64
( cd $PKG/usr/lib64
ln -s liblua.so.$VERSION liblua.so.5.1
ln -s liblua.so.$VERSION liblua.so.5
ln -s liblua.so.$VERSION liblua.so
)
cd ..
1 members found this post helpful.
12-31-2016, 10:19 AM
#4
Member
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102
Original Poster
Rep:
Quote:
Originally Posted by
gengisdave
Just pass "-ncurses" in LDFLAGS. For completeness, this is the core of my slackbuild:
Code:
sed -i "s|/usr/local|/usr|" src/luaconf.h
sed -i "s|lib/lua|lib64/lua|" src/luaconf.h
sed -i "s|/usr/local|/usr|" etc/lua.pc
sed -i "s|prefix}/lib|prefix}/lib64|g" etc/lua.pc
make linux CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" LDFLAGS="-lncurses" INSTALL_TOP=/usr INSTALL_LIB=/usr/lib64 INSTALL_LMOD=/usr/share/lua/5.3 INSTALL_CMOD=/usr/lib64/lua/5.3 || exit 1
make linux install CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" LDFLAGS="-lncurses" INSTALL_TOP=$PKG/usr INSTALL_LIB=$PKG/usr/lib64 INSTALL_LMOD=$PKG/usr/share/lua/5.3 INSTALL_CMOD=$PKG/usr/lib64/lua/5.3 || exit 1
mkdir -p shared
cd shared
ar -x $PKG/usr/lib64/liblua.a
gcc -ldl -lreadline -lhistory -lncurses -lm -shared *.o -o liblua.so.$VERSION
cp -a liblua.so.$VERSION $PKG/usr/lib64
( cd $PKG/usr/lib64
ln -s liblua.so.$VERSION liblua.so.5.1
ln -s liblua.so.$VERSION liblua.so.5
ln -s liblua.so.$VERSION liblua.so
)
cd ..
thanks a lot. it helped
All times are GMT -5. The time now is 07:46 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News