编译 openWRT-19.07时候,出现如下错误内容:
make[3]: Entering directory '/home/robot/OpenWrt/mtk762x-19.07/tools/quilt'
make -C /home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65 SHELL="bash" all
make[4]: Entering directory '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65'
/usr/local/arm_linux_4.8/usr/bin/msgmerge -o po/fr.po po/fr.po po/quilt.pot
/usr/local/arm_linux_4.8/usr/bin/msgmerge: error while loading shared libraries: libgettextsrc-0.19.8.1.so: cannot open shared object file: No such file or directory
Makefile:149: recipe for target 'po/fr.po' failed
make[4]: *** [po/fr.po] Error 127
make[4]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65'
Makefile:36: recipe for target '/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65/.built' failed
make[3]: *** [/home/robot/OpenWrt/mtk762x-19.07/build_dir/host/quilt-0.65/.built] Error 2
make[3]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07/tools/quilt'
time: tools/quilt/compile#0.04#0.01#0.06
tools/Makefile:157: recipe for target 'tools/quilt/compile' failed
make[2]: *** [tools/quilt/compile] Error 2
make[2]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07'
tools/Makefile:155: recipe for target '/home/robot/OpenWrt/mtk762x-19.07/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyyy' failed
make[1]: *** [/home/robot/OpenWrt/mtk762x-19.07/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[1]: Leaving directory '/home/robot/OpenWrt/mtk762x-19.07'
/home/robot/OpenWrt/mtk762x-19.07/include/toplevel.mk:225: recipe for target 'world' failed
make: *** [world] Error 2
解决办法:
按照基本的套路,要在服务器上进行语言文件的生成,就得安装 gettext
apt-get install gettext
安装后还是不可以;
[email protected]:~/OpenWrt/mtk762x-19.07$ ls -la $(which msgfmt)
-rwxr-xr-x 1 root root 91416 Sep 21 2020 /usr/local/arm_linux_4.8/usr/bin/msgfmt
发现 path 路径中的 arm_linux_4.8 ,才想起 此虚拟机 前面使用过 buildroot 编译arm9 的芯片,修改 /etc/profile 文件,
内容如下:
#nuc980iot cross_compile
#export ARCH=arm
#export CROSS_COMPILE=/usr/local/arm_linux_4.8/bin/arm-nuvoton-linux-uclibceabi-
#export PATH=/usr/local/arm_linux_4.8/bin:$PATH
# java-1.8.0-openjdk-amd64 config
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
第一步,
关闭交叉编译工具链的环境变量,source etc/profile; 卸载 gettext重启虚拟机,开机后重新安装 gettext 程序。
第二步
删除 build_dir/quilt-0.65文件夹内容;此 openwrt 开发环境使用过 musl 库方式编译过,make clean 也没有清除相关部分配置。
第三步
make clean && make -j V=sc 编译就不再报此 quilt-0.65 的错误。
备注:
进入到quilt 源码文件中,先把 quilt编译安装后,在编译OpenWRT的也可以解决。
[email protected]:~/OpenWrt/x86-openWrt-19.07/build_dir/host/quilt-0.65$ ./configure
[email protected]:~/OpenWrt/x86-openWrt-19.07/build_dir/host/quilt-0.65$ make
[email protected]:~/OpenWrt/x86-openWrt-19.07/build_dir/host/quilt-0.65$ sudo make install
参考链接:
https://84361749.com/post/ubuntu-bitnami-msgfmt-libgettextsrc-error.html