Ubuntu18.04编译Yocto:automake正则表达式问题

转载自:https://www.cnblogs.com/zengjfgit/p/9178523.html
/**********************************************************************
报错信息:Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at xxxx/usr/bin/automake line 3939.

说明:在Ubuntu 18.04上编译Yocto,出现的automake正则表达式问题。原因是Perl不支持以前的写法。

/**********************************************************************

一、解决方法:
修改automake源代码

 # substitute_ac_subst_variables ($TEXT)
        # -------------------------------------
        # Replace any occurrence of ${FOO} in $TEXT by @FOO@ if FOO is an AC_SUBST
        # variable.
        sub substitute_ac_subst_variables
        {
          my ($text) = @_;
          # $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
          $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
          return $text;
        }

猜你喜欢

转载自blog.csdn.net/weixin_42421766/article/details/82984867