domino-team / openwrt-cc

openwrt CC with Domino/GL patches
GNU General Public License v2.0
129 stars 71 forks source link

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

Open andreibanaru opened 5 years ago

andreibanaru commented 5 years ago

Compiling returns the following:

root@ubuntu:~/openwrt-cc# make -j1 V=s
make[1]: Entering directory '/root/openwrt-cc'
make[2]: Entering directory '/root/openwrt-cc'
+ mkdir -p /root/openwrt-cc/staging_dir/target-mips_34kc_uClibc-0.9.33.2
+ cd /root/openwrt-cc/staging_dir/target-mips_34kc_uClibc-0.9.33.2
+ mkdir -p bin lib include stamp
mkdir -p /root/openwrt-cc/build_dir/target-mips_34kc_uClibc-0.9.33.2/stamp
touch /root/openwrt-cc/staging_dir/target-mips_34kc_uClibc-0.9.33.2/.prepared
+ mkdir -p /root/openwrt-cc/staging_dir/host
+ cd /root/openwrt-cc/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /root/openwrt-cc/build_dir/host/stamp /root/openwrt-cc/staging_dir/host/include/sys
install -m0644 /root/openwrt-cc/tools/include/*.h /root/openwrt-cc/staging_dir/host/include/
install -m0644 /root/openwrt-cc/tools/include/sys/*.h /root/openwrt-cc/staging_dir/host/include/sys/
ln -sf lib /root/openwrt-cc/staging_dir/host/lib64
touch /root/openwrt-cc/staging_dir/host/.prepared
make[3]: Entering directory '/root/openwrt-cc/tools/patch'
make[3]: Leaving directory '/root/openwrt-cc/tools/patch'
make[3]: Entering directory '/root/openwrt-cc/tools/patch'
make[3]: Leaving directory '/root/openwrt-cc/tools/patch'
make[3]: Entering directory '/root/openwrt-cc/tools/sed'
make[3]: Leaving directory '/root/openwrt-cc/tools/sed'
make[3]: Entering directory '/root/openwrt-cc/tools/sed'
make[3]: Leaving directory '/root/openwrt-cc/tools/sed'
make[3]: Entering directory '/root/openwrt-cc/tools/m4'
make[3]: Leaving directory '/root/openwrt-cc/tools/m4'
make[3]: Entering directory '/root/openwrt-cc/tools/m4'
make[3]: Leaving directory '/root/openwrt-cc/tools/m4'
make[3]: Entering directory '/root/openwrt-cc/tools/autoconf'
make[3]: Leaving directory '/root/openwrt-cc/tools/autoconf'
make[3]: Entering directory '/root/openwrt-cc/tools/autoconf'
make[3]: Leaving directory '/root/openwrt-cc/tools/autoconf'
make[3]: Entering directory '/root/openwrt-cc/tools/pkg-config'
make[3]: Leaving directory '/root/openwrt-cc/tools/pkg-config'
make[3]: Entering directory '/root/openwrt-cc/tools/pkg-config'
make[3]: Leaving directory '/root/openwrt-cc/tools/pkg-config'
make[3]: Entering directory '/root/openwrt-cc/tools/xz'
make[3]: Leaving directory '/root/openwrt-cc/tools/xz'
make[3]: Entering directory '/root/openwrt-cc/tools/xz'
make[3]: Leaving directory '/root/openwrt-cc/tools/xz'
make[3]: Entering directory '/root/openwrt-cc/tools/automake'
(cd /root/openwrt-cc/build_dir/host/automake-1.15; AUTOM4TE=/root/openwrt-cc/staging_dir/host/bin/autom4te AUTOCONF=/root/openwrt-cc/staging_dir/host/bin/autoconf AUTOMAKE=/root/openwrt-cc/staging_dir/host/bin/automake ACLOCAL=/root/openwrt-cc/staging_dir/host/bin/aclocal AUTOHEADER=/root/openwrt-cc/staging_dir/host/bin/autoheader LIBTOOLIZE=/root/openwrt-cc/staging_dir/host/bin/libtoolize LIBTOOL=/root/openwrt-cc/staging_dir/host/bin/libtool M4=/root/openwrt-cc/staging_dir/host/bin/m4 AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh)
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938.
Makefile:50: recipe for target '/root/openwrt-cc/build_dir/host/automake-1.15/.configured' failed
make[3]: *** [/root/openwrt-cc/build_dir/host/automake-1.15/.configured] Error 255
make[3]: Leaving directory '/root/openwrt-cc/tools/automake'
tools/Makefile:122: recipe for target 'tools/automake/compile' failed
make[2]: *** [tools/automake/compile] Error 2
make[2]: Leaving directory '/root/openwrt-cc'
tools/Makefile:121: recipe for target '/root/openwrt-cc/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy' failed
make[1]: *** [/root/openwrt-cc/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy] Error 2
make[1]: Leaving directory '/root/openwrt-cc'
/root/openwrt-cc/include/toplevel.mk:181: recipe for target 'world' failed
make: *** [world] Error 2

Should we use specific library versions?

Thx! Andrei

mankidavu commented 5 years ago

The error is with automake and perl v5.26. In perl v5.22, using a literal { in a regular expression was deprecated, and will emit a warning if it isn't escaped: {. In v5.26, this won't just warn, it'll cause a syntax error.

A temporary work around is to edit automake file (buildroot/output/host/usr/bin/automake- and modify):

================================================= goto line :3936 and change $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; to $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

==========================================

seandex commented 5 years ago

The error is with automake and perl v5.26. In perl v5.22, using a literal { in a regular expression was deprecated, and will emit a warning if it isn't escaped: {. In v5.26, this won't just warn, it'll cause a syntax error.

A temporary work around is to edit automake file (buildroot/output/host/usr/bin/automake- and modify):

================================================= goto line :3936 and change $text =~ s/${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge; to $text =~ s/${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

==========================================

i do not see any differences between the 2 lines.

$text =~ s/\$\{([^ \t=:+\{\}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;

vitorespindola commented 5 years ago

@seandex line 3936 must be replaced by:

$text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

See https://git.openwrt.org/?p=openwrt/openwrt.git;a=patch;h=92c80f38cff3c20388f9ac13d5196f2745aeaf77

seandex commented 5 years ago

@seandex line 3936 must be replaced by:

$text =~ s/$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

See https://git.openwrt.org/?p=openwrt/openwrt.git;a=patch;h=92c80f38cff3c20388f9ac13d5196f2745aeaf77

This worked for me though, I just wanted to correct the OP. $text =~ s/\$\{([^ \t=:+\{\}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;

sayed-amir commented 4 years ago

Hi

I can't find the "host/usr/bin/automake" in operwrt 15.05:

/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/build_dir/host/automake-1.15/lib/missing: line 81: makeinfo: command not found WARNING: 'makeinfo' is missing on your system. You should only need it if you modified a '.texi' file, or any other file indirectly affecting the aspect of the manual. You might want to install the Texinfo package: http://www.gnu.org/software/texinfo/ The spurious makeinfo call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX), in which case you might want to install GNU make: http://www.gnu.org/software/make/ Makefile:2516: recipe for target 'doc/automake.info' failed make[4]: [doc/automake.info] Error 127 make[4]: Leaving directory '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/build_dir/host/automake-1.15' Makefile:50: recipe for target '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/build_dir/host/automake-1.15/.built' failed make[3]: [/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/build_dir/host/automake-1.15/.built] Error 2 make[3]: Leaving directory '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/tools/automake' tools/Makefile:122: recipe for target 'tools/automake/compile' failed make[2]: [tools/automake/compile] Error 2 make[2]: Leaving directory '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt' tools/Makefile:121: recipe for target '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy' failed make[1]: [/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy] Error 2 make[1]: Leaving directory '/home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt' /home/ubuntu/odin-wi5/Odin_Wi5_firmware_build/openwrt/include/toplevel.mk:181: recipe for target 'world' failed make: *** [world] Error 2