1

I know there are a lot of similar questions on the internet but I tried everything. But nothing works Idk what I am doing wrong.

  The CMAKE_C_COMPILER:
/usr/local/bin/cc

is not a full path to an existing compiler tool.

I can find gcc, g++ files under usr/bin but in the error, it searches for the compiler on usr/local/bin.

set(CATKIN_TOPLEVEL TRUE)
set(CMAKE_C_COMPILER "/usr/bin/cc")

Even I changed the path in my CMake list for the compiler. Still no luck and by the way I am using ros1 and ubuntu. and I facing this error when I am trying to catkin_make my workspace.

Akash
  • 13

1 Answers1

0

I don't have your script, and cannot fix that, but there is a workaround. Create a symlink.

sudo ln -s /usr/bin/cc /usr/local/bin/cc
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • Probably instead of using ln, it might be better to use update-alternatives? While the effect might be the same, I guess it's probably better? – Ray Oct 18 '21 at 07:05
  • 1
    Better way is to remove local compiler /usr/local/bin/cc file and then install needed deb-packages by commands like sudo apt-get install gcc cmake build-essential. Stuff in /usr/local/ usually create a mess. – N0rbert Oct 18 '21 at 07:05
  • @N0rbert As far as I understood, the script OP uses is looking for a local compiler, but OP does not have such a local compiler. In any case, please feel free to edit my answer. – Archisman Panigrahi Oct 18 '21 at 07:18
  • creating a symlink worked. previously i tried to copy and paste to new directory. now by symlink my problem has solved. – Akash Oct 18 '21 at 09:15