2

I've a system with gcc 4.2.4 on board, but when I try to compile even a simple hello world I obtain this error:

$ gcc helloworld.c
gcc: error trying to exec 'cc1': execvp: No such file or directory

I've checked and actually cc1 is not present in the system. Also, I've noticed that some folders required from gcc (e.g., /usr/lib/gcc/ and /usr/libexec/gcc) are missing.

Is there any possibility to restore the installation of gcc without trying to recompile it entirely?

Marco L.
  • 141

1 Answers1

3

Being an embedded Linux, STLinux isn't going to have all of the tools that you expect from a desktop Linux. At least, they're not all going to be installed by default.

Many embedded Linuxes don't even have compilers "on board". You have to do all development with a cross-compilation toolchain.

STLinux isn't quite that pared down. You just have to install the GNU tools for it.

For what it's worth, cc1 is the core part of the GNU C compiler. The fact that you're missing it but you have gcc means you haven't actually got GCC properly installed.

Warren Young
  • 72,032