"No C compiler found in $PATH" - why not?
I know this has probably been asked multiple times before, but:
I installed gcc (GNU c compiler) v 2.95 from CNR so that I could compile sodipodi. However, after it was installed to /usr/bin/, I found that ./configure still kept telling me "$no acceptable c complier found in $PATH". So, I created a symlink to gcc, still got an error, even copied the binary from /usr/bin to sodipodi's directory, hoping that that would put a c compiler in $PATH, and ran ./configure again. Still no acceptable c compiler found in $PATH. How do I set gcc as my default c compiler so that ./configure will stop giving me this error? I'm using Linspire, by the way, if you hadn't already figured that out when I mentioned "CNR". |
Go to a terminal and type "echo $PATH" without the quotes and see if /usr/bin is in it. If all else fails, you could try a symlink in /bin, but /usr/bin should be in everyone's path. Hrmm.
|
This is the output...
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/bin:/usr/share/qt3/bin I don't quite understand it. /usr/bin/ is the second path in $PATH. Do the paths need to be in a different order? If so, how do I set $PATH? Edit: I created a symlink to gcc in /bin, but it didn't satisfy ./configure. |
The problem can be related to the fact that the available gcc compiler is not suitable to the compilation for some reason. Maybe a too old version? Anyway, to force using a compiler you can define the environment variable
Code:
export CC=gcc Code:
file gcc Code:
/usr/bin/gcc-4.1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped |
Well, I tried force CC=gcc, and it did recognize gcc. However, it then told me that my "C compiler cannot create executables".
When I ran file, the output was: Quote:
Code:
apt-get install gcc-4.1 I am using gcc version 2.95 (I have no idea why CNR would have an outdated version, and the most recent one they have is version 3.4) - where can I find a more recent binary? |
Quote:
Code:
apt-get install gcc Code:
apt-get install build-essential |
Code:
dell:~# apt-get install gcc Code:
dell:~# apt-get install build-essential is only available from another source"? |
Update: I uninstalled my old, outdated version of GCC and replaced it with a less obsolete version (3.4). I set it as the default with "export CC=gcc", and it gave me the same error until I copied the "gcc-3.4" file to just "gcc". Then configure ran fine, generating a couple screens worth of output, and all seemed to be fine until the end. Configure just required me to have gcc, g++, gpp and pkg-config, and they had to be those exact names or configure wouldn't find them (mine had names like gcc-3.4 and g++-3.4). My cpp wasn't sane because I didn't have the GNU c++ compiler, g++ (which presumably told gpp how to function).
To make a long story short, I got it solved, and if anyone using the Linspire distro has my problem, they should visit my CNR aisle. |
All times are GMT -5. The time now is 05:32 AM. |