Ai-Thinker-Open / GPRS_C_SDK

Ai-Thinker A9/A9G GPRS (with GPS(A9G)) module C development SDK
https://ai-thinker-open.github.io/GPRS_C_SDK_DOC
MIT License
446 stars 232 forks source link

Permission denied issue fixed #522

Open boonya opened 1 year ago

boonya commented 1 year ago

Why

I tried to run this code on a MacOS under docker and it failed twice.

First time because of lack of permissions to run ./build.sh

# ./build.sh demo gpio
bash: ./build.sh: /bin/bash: bad interpreter: Permission denied

The second because of lack of permissions to execute ./platform/compilation/elfCombine.pl

/bin/bash: /projects/GPRS_C_SDK/platform/compilation/elfCombine.pl: /usr/bin/perl: bad interpreter: Permission denied
[LD] 1:/projects/GPRS_C_SDK/build/imei//imei.elf 2:--oformat=elf32-littlemips 5:-just-symbols /projects/GPRS_C_SDK/platform/chip/rom/8955/lib/mem_bridge_rom_CHIP.elf 6: /projects/GPRS_C_SDK/build/imei/cust.ld 7:--gc-sections  -L/projects/GPRS_C_SDK/build/imei/init/lib   -L/projects/GPRS_C_SDK/build/imei/libs/lib   -L/projects/GPRS_C_SDK/build/imei/demo/imei/lib      --start-group   -linit_debug  -llibs_debug  -limei_debug --end-group -L/projects/GPRS_C_SDK/platform/lib/gcc/mips-elf/4.4.2 -lgcc  --warn-common  --error-unresolved-symbols  8:/projects/GPRS_C_SDK/build/imei//imei.map  end1             imei.elf
[ElfCombine]        Elf binary & map file

[GEN]               strip platform symbol
                    |
                     --/projects/GPRS_C_SDK/platform/compilation/platform_symbols_to_strip
/bin/bash: /projects/GPRS_C_SDK/platform/compilation/elfCombine.pl: /usr/bin/perl: bad interpreter: Permission denied
/projects/GPRS_C_SDK/platform/compilation/cust_rules.mk:753: recipe for target '/projects/GPRS_C_SDK/build/imei//imei.elf' failed
make[2]: *** [/projects/GPRS_C_SDK/build/imei//imei.elf] Error 126
/projects/GPRS_C_SDK/platform/compilation/cust_rules.mk:749: recipe for target '/projects/GPRS_C_SDK/build/imei//imei.srec' failed
make[1]: *** [/projects/GPRS_C_SDK/build/imei//imei.srec] Error 2
/projects/GPRS_C_SDK/platform/compilation/cust_rules.mk:396: recipe for target 'lod' failed
make: *** [lod] Error 2
====== Build Time: 9s complete at 2022-08-20 17:11:05 =======
!!!!!!!!!!!!!!!!!!!!
   BUILD FAILED
!!!!!!!!!!!!!!!!!!!!
=============================================================

What

This is how I have it fixed.

chmod +x build.sh
chmod +x platform/compilation/elfCombine.pl