1

I have posted on another site, so hopefully this isn't cross posting:

I have a few versions of gcc and g++ on my Ubuntu 16.04 which i select with alternative config. When compiling a very simple source the compiler can't find the headers.(stddef.h: No such file or directory)

Upon investigation the gcc installations don't have a full directory, for example:

usr/lib/gcc/x86_64-linux-gnu/4.8 has an include directory with cc1.exe

whilst:

usr/lib/gcc/x86_64-linux-gnu/4.7 had no include directory and no cc1.exe (just a cc1plus.exe)

I have re-installed 4.7 but can't seem to get it to be a complete installation ,any help?

Thanks

Emma

1

You can see what packages provide these components using dpkg -S e.g.

$ dpkg -S /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
cpp-4.7: /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1
libgcc-4.7-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/4.7/include

Both cpp-4.7 and libgcc-4.7-dev should have been installed as dependencies of gcc-4.7 however it's possible that the files have been manually deleted - try re-intstalling those packages i.e.

sudo apt-get install --reinstall cpp-4.7 libgcc-4.7-dev
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.