Click to See Complete Forum and Search --> : compile prob [newbie]
deaf2society
05-21-2003, 06:11 PM
Hello, I have been having problems compiling apps under my LinuxMandrake 9.1 machine. The two programs I have tried to compile are zsnes(the snes emulator) and *****X. The decompression process goes fine, however, when I try to run ./configure on *****X, the console sends me this message..
"Welcome to the *****X-1.0c19 configuration
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH"
Now I am fairly sure GCC came with the distro and that it was installed during setup, under rpmdrake it says version 3.2 is installed. I am guessing that I have to define the location of GCC.
Also, it would be helpful if anyone could tell me how to check, using the console, what version of a certain program I have installed. Thanks.
Stween
05-21-2003, 06:35 PM
If GCC was installed on your system during setup, which it more than likely was, then it'd be very unusual for it to be sitting somewhere so obscure so that a normal ./configure script wouldn't see it...
gcc should probably be in /usr/bin, with libraries in /usr/lib and so on... do an
echo $PATH
to see if /usr/bin is in your PATH (which it damn well will be if you got this far :) ), and further do a
whereis gcc
to see if the gcc executable is anywhere to be found on your system ('locate gcc' will give a fuller output, listing every file with gcc in the title).
If gcc is indeed in your path and *****X's configure script just isn't seeing it, you should be able to point the script at it before running by setting the CC environment variable to point at it explicitly. It might be that the 3.x version has been installed somewhere obscure, not in your path.
If this is the case, you'll probably want to either add the directory the gcc binaries are living in to your path environment variable, or make a symlink called cc in /usr/bin that points to gcc, whereever it may be. If this is not the case, and it's just not installed, dig out the Mandrake disk again :)
To find out the version of a program, generally you run
<program-name> --version
OR
<program-name> -v
Let us know how you get on :)
deaf2society
05-21-2003, 06:53 PM
/usr/bin/ is in my $PATH.
but, upon keying in 'whereis gcc', the output reads:
[root@localhost *****X]# whereis gcc
gcc:
[root@localhost *****X]#
im guessing it can't be found since no directory is listed.
also, doing a quick skim of the directory /usr/bin/, i see no file beginning with gcc, if that is what it starts with...;)
if that is the case, and i must install it from the cd, what filename should i be looking for? i have the standard edition of mandrake 9.1.
Stween
05-21-2003, 07:25 PM
Originally posted by deaf2society
but, upon keying in 'whereis gcc', the output reads:
[root@localhost *****X]# whereis gcc
gcc:
[root@localhost *****X]#
im guessing it can't be found since no directory is listed.
You guess correctly. Now, I'm really scraping what remains of my RPM knowledge (I haven't used an RPM based system in a couple of years), but try (something like):
rpm -ql gcc
... which, if I'm thinking straight, 'q'ueries the database for the package and 'l'ists the files. If that turns up nothing, you'll have to find it on your Mdk disks.
It'll simply be called gcc-<version>-i686.rpm (or something similar), and will be sitting alongside all your other rpm's on that disk.
rpm -ivh <filename>
...will either install it, or tell you what other files you have to install first. Anything else that you need to install to fulfill any dependancies should be on your Mandrake disks also.
Good luck :)
deaf2society
05-21-2003, 08:17 PM
i have the packages installed from the mandrake discs yet my system still says no proper c compiler is installed. all distributions should have the ability to compile from source right? i know mandrake is rpm based but that can't mean the whole distro is limited to packages....hopefully.
Stween
05-22-2003, 03:03 PM
Originally posted by deaf2society
i know mandrake is rpm based but that can't mean the whole distro is limited to packages....hopefully.
You are correct. Of course, if GCC is installed, the configure script would pick up on it.
Can you run gcc by itself? Run:
gcc -v
... and see what the output is. If it gives you version information on gcc, then the problem lies within the configure script(s). If gcc isn't in your path, you'll get:
bash: gcc: command not found
You say the packages are installed ... what packages *exactly* are installed?
Originally posted by deaf2society
all distributions should have the ability to compile from source right? Yes, but often not by default. If you didn't specifically choose to install the development packages, you'll need to do so. You should also install the kernel source/kernel header pakages.
deaf2society
05-28-2003, 03:11 PM
Sorry for the delay, My computer has been in pieces for a few days as I revamp my computer room. I do not get any information when entering "gcc -v". Instead I get the "bash: command: gcc: not found"
in the package manager i locate the c preprocessor titled gcc, version 3.2.2. it lists the files associated that will be installed and where they go....the list is:
Files:
/lib/cpp
/usr/bin/cpp
/usr/bin/cpp-3.2.2
/usr/lib/gcc-lib/i586-mandrake-linux-gnu
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/cpp0
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/tradcpp0
/usr/share/man/man1/cpp.1.bz2
Stween
05-28-2003, 03:55 PM
That's the C preprocessor; that would be called by the C compiler if it were present. I'm surprised that it's installed while gcc itself isn't.
On your installation CD's, do you have a package simply called gcc-<version number>.rpm? That's what you're looking for. The compiler itself is not installed on your system.
deaf2society
05-28-2003, 05:22 PM
the only other packages containing 'gcc' are the documentation file and the older preprocessor version for 2.96. strange. is it possible to install gcc without a prior version already available?
The compiler must be on your CDs somewhere, unless you haven't got a full set of disks.
If you really can't locate the package on your disks you can get it from www.gnu.org or (probably) Mandrake's site.