Hi Guys
I get the following error when I try to compile with gcc:
Code:
sansari@ubuntu:~/androidkernel$ sudo make ARCH=arm
[sudo] password for sansari:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
After doing a little search online, I suspected the cause to be a discrepency between the default Ubuntu compiler and what gcc tries to use. Here is what I see
When I issue the following command I get:
Code:
gcc -print-prog-name=cc1
/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1
when I ask for the location of default compiler I get:
Code:
which cc
/usr/bin/cc
I tried this command:
Code:
export cc1=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1
But I still get the same error. Should I have perhaps issued:
Code:
export cc=/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1
Basically I do not understand shell vs. bash, and which files Ubuntu uses to set environment variables. I did try to review Ubuntu documentation online. But I don't even know where to begin, so pointing me to the right document even is greatly appreciated. I think the problem I am running into is that gcc tries to issue the command 'cc', which points to /usr/bin/cc rather than /usr/lib/gcc/x86_64-linux-gnu/4.6/cc1. Am I right? I also need to understand better how to set environment variables for root vs. user space. I have a lot of my files in the root space ( I know that was an awful thing to do, and I would never do it again. I just do not have a way back now )
Bookmarks