Helpful Information
 
 
Category: Linux Help
Lost C compiler - Help!

I sure hope someone can help out here! I upgraded our gcc from 2.91 to 2.95, using the rpm file. I thought it upgraded properly, but know for some reason, I no longer have a C compiler! I was going to install a module, and I get the error: Can not compile C compiler no working.

This is on a RH/Linux 6.2. Everything was working fine till I upgraded the gcc... which was probably a mistake!

I was hoping someone may guide in the right direction as how to get our C compiler back or what I need to do to re-install it.

TIA,

Mickalo

>> Everything was working fine till I upgraded the gcc... which was probably a mistake!

Biggest mistake. Just so you know, gcc, being the most critical utility in *NIX, should be upgraded only if you have a valid reason and know what you're doing.

>> what I need to do to re-install it

Backup your stuff and redo a fresh install. Ditch Redhat and go for FreeBSD if at all possible. Or simply reinstall with the latest version - 7.2.

You might try removing whatever RPMs you installed and installing/compiling gcc from the source, at

http://gcc.gnu.org

I think we all learn the "only upgrade if you have a really good reason" lesson a few times in the past. . .

I use RH 7.2 on a few different boxes now, and I have to admit that it's really tight. Hopefully you have separate /home, /usr, /tmp, and root partitions, this makes reinstalls much, much easier. . .

Originally posted by Hero Zzyzzx
You might try removing whatever RPMs you installed and installing/compiling gcc from the source, at

http://gcc.gnu.org

I think we all learn the "only upgrade if you have a really good reason" lesson a few times in the past. . .

I use RH 7.2 on a few different boxes now, and I have to admit that it's really tight. Hopefully you have separate /home, /usr, /tmp, and root partitions, this makes reinstalls much, much easier. . .

Thanks. this is what I was thinking of doing, installing from source. But if I don't have a C compiler, I can't install anything from source! that's how I found out in the first place, when installing MySQL 3.23.45 from source!

I would attempt to upgrade from our current 6.2 to 7.2,.. but I don't feel real sure about that. The dedicated server we're on has about 40 clients hosted on it, and I don't want to screw it up.

I'll contact our support to see if they can help me out.

YES!! I am learning the "IN's and OUT's" of a system admin,...THE HARD WAY!! :D

Sorry it didn't work, mickalo.

Have you tried just typing gcc -v ? To see if it's there at all?

Originally posted by realnowhereman
Sorry it didn't work, mickalo.

Have you tried just typing gcc -v ? To see if it's there at all?

Well after burning the midnite oil last nite. I was able to get it back,..I think!

I found the problem when attempting to install MySQL from source, and it wouldn't compile. If I now run this configuration:


CCFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql --with-berkeley-db --without-docs --without-bench \
--without-readline --enable-assembler --with-mysqld-ldflags=-all-static \
--with-mysqld-user=mysql2 --with-low-memory --with-tcp-port=3307 \
--with-unix-socket=/tmp/mysql2.sock --localstatedir=/usr/local/mysql/var

I get the error message: CCFLAGS command not found
but if I remove this:


CCFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \


and run it like this:


./configure --prefix=/usr/local/mysql --with-berkeley-db --without-docs --without-bench \
--without-readline --enable-assembler --with-mysqld-ldflags=-all-static \
--with-mysqld-user=mysql2 --with-low-memory --with-tcp-port=3307 \
--with-unix-socket=/tmp/mysql2.sock --localstatedir=/usr/local/mysql/var


it seems to compile without any errors. I didn't run the make or make install, I just wanted to see if it would get past the configuration, which it didn't yesterday, it does today.

If I enter: gcc -v it display the correct information now, as it did before I attempted to upgrade the gcc. I think I removed everything I tried to install. So I believe it's back to it's orginal state! I think.

If I attempt to use "export" at the command line, I get the error, "command not found.." not sure if this part of the problem or not. So right now I can't use the CCFLAGS= or CXX= enviromental variables.

Mickalo

If I attempt to use "export" at the command line, I get the error, "command not found.."

What shell are you using?

Originally posted by realnowhereman

What shell are you using?

/bin/bash as root

Is that incorrect?

/bin/bash as root

Is that incorrect?

It's all right. Just checking. Dunno why it doesn't like export ...

Originally posted by realnowhereman

It's all right. Just checking. Dunno why it doesn't like export ...

I tried it again, changed the shell in the /etc/passwd for root to /bin/bash, logged in,.. and bingo! I can export now.

Go figure! :D

I think I've got the problem resolved now... :)

I really appreciate all the help!

Mickalo










privacy (GDPR)