linux中编译出现问题

shadylplplp 2017-06-03 11:28:26
先是./configure

root@ubuntu:~/Desktop/spro-4.0# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/root/Desktop/spro-4.0/auxdir/missing: Unknown `--run' option
Try `/root/Desktop/spro-4.0/auxdir/missing --help' for more information
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for AIX... no
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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for library containing strerror... none required
checking for function prototypes... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for size_t... yes
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 8
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdlib.h... (cached) yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for string.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for vprintf... yes
checking for _doprnt... no
./configure: line 6057: CF_GCC_WARNINGS: command not found
checking if malloc debugging is wanted... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating auxdir/Makefile
config.status: creating test/Makefile
config.status: creating test/ref/Makefile
config.status: creating test/dat/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands


然后make
root@ubuntu:~/Desktop/spro-4.0# make
make all-recursive
make[1]: Entering directory '/root/Desktop/spro-4.0'
Making all in doc
Making all in auxdir
make[2]: Entering directory '/root/Desktop/spro-4.0/auxdir'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/Desktop/spro-4.0/auxdir'
Making all in test
make[2]: Entering directory '/root/Desktop/spro-4.0/test'
Making all in ref
make[3]: Entering directory '/root/Desktop/spro-4.0/test/ref'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/Desktop/spro-4.0/test/ref'
Making all in dat
make[3]: Entering directory '/root/Desktop/spro-4.0/test/dat'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/Desktop/spro-4.0/test/dat'
make[3]: Entering directory '/root/Desktop/spro-4.0/test'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/Desktop/spro-4.0/test'
make[2]: Leaving directory '/root/Desktop/spro-4.0/test'
make[2]: Entering directory '/root/Desktop/spro-4.0'
gcc -g -O2 -o scopy scopy.o getopt.o getopt1.o -lm -L. -lspro
./libspro.a(misc.o): In function `spf_buf_normalize':
/root/Desktop/spro-4.0/misc.c:276: undefined reference to `sqrt'
/root/Desktop/spro-4.0/misc.c:185: undefined reference to `sqrt'
./libspro.a(misc.o): In function `set_lifter':
/root/Desktop/spro-4.0/misc.c:402: undefined reference to `sin'
./libspro.a(misc.o): In function `sig_normalize':
/root/Desktop/spro-4.0/misc.c:425: undefined reference to `sqrt'
./libspro.a(misc.o): In function `set_sig_win':
/root/Desktop/spro-4.0/misc.c:458: undefined reference to `cos'
/root/Desktop/spro-4.0/misc.c:473: undefined reference to `cos'
/root/Desktop/spro-4.0/misc.c:473: undefined reference to `cos'
/root/Desktop/spro-4.0/misc.c:465: undefined reference to `cos'
collect2: error: ld returned 1 exit status
Makefile:307: recipe for target 'scopy' failed
make[2]: *** [scopy] Error 1
make[2]: Leaving directory '/root/Desktop/spro-4.0'
Makefile:386: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/Desktop/spro-4.0'
Makefile:202: recipe for target 'all' failed
make: *** [all] Error 2


make就报错了。。。 好像configure就有错了

目录和里面的东西已经设置成777了 所以不会是权限问题

这是在linux中安装一个叫spro的东西
http://www.irisa.fr/metiss/guig/spro/install.html
按照官网的教程 下载4.0的安装之后出现的问题
实在是不懂c和c++
百度了半天也搞不懂为什么错。。。

请求大佬们帮帮忙 谢谢了!
...全文
475 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
sillyc 2017-06-07
  • 打赏
  • 举报
回复
这应该是没有连接动态库,编译的时候在后面加上-lm。man一下sqrt这个函数,手册上会有需要连接动态库的说明
自信男孩 2017-06-06
  • 打赏
  • 举报
回复
如果是configue配置好的编译选项,建议先make clean一下;从错误上看,是编译时缺少数学函数库,查看一下生成的Makefile中是否加了链接动态的数学函数库,-lm
cain-won 2017-06-05
  • 打赏
  • 举报
回复
make之前先make clean试试
赵4老师 2017-06-05
  • 打赏
  • 举报
回复
-lm
ckc 2017-06-04
  • 打赏
  • 举报
回复
/root/Desktop/spro-4.0/misc.c:276: undefined reference to `sqrt' 这些是编译的时候没找到函数定义,这个按道理说是源代码的问题,不应该出这么低级的错的啊 看看需要什么版本的gcc,多半还是环境和要求的有不同

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧