Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at xxxx/usr/bin/automake line 3939.


/**********************************************************************
 *    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
 * 不支持以前的寫法。
 *
 *                                2018-6-13 深圳 寶安西鄉 曾劍鋒
 *********************************************************************/

一、解決方法:
    修改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;
        }

二、跟蹤信息:
    1. 查找source源:
        zengjf@zengjf:~/zengjf/fsl-release-bsp/sources$ grep -F '1{s/.* //;s/\.[0-9]+$//};q' * -r
        poky/meta/classes/autotools.bbclass:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
    2. 查找do_configure生成文件:
        zengjf@zengjf:~/zengjf/fsl-release-bsp/imx6q-x11/tmp$ grep -F '1{s/.* //;s/\.[0-9]+$//};q' * -r
        [...省略]
        work/cortexa9hf-neon-poky-linux-gnueabi/bzip2/1.0.6-r5/temp/run.do_configure.22789:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/cortexa9hf-neon-poky-linux-gnueabi/libtool-cross/2.4.6-r0/temp/run.do_configure.13771:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/gperf-native/3.0.4-r0/temp/run.do_configure.14971:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/flex-native/2.6.0-r0/temp/run.do_configure.12824:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/bison-native/3.0.4-r0/temp/run.do_configure.17557:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/sqlite3-native/3_3.11.0-r0/temp/run.do_configure.9219:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/mpfr-native/3.1.3-r0/temp/run.do_configure.29877:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/pkgconfig-native/0.29+gitAUTOINC+5914edfe96-r0/temp/run.do_configure.15954:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/attr-native/2.4.47-r0/temp/run.do_configure.4567:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/util-macros-native/1_1.19.0-r0/temp/run.do_configure.21344:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/gettext-native/0.19.6-r0/temp/run.do_configure.25061:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/gmp-native/6.1.0-r0/temp/run.do_configure.22886:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/xz-native/5.2.2-r0/temp/run.do_configure.13878:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/libmpc-native/1.0.3-r0/temp/run.do_configure.26652:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        work/x86_64-linux/libtool-native/2.4.6-r0/temp/run.do_configure.5196:        AUTOV=`automake --version | sed -e '1{s/.* //;s/\.[0-9]+$//};q'`
        zengjf@zengjf:~/zengjf/fsl-release-bsp/imx6q-x11/tmp$ 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM