yar-c编译报错的解决办法

  • Post author:
  • Post category:IT
  • Post comments:0评论

Ubuntu 12.04 LTS上

默认的yar-c从github上clone下来之后, configure之后make默认报错

(Ubuntu 14.04.1LTS不会报错)

if /bin/sh ./libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/ -I/usr/include/    -g -O2 -MT yar_server.lo -MD -MP -MF ".deps/yar_server.Tpo" -c -o yar_server.lo yar_server.c; \

    then mv -f ".deps/yar_server.Tpo" ".deps/yar_server.Plo"; else rm -f ".deps/yar_server.Tpo"; exit 1; fi

./libtool: 1: ./libtool: X–tag=CC: not found

./libtool: 884: ./libtool: libtool: ignoring unknown tag : not found

./libtool: 1: ./libtool: X–mode=compile: not found

./libtool: 1017: ./libtool: *** Warning: inferring the mode of operation is deprecated.: not found

./libtool: 1018: ./libtool: *** Future versions of Libtool will require –mode=MODE be specified.: not found

./libtool: 1: ./libtool: Xgcc: not found

./libtool: 1: ./libtool: X-DHAVE_CONFIG_H: not found

./libtool: 1: ./libtool: X-I.: not found

./libtool: 1: ./libtool: X-I.: not found

./libtool: 1: ./libtool: X-I.: not found

./libtool: 1: ./libtool: X-I/usr/include/: not found

./libtool: 1: ./libtool: X-I/usr/include/: not found

./libtool: 1: ./libtool: X-g: not found

./libtool: 1: ./libtool: X-O2: not found

./libtool: 1: ./libtool: X-MT: not found

./libtool: 1: ./libtool: Xyar_server.lo: not found

./libtool: 1: ./libtool: X-MD: not found

./libtool: 1: ./libtool: X-MP: not found

./libtool: 1: ./libtool: X-MF: not found

./libtool: 1: ./libtool: X.deps/yar_server.Tpo: not found

./libtool: 1: ./libtool: X-c: not found

./libtool: 1: ./libtool: Xyar_server.lo: not found

./libtool: 1218: ./libtool: libtool: compile: cannot determine name of library object from `’: not found

make[1]: *** [yar_server.lo] Error 1

原因是自带的autoconf工具集和系统的版本相差太大, 尤其是libtool的

解决办法:

进入ltmain.sh, 执行:%s/$echo/$ECHO/g

configure之后

修改libtool文件156行为RANLIB=""

发表回复