一、問題1
執行
make V=99
報出錯誤:
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at xxxx/usr/bin/automake line 3939
二、原因
從perl v5.22開始:不再推薦在正則表達式中使用 {,而且如果沒有轉義 { 會有錯誤警告,從v5.26開始:不僅有警告,還會有語法錯誤提示。
此爲Perl版本更新後對語法規範進行了變更,若左花括號作爲文本則應當進行轉義。
三、解決方法
在 openwrt
目錄下
cd build_dir/host/automake-1.15/bin/
vim automake
輸入/text =
找到$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
修改爲$text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
四、問題2
執行
make V=99
報出錯誤:
build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:279:21: error: dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}'
五、原因
此爲Ubuntu18.04安裝的libssl-dev爲1.1版本,而OpenWrt 15.05.1不支持此版本,需要回退到1.0版本
六、解決方法
使用aptitude軟件包管理器
sudo apt-get install aptitude
卸載之前的版本
sudo aptitude remove libssl-dev
安裝1.0版本
apt-get install libssl1.0.0
• 由 Leung 寫於 2020 年 6 月 24 日