从官网上下载5.3.2的源码后,make linux进行编译,提示报错:

gcc -std=gnu99 -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline
/usr/local/lib/libreadline.so:对‘tputs’未定义的引用
/usr/local/lib/libreadline.so:对‘tgoto’未定义的引用
/usr/local/lib/libreadline.so:对‘tgetflag’未定义的引用
/usr/local/lib/libreadline.so:对‘UP’未定义的引用
/usr/local/lib/libreadline.so:对‘tgetent’未定义的引用
/usr/local/lib/libreadline.so:对‘tgetnum’未定义的引用
/usr/local/lib/libreadline.so:对‘PC’未定义的引用
/usr/local/lib/libreadline.so:对‘tgetstr’未定义的引用
/usr/local/lib/libreadline.so:对‘BC’未定义的引用
collect2: error: ld returned exit status
Makefile:: recipe for target 'lua' failed
make[]: *** [lua] Error
make[]: Leaving directory '/home/abuu/project/lua-5.3.2/src'
Makefile:: recipe for target 'linux' failed
make[]: *** [linux] Error
make[]: Leaving directory '/home/abuu/project/lua-5.3.2/src'
Makefile:: recipe for target 'linux' failed
make: *** [linux] Error

报错原因是无法从libreadline.so库中定位tputs、tgoto等函数位置,那这些函数可能是由其他共享库所引入。
上网查询一下这些函数,发现这些函数来源于ncurses,于是从官网上下载ncurses源码进行编译。
安装完ncurses后再次"make linux"试了试,依然报错,于是检查、添加依赖,在src/Makefile中修改如下:

linux:
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"

保存后再次编译,通过。

编译lua5.3.2报错提示libreadline.so存在未定义的引用解决方法的更多相关文章

  1. GCC 高版本7.4 编译链接 boost 报错 boost::thread::XXX’未定义的引用 解决方法

    背景:开发中的项目之前一直用GCC4.8,boost库1.48版本的开发环境.现在因业务需求,需要更换GCC7.4,boost库1.70. 问题:可以正常编译BOOST的链接库文件,但是链接时候报错. ...

  2. 使用IDEA操作Hbase API 报错:org.apache.hadoop.hbase.client.RetriesExhaustedException的解决方法:

     使用IDEA操作Hbase API 报错:org.apache.hadoop.hbase.client.RetriesExhaustedException的解决方法: 1.错误详情: Excepti ...

  3. flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法

    flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...

  4. 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法

    pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 解决方法: 在pycharm的安装目 ...

  5. MFC项目中:报错:“fatal error LNK1561: 必须定义入口点”解决方法

    编译的时候,报错:“fatal error LNK1561: 必须定义入口点” 解决方案1: 右键->属性->链接器->高级->入口点,设置成:WinMainCRTStartu ...

  6. echarts 报错问题 is null 或者未定义等问题

    我们在使用echarts的时候会出现is null或者未定义等报错提示,但是却无从下手的情况. 其一,我们是完全按照echarts的官方文档来添加的js文件:其二,在对使用option时候的配置是按照 ...

  7. 安装Scrapy报错 error: Microsoft Visual C++ 14.0 is required解决方法

    [问题背景]:在Windows 10系统,pip install Scrapy,报错error: Microsoft Visual C++ 14.0 is required,还有提示Twisted需要 ...

  8. 安装SQl Server 报错 "需要 Microsoft.NET Framework 3.5 ServicePack 1" 解决方法

    前言 之前装Sql Server都没遇到过这样的问题, 昨天重装了系统之后, 然后安装SQl Server 报错,提示 "需要 Microsoft.NET Framework 3.5 Ser ...

  9. 安装apr-1.6.3报错[cannot remove `libtoolT’: No such file or directory]解决方法

    发现有这个提示:cannot remove `libtoolT’: No such file or directory , 编辑 configure文件,查找 $RM "$cfgfile&q ...

随机推荐

  1. 《Linux内核分析》 week4作业-使用嵌入式汇编调用一个系统调用

    一.fork的嵌入式汇编执行 #include <stdio.h> #include <unistd.h> int main(){ pid_t pid; asm volatil ...

  2. JSP中取COOKIE中指定值得方法【转载】

    Cookie cookies[]=request.getCookies(); //读出用户硬盘上的Cookie,并将所有的Cookie放到一个cookie对象数组里面 Cookie sCookie=n ...

  3. 对PHP安全有帮助的一些函数

    安全一直是一个在编程语言中非常值得去关注的方面.在任何一种成熟的编程语言中都有合适的办法来保证程序的安全性,在现代的 WEB 开发中 安全一直是一个在编程语言中非常值得去关注的方面.在任何一种成熟的编 ...

  4. Sicily connect components in undirected graph

    题目介绍: 输入一个简单无向图,求出图中连通块的数目. Input 输入的第一行包含两个整数n和m,n是图的顶点数,m是边数.1<=n<=1000,0<=m<=10000. 以 ...

  5. no-cache、max-age=0、must-revalidate区别

    之前深入搜索了多次,根据stackoverflow的回答进行一些总结(http://stackoverflow.com/questions/18148884/difference-between-no ...

  6. C51 的重入问题 WARNING L15: MULTIPLE CALL TO SEGMENT

    WARNING L15: MULTIPLE CALL TO SEGMENT 这个问题必须注意,可能引起程序冲突,假设你用于自动化领域,则可能导致信号产生尖峰. 产生这一警告的一个根源是:你在主循环里调 ...

  7. 【HDOJ】1080 Human Gene Functions

    DP.wa了一下午,原来是把mmax写在外层循环了.最近事情太多了,刷题根本没状态. #include <cstdio> #include <cstring> #include ...

  8. HDOJ 1197 Specialized Four-Digit Numbers

    Problem Description Find and list all four-digit numbers in decimal notation that have the property ...

  9. HDU 5506 - BestCoder Round #60 - GT and set

    题目链接 : http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=641&pid=1003 题意 : 给N集 ...

  10. HDU 5505 - BestCoder Round #60 - GT and numbers

    题目链接 : http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=641&pid=1002 思路 : N有若 ...