LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2004, 07:49 PM   #1
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Rep: Reputation: 30
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
 
Old 01-30-2004, 08:26 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,472

Rep: Reputation: 189Reputation: 189
Run:

# rpm -qa | grep gcc

and compare your output with mine:

Code:
# rpm -qa | grep gcc
gcc-c++-3.3.1-2mdk
gcc-3.3.1-2mdk
gcc-cpp-3.3.1-2mdk
libgcc1-3.3.1-2mdk
Make sure you have all the above packages installed. I do and have no problems compiling C++ code.
 
Old 01-30-2004, 09:25 PM   #3
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
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
 
Old 01-30-2004, 09:34 PM   #4
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
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?
 
Old 01-31-2004, 12:37 AM   #5
YMHiK
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware 2.6.5, Slackware 2.6.4, RedHat 9 2.4.20-8
Posts: 23

Rep: Reputation: 15
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...
 
Old 01-31-2004, 09:20 AM   #6
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
Would I be able ot just use the RPM manager and uninstall all the GCC packages, reboot, then reinstall them?
 
Old 01-31-2004, 12:52 PM   #7
YMHiK
LQ Newbie
 
Registered: Jan 2004
Distribution: Slackware 2.6.5, Slackware 2.6.4, RedHat 9 2.4.20-8
Posts: 23

Rep: Reputation: 15
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>
 
Old 01-31-2004, 01:01 PM   #8
Pwnz3r
Member
 
Registered: Jan 2004
Location: Lancaster, OH
Distribution: Gentoo
Posts: 393

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian , Problem compiling from source files. v3sS0n Debian 1 11-27-2004 01:37 PM
Problem compiling from source rkfb Slackware 3 11-06-2004 05:37 PM
compiling software from source...how do i delete the folder w/ source? webazoid Linux - Software 2 07-01-2004 10:09 PM
Problem in compiling source code JIV Linux - Software 1 02-14-2004 04:11 AM
problem compiling source (all recursive) thunderflash Linux - General 2 11-02-2003 09:46 PM


All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration