LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   g++2.8.x compiler RPM's (https://www.linuxquestions.org/questions/linux-software-2/g-2-8-x-compiler-rpms-689800/)

nedzer 12-11-2008 05:50 AM

g++2.8.x compiler RPM's
 
Hi,

I'm installing unixODBC and one of the prerequisites is

g++2.8.x (x>0)

and

libg++2.8.x (x>0)

For the libg++ I found the equivalent RPM's. I'm on RH Ent 5.0.

I've searched high and low for g++2.8.x (x>0), even better would be finding the resultant rpm's, since I'm a noobie to linux and am not that confident when it comes to installing new packages yet.

Any help will be gratefully received.

Cheers, Ed

kilgoretrout 12-11-2008 11:20 AM

g++ is part of the standard compiler, gcc. gcc is the standard linux C compiler used to compile the linux kernel, among other things. To see what gcc packages you have installed run as root:

# rpm -qa | grep gcc

That should list all the packages with "gcc" as part of the package name that you currently have installed. Post the output here. The C++ compiler part of gcc is usually in a separate package named gcc-c++-<version number> in most distros. By way of illustration, here's one I found for Centos which is a RH Enterprise clone:

http://rpm.pbone.net/index.php3/stat....i386.rpm.html

If you have access to the RH Enterprise 5.0 packages, use the native packages instead of what's on the web. There can be compatibility issues when you start mixing up gcc versions.

You have to install the gcc-c++ package to give gcc C++ capabilities and the C++ compiler is called with the "g++" command instead of "gcc" which is used for compiling C code.

knudfl 12-11-2008 03:28 PM

"unixODBC-2.2.14" doesn't need g++-2.8 ( or libg++2.8 )

but will compile with the default gcc-c++-4.1.2 (4.1.1)
from RH EL5.

The text about "2.8" is for older versions (year 1999?),
AFAIK.

unixODBC-2.2.14 will even choose qt4 over qt3 if it is installed.
( If you need a GUI, else 'sh configure --without-gui' )

( I have build it on PCLinuxOS2007 )

'unixODBC-2.2.14.tar.gz' : http://www.unixodbc.org/

# 'yum install unixODBC' will install version 2.2.11
on CentOS 5.2 = RH EL 5.2 so it is probably in your package
manager too.

Regards

nedzer 12-12-2008 04:21 AM

kilgoretrout (a keen angler by the sounds of it) & knudfl (no comment),

Thanks both for your reply's.

firstly here's the gcc's already installed

[root@moran lib]# rpm -qa | grep gcc
gcc-4.1.2-42.el5
gcc-c++-4.1.2-42.el5
compat-gcc-34-3.4.6-4
compat-gcc-34-c++-3.4.6-4
gcc-gfortran-4.1.2-42.el5
libgcc-4.1.2-42.el5

I've just sorted out the unixODBC error when another member on another thread suggested I try

./configure --prefix=/tmp/unixODBC --without-gui

instead of

./configure --prefix=/tmp/unixODBC --enable-gui=No (this used to stop dead in it's tracks with an error)

I was getting the error.


that worked a dream, was then able to run make and install make w/o a glitch, libraries installed etc.

This whole install of package malarkey I found a bit troublesome. This yum command just seems to sort things on the spot. Does it resolve package dependencies etc.? I'll do a bit of my own research now since it may save me heaps of hassle down the road.

Thanks again


All times are GMT -5. The time now is 10:44 PM.