contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.72k stars 2.58k forks source link

gcc: error trying to exec 'cc1': execvp: No such file or directory #2644

Closed dpapdpap closed 4 years ago

dpapdpap commented 4 years ago

Others have reported this problem but I have not found anything that suits my case. When I try to compile (rasbian) a node eg cooja node I get the error message: CC hello-world.c gcc: error trying to exec 'cc1': execvp: No such file or directory make: *** [../..../Makefile.include:261: hello-world.co] Error 1 Process returned error code 2

cc1 exists in the /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1 folder and the $ PATH is ...: / usr / lib / jvm / java-8-openjdk-armhf / bin: /home/pi/compilers/mspgcc-4.7.2/bin: / home / pi / gcc-arm- none-eabi-9-2019-q4-major / bin (I have installed the toolchains gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 and mspgcc-4.7.2) and I have the following

pi @ raspberrypi: ~ / contiki / tools / cooja $ g ++ --version g ++ (Raspbian 8.3.0-6 + rpi1) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pi berry raspberrypi: ~ / contiki / tools / cooja $ gcc --version gcc (Raspbian 8.3.0-6 + rpi1) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pi @ raspberrypi: ~ / contiki / tools / cooja $ dpkg -l | grep gcc | awk '{print $ 2}' gcc gcc-4.9-base: armhf gcc-5-base: armhf gcc-6-base: armhf gcc-7-base: armhf gcc-8 gcc-8-base: armhf gcc-msp430 libgcc-8-dev: armhf libgcc1: armhf

What do I need to do to recognize cc1, please?

dpapdpap commented 4 years ago

...and, if I append to th $PATH the path to cc1 (:/home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1) it finds cc1 but throws the error :

make hello-world.cooja TARGET=cooja CC hello-world.c /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: 1: /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: ELF: not found /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: 2: /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: @!: not found /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: 3: /home/pi/gcc-arm-none-eabi-9-2019-q4-major/lib/gcc/arm-none-eabi/9.2.1/cc1: Syntax error: Unterminated quoted string make: *** [../../Makefile.include:261: hello-world.co] Error 1 Process returned error code 2