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?

2
  • 1
    What OS and version? Commented Sep 9, 2013 at 13:45
  • STLinux 2.3 ARM Commented Sep 9, 2013 at 13:55

1 Answer 1

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.