Compiling From Source Problem(g++)
Heyas,
I am running Mandrake 9.2 and just came across this error when I tried to compile KMud. checking for g++... g++ checking whether the C++ compiler (g++ -s) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables. I then did a search on this site, but it seems most people who have an error similar to this have a problem with gcc and compiling C code. I have all the gcc-devel packages installed, however in the Software Manager I did not see anything pertaining to g++. Does anyone know how to fix this? Thanks, Chris |
Run:
# rpm -qa | grep gcc and compare your output with mine: Code:
# rpm -qa | grep gcc |
I get essentially the same thing, it is just in a different order. I guess itd not a missiong package. Could it possible be that the compiler is not configured correctly?
This is what I get: # rpm -qa | grep gcc gcc-c++-3.3.1-2mdk libgcc1-3.3.1-2mdk gcc-cpp-3.3.1-2mdk gcc-3.3.1-2mdk |
I just tried compiling another program, a different MUD client, and I got this error:
checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for g++... g++ checking whether we are using the GNU C++ compiler... no checking whether g++ accepts -g... no checking dependency style of g++... none checking whether g++ supports -Wundef... no checking whether g++ supports -Wno-long-long... no checking whether g++ supports -Wnon-virtual-dtor... no checking how to run the C++ preprocessor... /lib/cpp configure: error: C++ preprocessor "/lib/cpp" fails sanity check Perhaps, this extra information will help? |
Well, what it says is that it cannot compile programs..
I've had it once on my RedHat when I somehow messed up my gcc libraries, the fix for me was to reinstall gcc. You may try to run as root 'ldconfig' so it may fix it for you, but you may also need to reinstall all of you gcc stuf. And if you want to compile gcc yourself make sure you follow compile instructions cause it is not that simple... |
Would I be able ot just use the RPM manager and uninstall all the GCC packages, reboot, then reinstall them?
|
Yep, you can do it without reboot.
Make sure you can download or you have already your packages to install later. Just use your RPM to uninstall as follows: rpm -e --nodeps gcc-c++-3.3.1-2mdk rpm -e --nodeps gcc-cpp-3.3.1-2mdk rpm -e --nodeps libgcc1-3.3.1-2mdk rpm -e --nodeps gcc-3.3.1-2mdk Then just install you packages... rpm -ihv <package> |
In Mandrake they have a GUI interface for RPM. I think that's what he intends to use. It doesn't require a reboot either. The most you should have to do is logout and login.
|
All times are GMT -5. The time now is 01:05 AM. |