Centos源码编译安装eucalyptus时,make报了一个奇怪的错误,百思不得解

ahfytao 发布于 2014/03/14 16:33
阅读 1K+
收藏 0
按照官网的文档一步步走到make这一步,报错如下
make[1]: Entering directory `/eucalyptus/gatherlog'
rm -rf generated
mkdir -p generated
Generating client stubs
sh /opt/euca-WSDL2C.sh -uri ../wsdl//eucalyptus_gl.wsdl -g -d adb -u -uw -f -o generated | grep -v 'the classpath'
Retrieving document at '../wsdl//eucalyptus_gl.wsdl'.
Generating server stubs
sh /opt/euca-WSDL2C.sh -uri ../wsdl//eucalyptus_gl.wsdl -sd -ss -d adb -u -uw -f -o generated | grep -v 'the classpath'
Retrieving document at '../wsdl//eucalyptus_gl.wsdl'.
Adding marshalling calls to server stubs
../tools/add_marshalling.pl generated/axis2_skel_*.c
../tools/add_marshalling.pl: line 63: syntax error near unexpected token `('
../tools/add_marshalling.pl: line 63: ` FILE: for $file ( @ARGV ) {'
make[1]: *** [generated/stubs] Error 2
make[1]: Leaving directory `/eucalyptus/gatherlog'
make: *** [build] Error 2

在安装依赖包时,有几个包没有可用的包。就没装,感觉不是依赖包的问题,源码是git clone从官网下的,实在不知如何解决,求各路大神援助。。。。先谢过!



加载中
0
lapvc
lapvc
把报错的那部分代码粘出来
0
a
ahfytao
已经贴出来了,就是11,12,13行,这个脚本我看了下没错,make到16行的时候就停止了。这个脚本是源代码中的脚本
0
lapvc
lapvc
../tools/add_marshalling.pl文件的63行前后贴一下
0
a
ahfytao
61 
     62  FILE: for $file ( @ARGV ) {
     63      open (IN, "<$file") or next FILE;
     64      undef $/;
     65      $_ = <IN>;
     66      $/ = "\n";
     67      close IN;
     68      print "scanning $file\n";
     69 
     70      $done=0;
     71      if (s/     #include "([^"]+)"/#include "$1"\n#include <server-marshal.h>\n/s) {$done++;}
     72      if (s/adb_(\w+)_t\* axis2_skel_(\w+)_(\w+) \(([^\)]+) adb_(\w+)_t\* (\w+) [^}]+TODO[^}]+}/adb_$1_t* axis2_skel_$2_$3 ($4 adb_$5_        t* $6 )\n        { return (${3}Marshal($6, env)); }/sg) {$done++;}
     73      if (s/adb_(\w+)_t\* axis2_skel_(\w+)_(\w+) \(const axutil_env_t \*env [^}]+TODO[^}]+}/adb_$1_t* axis2_skel_$2_$3 (const axutil_e        nv_t \*env)\n        { return (${3}Marshal(env)); }/sg) {$done++;}
     74      if (s/\/\* Any initialization stuff of axis2_.*goes here \*\//adb_InitService();\n/sg) {$done++;}
     75     
     76      if ($done)
     77      {
     78 
     79          print "   modifying $file\n";
     80          system "cp $file $file~";
     81          open (OUT, ">$file") or die "could not overwrite $file";
     82          print OUT;
     83          close OUT;
     84      }
     85 }

这是那个脚本的代码




lapvc
lapvc
这段代码本身是没有问题的
lapvc
lapvc
有可能是这个脚本传入的参数有问题,你在for $file ( @ARGV ) 一行之前加入 use Data::Dumper; print Dumper(\@ARGV); 把脚本的输入参数打印出来看看
0
lapvc
lapvc
FILE: for $file ( @ARGV ) { #轮循读入的参数,并且把轮循到结果依次赋值给$file ,输入的参数应该是一系列的文件名称
    open (IN, "<$file") or next FILE; #打开文件的句柄
    undef $/; #把内部默认变量$/设置为undef ,$/定义的是文件的结束分割符
    $_ = <IN>; #读入句柄的输入内容
    $/ = "\n"; #设置文件分割符为换行
    close IN; #关闭文件句柄
    print "scanning $file\n"; #输出指定的文件名称


你可以参考上面的注释进行调试,看看输入的参数是不是有特殊字符了,我觉得有可能是这样。


0
a
ahfytao
我在脚本的61行添加了” use Data::Dumper; print Dumper(\@ARGV); “。重新make还是报错,并没有打印出输入的参数,是我添加的方式不对吗?调试脚本是单独调试吗?非常感谢你的帮助!
0
lapvc
lapvc
你make clean一下,然后重新make 试试
0
lapvc
lapvc
./tools/add_marshalling.pl: line 63: syntax error near unexpected token `('
13 ../tools/add_marshalling.pl: line 63: ` FILE: for $file ( @ARGV ) {'

lapvc
lapvc
这个是安装报错的地方
0
a
ahfytao
我是这样修改的 add_marshalling.pl脚本
63 use Data::Dumper; print Dumper(\@ARGV);
     64  FILE:use for $file ( @ARGV ) {
     65      open (IN, "<$file") or next FILE;
     66      undef $/;
     67      $_ = <IN>;
     68      $/ = "\n";
     69      close IN;
     70      print "scanning $file\n";

make clean

make

报错信息为

rm -rf generated
mkdir -p generated
Generating client stubs
sh /opt/euca-WSDL2C.sh -uri ../wsdl//eucalyptus_gl.wsdl -g -d adb -u -uw -f -o generated | grep -v 'the classpath'
Retrieving document at '../wsdl//eucalyptus_gl.wsdl'.
Generating server stubs
sh /opt/euca-WSDL2C.sh -uri ../wsdl//eucalyptus_gl.wsdl -sd -ss -d adb -u -uw -f -o generated | grep -v 'the classpath'
Retrieving document at '../wsdl//eucalyptus_gl.wsdl'.
Adding marshalling calls to server stubs
../tools/add_marshalling.pl generated/axis2_skel_*.c
../tools/add_marshalling.pl: line 63: syntax error near unexpected token `('
../tools/add_marshalling.pl: line 63: `use Data::Dumper; print Dumper(\@ARGV);'
make[1]: *** [generated/stubs] Error 2
make[1]: Leaving directory `/eucalyptus-3.4.2/gatherlog'
make: *** [build] Error 2





0
lapvc
lapvc
你把   add_marshalling.pl脚本63行前面部分贴一下
返回顶部
顶部