1)环境

主机:Linux ubuntu 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 i686 i686 i386 GNU/Linux

cscope版本:15.8a

2)遇到的问题:

1.build.c:52:20: 致命错误: curses.h:没有那个文件或目录;
2.解决问题前面,链接不通过;
3.安装失败;

3)解决方案:

1.安装 libncurses5-dev ,sudo apt-get install ncurses-dev
2.
重头配置编译,./configure > make > sudo make install
3.sudo make install

4)细节说明与记录

查看curses相关的lib,发现确实没有安装libncurses5-dev
ii  libncurses5                                  5.9-4                                            shared libraries for terminal handling
ii libncurses5:i386 5.9-4 shared libraries for terminal handling
ii libncursesw5 5.9-4 shared libraries for terminal handling (wide character support)
ii libncursesw5:i386 5.9-4 shared libraries for terminal handling (wide character support)
ii mtr-tiny 0.80-1ubuntu1 Full screen ncurses traceroute tool
ii ncurses-base 5.9-4 basic terminal type definitions
ii ncurses-bin 5.9-4 terminal-related programs and man pages

安装libncurses5-dev

luogw@luogw-ThinkPad-Edge:~$ sudo apt-get install ncurses-dev
[sudo] password for luogw:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
注意,选取 libncurses5-dev 而非 ncurses-dev
将会安装下列额外的软件包:
libtinfo-dev
建议安装的软件包:
ncurses-doc
下列【新】软件包将被安装:
libncurses5-dev libtinfo-dev
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 325 kB 的软件包。
解压缩后会消耗掉 1,623 kB 的额外空间。
您希望继续执行吗?[Y/n]Y
获取:1 http://cn.archive.ubuntu.com/ubuntu/ precise/main libtinfo-dev amd64 5.9-4 [103 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main libncurses5-dev amd64 5.9-4 [222 kB]
下载 325 kB,耗时 3秒 (99.5 kB/s)
Selecting previously unselected package libtinfo-dev.
(正在读取数据库 ... 系统当前共安装有 185922 个文件和目录。)
正在解压缩 libtinfo-dev (从 .../libtinfo-dev_5.9-4_amd64.deb) ...
Selecting previously unselected package libncurses5-dev.
正在解压缩 libncurses5-dev (从 .../libncurses5-dev_5.9-4_amd64.deb) ...
正在设置 libtinfo-dev (5.9-4) ...
正在设置 libncurses5-dev (5.9-4) ...

链接出错,重头配置再编译ok


/home/luogw/dev-tool/cscope-15.8a/src/input.c:208: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:208: undefined reference to `waddch'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:179: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:179: undefined reference to `waddnstr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:190: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:190: undefined reference to `waddch'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:193: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:193: undefined reference to `waddch'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:196: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:196: undefined reference to `waddch'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:210: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:210: undefined reference to `winsch'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:211: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:211: undefined reference to `waddch'
input.o: In function `askforchar':
/home/luogw/dev-tool/cscope-15.8a/src/input.c:247: undefined reference to `stdscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:247: undefined reference to `waddnstr'
input.o: In function `askforreturn':
/home/luogw/dev-tool/cscope-15.8a/src/input.c:260: undefined reference to `curscr'
/home/luogw/dev-tool/cscope-15.8a/src/input.c:260: undefined reference to `wredrawln'
collect2: ld 返回 1
make[2]: *** [cscope] 错误 1
make[2]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a/src'
make[1]: *** [all-recursive] 错误 1
make[1]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a'
make: *** [all] 错误 2 luogw@luogw-ThinkPad-Edge:~/dev-tool/cscope-15.8a$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
configure: checking "location of ncurses.h file"...
Found ncurses on /usr/include/ncurses.h
checking for ncurses version... 5.9
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for regcomp in -lregex... no
checking for gnome-config... no
checking for pkg-config... true
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/window.h usability... no
checking sys/window.h presence... no
checking for sys/window.h... no
checking sys/termios.h usability... yes
checking sys/termios.h presence... yes
checking for sys/termios.h... yes
checking for unistd.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking floss.h usability... no
checking floss.h presence... no
checking for floss.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for an ANSI C-conforming const... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for sighandler_t... no
checking for sigsetjmp... yes
checking return type of signal handlers... void
checking for strchr... yes
checking for memcpy... yes
checking for memset... yes
checking for setmode... no
checking for _setmode... no
checking for getcwd... yes
checking for regcmp... no
checking for regcomp... yes
checking for strerror... yes
checking for lstat... yes
checking for fixkeypad... no
checking for getopt_long... yes
checking for stdarg.h... yes
checking for varargs.h... no
checking for vsnprintf... yes
checking whether vsnprintf is C99 compliant... yes
checking for snprintf... yes
checking whether snprintf is C99 compliant... yes
checking for vsnprintf... (cached) yes
checking whether vsnprintf is C99 compliant... (cached) yes
checking for vasprintf... yes
checking for asprintf... yes
checking for vasprintf... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating contrib/Makefile
config.status: creating config.h
config.status: executing depfiles commands
luogw@luogw-ThinkPad-Edge:~/dev-tool/cscope-15.8a$ make
make all-recursive
make[1]: 正在进入目录 `/home/luogw/dev-tool/cscope-15.8a'
Making all in doc
make[2]: 正在进入目录 `/home/luogw/dev-tool/cscope-15.8a/doc'
make[2]: 没有什么可以做的为 `all'。
make[2]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a/doc'
Making all in src
make[2]: 正在进入目录 `/home/luogw/dev-tool/cscope-15.8a/src'
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT fscanner.o -MD -MP -MF .deps/fscanner.Tpo -c -o fscanner.o fscanner.c
mv -f .deps/fscanner.Tpo .deps/fscanner.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT egrep.o -MD -MP -MF .deps/egrep.Tpo -c -o egrep.o egrep.c
mv -f .deps/egrep.Tpo .deps/egrep.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT alloc.o -MD -MP -MF .deps/alloc.Tpo -c -o alloc.o alloc.c
mv -f .deps/alloc.Tpo .deps/alloc.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT basename.o -MD -MP -MF .deps/basename.Tpo -c -o basename.o basename.c
mv -f .deps/basename.Tpo .deps/basename.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT build.o -MD -MP -MF .deps/build.Tpo -c -o build.o build.c
build.c: 在函数‘build’中:
build.c:261:13: 警告: 忽略声明有 warn_unused_result 属性的‘fscanf’的返回值 [-Wunused-result]
mv -f .deps/build.Tpo .deps/build.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT command.o -MD -MP -MF .deps/command.Tpo -c -o command.o command.c
mv -f .deps/command.Tpo .deps/command.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT compath.o -MD -MP -MF .deps/compath.Tpo -c -o compath.o compath.c
mv -f .deps/compath.Tpo .deps/compath.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT crossref.o -MD -MP -MF .deps/crossref.Tpo -c -o crossref.o crossref.c
mv -f .deps/crossref.Tpo .deps/crossref.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT dir.o -MD -MP -MF .deps/dir.Tpo -c -o dir.o dir.c
mv -f .deps/dir.Tpo .deps/dir.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT display.o -MD -MP -MF .deps/display.Tpo -c -o display.o display.c
mv -f .deps/display.Tpo .deps/display.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT edit.o -MD -MP -MF .deps/edit.Tpo -c -o edit.o edit.c
mv -f .deps/edit.Tpo .deps/edit.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT exec.o -MD -MP -MF .deps/exec.Tpo -c -o exec.o exec.c
mv -f .deps/exec.Tpo .deps/exec.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT find.o -MD -MP -MF .deps/find.Tpo -c -o find.o find.c
mv -f .deps/find.Tpo .deps/find.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT help.o -MD -MP -MF .deps/help.Tpo -c -o help.o help.c
mv -f .deps/help.Tpo .deps/help.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT history.o -MD -MP -MF .deps/history.Tpo -c -o history.o history.c
mv -f .deps/history.Tpo .deps/history.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT input.o -MD -MP -MF .deps/input.Tpo -c -o input.o input.c
mv -f .deps/input.Tpo .deps/input.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT invlib.o -MD -MP -MF .deps/invlib.Tpo -c -o invlib.o invlib.c
invlib.c: 在函数‘boolfile’中:
invlib.c:978:7: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c:993:10: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c:1002:10: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c:1008:10: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c:1022:10: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c: 在函数‘invfind’中:
invlib.c:781:8: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c: 在函数‘invstep’中:
invlib.c:704:7: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
invlib.c: 在函数‘invopen’中:
invlib.c:638:8: 警告: 忽略声明有 warn_unused_result 属性的‘fread’的返回值 [-Wunused-result]
mv -f .deps/invlib.Tpo .deps/invlib.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT logdir.o -MD -MP -MF .deps/logdir.Tpo -c -o logdir.o logdir.c
mv -f .deps/logdir.Tpo .deps/logdir.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT lookup.o -MD -MP -MF .deps/lookup.Tpo -c -o lookup.o lookup.c
mv -f .deps/lookup.Tpo .deps/lookup.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c: 在函数‘main’中:
main.c:618:13: 警告: 忽略声明有 warn_unused_result 属性的‘fscanf’的返回值 [-Wunused-result]
main.c:676:9: 警告: 忽略声明有 warn_unused_result 属性的‘fgets’的返回值 [-Wunused-result]
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT mouse.o -MD -MP -MF .deps/mouse.Tpo -c -o mouse.o mouse.c
mv -f .deps/mouse.Tpo .deps/mouse.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT mypopen.o -MD -MP -MF .deps/mypopen.Tpo -c -o mypopen.o mypopen.c
mv -f .deps/mypopen.Tpo .deps/mypopen.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT vpaccess.o -MD -MP -MF .deps/vpaccess.Tpo -c -o vpaccess.o vpaccess.c
mv -f .deps/vpaccess.Tpo .deps/vpaccess.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT vpfopen.o -MD -MP -MF .deps/vpfopen.Tpo -c -o vpfopen.o vpfopen.c
mv -f .deps/vpfopen.Tpo .deps/vpfopen.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT vpinit.o -MD -MP -MF .deps/vpinit.Tpo -c -o vpinit.o vpinit.c
mv -f .deps/vpinit.Tpo .deps/vpinit.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT vpopen.o -MD -MP -MF .deps/vpopen.Tpo -c -o vpopen.o vpopen.c
mv -f .deps/vpopen.Tpo .deps/vpopen.Po
gcc -g -O2 -o cscope fscanner.o egrep.o alloc.o basename.o build.o command.o compath.o crossref.o dir.o display.o edit.o exec.o find.o help.o history.o input.o invlib.o logdir.o lookup.o main.o mouse.o mygetenv.o mypopen.o vpaccess.o vpfopen.o vpinit.o vpopen.o -lncurses
make[2]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a/src'
Making all in contrib
make[2]: 正在进入目录 `/home/luogw/dev-tool/cscope-15.8a/contrib'
make[2]: 没有什么可以做的为 `all'。
make[2]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a/contrib'
make[2]: 正在进入目录 `/home/luogw/dev-tool/cscope-15.8a'
make[2]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a'
make[1]:正在离开目录 `/home/luogw/dev-tool/cscope-15.8a'


编译cscope-15.8a遇到的问题与解决方案的更多相关文章

  1. windows下使用mingw和msvc静态编译Qt5.15.xx

    windows下使用mingw和msvc静态编译Qt5.15.xx 下载并安装相关依赖软件 Python version 2.7 https://www.python.org/downloads/ ( ...

  2. coreseek 在gcc 4.9+ 上编译不通过 [sphinxexpr.o] Error 1 错误解决方案

    这几天玩hhvm,把gcc环境都装到4.9了,然后编译coreseek的时候就出问题,google一大圈,貌似捕风捉影看到一些信息说是gcc4.7+的c++作用域必须用this->去引用,这里整 ...

  3. 2015GitWebRTC编译实录15

    各个库编译完成后,整合talkapp,联编时还是碰到了一些问题,主要是lib里的源码文件被错误移走,或者宏定义等有问题的,不一而足 FQ访问https://apprtc.appspot.com/,拿到 ...

  4. BCB6编译LUA5.15成功!

    由于想要在一个原生应用里提供脚本功能,而Python的发布不能不说是一件麻烦事.因为所需要的脚本功能很简单,所以决定试试传说中的Lua. 第一步,下载源码.虽然Lua有提供二进制版本下载,但是因为我是 ...

  5. Fedora13下编译busybox-1.15.0出现can not find lcrypt错误

    在Fedora 13 系统上编译busybox(非交叉编译)产生错误 root@localhost # make ... gcc -Wall -Wshadow -Wwrite-strings -Wun ...

  6. 编译Linux-4.15.1内核时遇到:“error : openssl/bio.h :No such file or folder”

    如题: scripts/extract-cert.c::: fatal error: openssl/bio.h: No such file or directory compilation term ...

  7. Cenots7编译Opencv3.1错误:下载ippicv,解决方案

    在centos7上安装Opencv的时候,停在了下载ippicv的地方,一直都下载不下来. ippicv是一个并行计算库,其实可以不用的. 如果不想用这个并行计算库,在做Cmake的时候用参数关闭即可 ...

  8. nodejs 前端项目编译时内存溢出问题的原因及解决方案

    现象描述 昨天用webpack打包Vue的项目时,node内存溢出而停止build项目,即是项目构建过程中频繁报内存溢出:FATAL ERROR: CALL_AND_RETRY_LAST Alloca ...

  9. Android Studio编译的时候提示Gradle无法下载的解决方案

    首先,打开android studio项目 找到项目目录gradle\wrapper\gradle-wrapper.properties这个文件.内容如下:#Wed Apr 10 15:27:10 P ...

随机推荐

  1. WebView增加一个水平Progress,位置、长相随意

    实际效果可以参看微信的web页面进度条 本质就是通过addView及对WebView 页面进度进行监听 先看看这个自定义的DrawableId,我们参照系统默认实现的方法写一个自己的   <la ...

  2. 使用Spring MVC统一异常处理实战

    1 描述 在J2EE项目的开发中,不管是对底层的数据库操作过程,还是业务层的处理过程,还是控制层的处理过程,都不可避免会遇到各种可预知的.不可预知的异常需要处理.每个过程都单独处理异常,系统的代码耦合 ...

  3. WCF服务通过防火墙怎么设置

    设置防火墙 1.首先点击控制面板->系统与安全->Window防火墙->点击允许程序通过Windows防火墙 2.查找Windows Communication Foundation ...

  4. qq互联登陆开发流程

    宋正河整理 百度文库在线观看: http://wenku.baidu.com/view/96da9744e518964bcf847c47.html?st=1 csdn免积分下载: http://dow ...

  5. ansible服务模块和组模块使用

    本篇文章主要是介绍ansible服务模块和组模块的使用. 主要模块为ansible service module和ansible group moudle,下面的内容均是通过实践得到,可以直接运行相关 ...

  6. Intent传输数据的补充

    发现用intent的putExtra()或者putExtras()传输的都是基本数据类型. 如果要传输自定义数据类型,就要用到其他方法,老罗介绍的大概有3种: 1.  静态变量 2.  全局变量 3. ...

  7. 【转】SQL Server 数据库内部版本号

    -----------数据库还原或版本升级出现版本错误时可参考. Internal SQL Server Database Version Numbers A database created by ...

  8. Python的数据处理学习(二)

    本文参考Paul Barry所著的<Head First Python>一书,参考代码均可由http://python.itcarlow.ie/站点下载.本文若有任何谬误希望不吝赐教~ 二 ...

  9. java 编写hadoop程序中使用第三方libxx.so库

    在使用java编写hadoop处理程序时遇到了,java使用依赖的第三方libxx.so库的情况,找到了一种可行的方法,记录一下,希望对别人也有帮助: 加入需要使用的lib库为libxxx.so 1. ...

  10. 开源的c语言人工神经网络计算库 FANN

    这年头机器学习非常的火,神经网络算是机器学习算法中的比较重要的一种.这段时间我也花了些功夫,学了点皮毛,顺便做点学习笔记. 介绍人工神经网络的基本理论的教科书很多.我正在看的是蒋宗礼教授写的<人 ...