安卓9.0 编译报错问题

原来的编译服务器编译7.1和8.1 的都没有问题,下载9.0的代码,编译的时候报错;报错这个提示真是看的我一脸懵逼;

cat /home1/luoyalong/workspace/MT8788-P/mt8788/out/target/product/tb8788p1_64_bsp/obj/BOOTLOADER_OBJ/../../appsboothd.mbn /home1/luoyalong/workspace/MT8788-P/mt8788/out/target/product/tb8788p1_64_bsp/obj/BOOTLOADER_OBJ/build-tb8788p1_64_bsp/lk.img > /home1/luoyalong/workspace/MT8788-P/mt8788/out/target/product/tb8788p1_64_bsp/obj/BOOTLOADER_OBJ/../../appsboot.mbn
rm -f /home1/luoyalong/workspace/MT8788-P/mt8788/out/target/product/tb8788p1_64_bsp/obj/BOOTLOADER_OBJ/../../appsboothd.mbn
make[1]: Leaving directory `/home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/lk'
make: Leaving directory `/home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/lk'
ninja: build stopped: subcommand failed.
13:42:20 ninja failed with: exit status 1

#### failed to build some targets (28 seconds) ####

猜想应该是JDK版本的问题吧,就安装JDK9,;安装好后还是报同样是错;网上搜了一大堆都方法都没有用;

其实问题也很简单,我编译的时候没有打印全部的log,所以编译软件缓存的日志没那么多,error被覆盖掉了,查找的时候找不到;以前都有打印编译log的习惯,后面换公司后就不用了,编译的问题都比较明显;但是这次很早就报error了,但是还是在一直编;也是坑了自己一把。

实际的报错是这个

an't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/../Spreadsheet /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/../ /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771 /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/../common /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/../common/emigen_v1.pm line 1348.
BEGIN failed--compilation aborted at /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/../common/emigen_v1.pm line 1348.
Compilation failed in require at /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/emigen.pl line 104.
BEGIN failed--compilation aborted at /home1/luoyalong/workspace/MT8788-P/mt8788/vendor/mediatek/proprietary/bootable/bootloader/preloader/tools/emigen/MT6771/emigen.pl line 104.
make: *** [/home1/luoyalong/workspace/MT8788-P/mt8788/out/target/product/tb8788p1_64_bsp/obj/PRELOADER_OBJ/MTK_Loader_Info.tag] Error 2

解决方法是安装perl的switch库:

sudo apt-get install libswitch-perl

一条命令解决
绕了这么多弯路!!!!!!

你可能感兴趣的:(安卓9.0 编译报错问题)