scaryfast Posted July 31, 2005 Report Share Posted July 31, 2005 (edited) Hi, I have recently installed Mandriva Limited Edition 2005 for AMD64 and I have been unable to use GCC/CC to compile even a simple hello world example in C. I installed GCC using #rpmi gcc in a Konsole and currently have the following packages: gcc-3.4.3-7mdk gcc-c++-3.4.3-7mdk gcc-cpp-3.4.3-7mdk When trying to configure packages, or even with a simple hello world .c file using this line: #gcc -otest test.c I receive the following error: gcc: installation problem, cannot exec `cc1': No such file or directory I have seen similar problems in other threads, but they don't seem to have been solved - this is driving me mad, any help would be greatly appreciated. [moved from Software by spinynorman - welcome aboard :)] Edited August 1, 2005 by scaryfast Quote Link to comment Share on other sites More sharing options...
devries Posted July 31, 2005 Report Share Posted July 31, 2005 Looking for the cc1 file on http://rpm.pbone.net/ it seems it should be in the gcc-cpp package. Alernatively it's in the prcl-tools package from plf. (this is for i586). Quote Link to comment Share on other sites More sharing options...
bvc Posted July 31, 2005 Report Share Posted July 31, 2005 use urpmf to find what pkg the missing file is in :D localhost:/# urpmf cc1libgcc1:/lib/libgcc_s-3.4.3.so.1 libgcc1:/lib/libgcc_s.so.1 gcc-cpp:/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/cc1 and then install with urmpi gcc-cppno need for the internet and much faster :P Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 With urpmf you didn't find the PLF package :P Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 Thanks for the replies. I installed the packages you have suggested (gcc-cpp, libgcc1 and prcl-tools) but I still get the same message when trying to compile using gcc. I also searched my hard disk for cc1, but this failed to find anything. Any ideas? Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 How did you search? Did you run updatedb before you searched? If you installed these packages the file must be on your system. I doubt they made a rpm without that file just for you. :) Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 I have searched again (using Find File) after turning off my machine for the evening, and - joy of joys - the file exists! :D It's in: /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.4 I still get "cannot exec `cc1': No such file or directory" though, so now I assume it's a $PATH thing? Now what?! Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 No it's a wrong package thing :) It should be in: /usr/bin/x86_64-mandrake-linux-gnu/3.3.4 You've installed 'Mandriva Limited Edition 2005 for AMD64' so you should install the gcc packages for Mandriva x86_64. It's in main ( http://www.mandriva.com/products/limited-e...ve_x86-64_1-dvd ) so make sure you've added that as one of your repositories. Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 (edited) The mystery unravels - thanks for your time :D I can only find one CD iso for the x86_64 version, and Easy Urpmi only gives me two sources (free/non-free plf) for packages when I specify AMD64. I have had problems with Python in Superkaramba too, so I'm thinking I might have munged everything... Would you recommend downloading the i586 DVD and starting from scratch? If so, how would I do this, and could I salvage anything (like my amaroK database and stuff)? Edited August 1, 2005 by scaryfast Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 That is not neccesary. The easy urpmi site gives only links that have been fed into it (it's not an official mandriva tool) so there are repositories for main, contrib etc for x86_64 ( for example: http://ftp.surfnet.nl/ftp/pub/os/Linux/dis...5/x86_64/media/ ). You just have to add them manualy. Open the MCC, software, media management and add the urls for main, contrib etcetc. The is no free DVD iso. The default amarok database is kept in /home/<your name>. (if you use mySQL it's different. You need to make a backup). Reinstalling without formatting /home will keep all your user data (disclaimer: only if you keep all your user data in /home :) ) Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 Woohoo! GCC and CC work... Though when I try compiling something with #include <iostream.h> I get the following error message: test.c:1:20: iostream: No such file or directory Should it do that? How can I fix it? Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 That means you need to install a package that includes the iostream.h file. Xxxxx.h files are header files and can be found in xxxx-devel packages (where xxxx is the name of an application). With the site from my earlier post you can find what devel-package needs to be installed (but make sure it's one for x86_64 :) ) Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 Cool - that worked for my .c hello world, but for a .cc one that looks like this: #include <iostream> int main() { cout << "Hello, World\n"; return -1; } I get: error: `cout' undeclared (first use this function) error: (Each undeclared identifier is reported only once for each function it appears in.) I promise, I'll run out of problems soon. B) Quote Link to comment Share on other sites More sharing options...
devries Posted August 1, 2005 Report Share Posted August 1, 2005 Ah now you're really programming...... You need an expert now :D Better start a new topic. Quote Link to comment Share on other sites More sharing options...
scaryfast Posted August 1, 2005 Author Report Share Posted August 1, 2005 OK - thanks for all your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.