使用autotools编译旧项目

时间:2015-01-22 07:46:52

标签: c++ gcc centos autotools chord

当我尝试运行configure脚本时,我一直在努力解决此错误。这是一个12岁的图书馆。首先,我尝试使用所有autotools和GCC的现代版本生成配置脚本。

然后,我尝试使用当时的工具版本生成它,但是当我运行配置文件时,我仍然得到相同的错误,这总是破碎的变量 CPPFLAGS

以下是配置错误:

checking for GMP library... checking for gmp.h... 
configure: error: Could not find gmp.h header

以下是描述错误的config.log部分:

 configure:22748: gcc34 -c -g -O2  -I/home/vicente/build/chord/../sfslite -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir;     \                                                                      
 /home/vicente/sfslite/async -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir;      \                                                                                                                  
 /home/vicente/sfslite/arpc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir;     \                                                                                                                    
 /home/vicente/sfslite/crypt -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir;      \                                                                                                                  
 /home/vicente/sfslite/sfsmisc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir;      \                                                                                                                
 /home/vicente/sfslite/libsfs -I/home/vicente/build/chord/../sfslite/svc -I/usr/include conftest.c >&5                                                                                                                
 gcc34: export: No such file or directory                                                                                                                                                                             
 gcc34: srcdir;: No such file or directory                                                                                                                                                                            
 gcc34: \: No such file or directory                                                                                                                                                                                  
 gcc34: export: No such file or directory                                                                                                                                                                             
 gcc34: srcdir;: No such file or directory                                                                                                                                                                            
 gcc34: \: No such file or directory                                                                                                                                                                                  
 gcc34: export: No such file or directory                                                                                                                                                                             
 gcc34: srcdir;: No such file or directory                                                                                                                                                                            
 gcc34: \: No such file or directory                                                                                                                                                                                  
 gcc34: export: No such file or directory                                                                                                                                                                             
 gcc34: srcdir;: No such file or directory                                                                                                                                                                            
 gcc34: \: No such file or directory                                                                                                                                                                                  
 gcc34: export: No such file or directory                                                                                                                                                                             
 gcc34: srcdir;: No such file or directory                                                                                                                                                                            
 gcc34: \: No such file or directory                                                                                                                                                                                  
 configure:22754: $? = 1                                                                                                                                                                                              
 configure: failed program was:         

我想知道是否有人经历过类似的问题。 谢谢!

工具版本:

  • GCC 3.4,4.4,4.7.2
  • Autoconf / aclocal / autoheader 2.59,2.69
  • Automake 1.9.6,1.15
  • 操作系统:Centos 5.9,Ubuntu 12.04,所有这些都是64位

该计划的链接: https://github.com/sit/dht

EDITED:

以下是22754行周围的配置脚本部分:

 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include "gmp.h"
 int
 main ()
 {
 0
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5  # line 22754
   (exit $ac_status); } &&
     { ac_try='test -z "$ac_c_werror_flag"
             || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
     { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   sfs_cv_gmp_h="${iflags}"; break
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5

 fi

0 个答案:

没有答案