updating gcc problem

Issues related to software problems.
Locked
SamiBH
Posts: 4
Joined: 2013/04/10 06:00:13
Contact:

updating gcc problem

Post by SamiBH » 2013/04/10 06:05:52

Hello,

I need to update gcc to at least 4.4 for xbt install

when I do

[code]yum install boost-devel gcc-c++ mysql-devel subversion[/code]

I get Finished

[code]
Setting up Install Process Package boost-devel-1.33.1-16.el5_9.i386 already installed and latest version
Package gcc-c++-4.1.2-54.el5.i386 already installed and latest version
No package mysql-devel available.[/code]

why not update to gcc 4.8.0?!

system:

CentOS release 5.7 (Final)


Thank you,

User avatar
TrevorH
Forum Moderator
Posts: 26936
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

updating gcc problem

Post by TrevorH » 2013/04/10 08:35:41

Because that is not the way an enterprise distribution works. The focus is on stability and reliability, not on providing the bleeding edge software. As far as I know, even Fedora 18 does not contain gcc 4.8 so expecting it in any enterprise distro means you are going to be disappointed.

You should read [url=https://access.redhat.com/security/updates/backporting/?sc_cid=3093]this link[/url] which explains the philosophy behind the way that packages are updated in RHEL and CentOS.

An immediate fix for your requirement on CentOS 5 is to install the gcc44-4.4.7-1.el5 and gcc44-c++-4.4.7-1.el5 packages.

SamiBH
Posts: 4
Joined: 2013/04/10 06:00:13
Contact:

Re: updating gcc problem

Post by SamiBH » 2013/04/10 11:05:04

thank you for your help

i did

[code]
yum install gcc44-gfortran
yum install gcc44-c++
[/code]

and it did install ok, but still I having problems with installing xbt

I did

[code]gcc -v[/code]

output:

[code]Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=
/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)[/code]

still ver 4.1.2!

User avatar
TrevorH
Forum Moderator
Posts: 26936
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: updating gcc problem

Post by TrevorH » 2013/04/10 11:56:42

[code]
rpm -ql gcc44
[/code]

Hint: it's called /usr/bin/gcc44 so you need to `export CC=/usr/bin/gcc44` first and possibly export CXX too.

SamiBH
Posts: 4
Joined: 2013/04/10 06:00:13
Contact:

Re: updating gcc problem

Post by SamiBH » 2013/04/10 12:29:54

I did

[code]
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44[/code]

But with no luck still gcc version 4.1.2 and having problem installing xbt :-(

User avatar
TrevorH
Forum Moderator
Posts: 26936
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: updating gcc problem

Post by TrevorH » 2013/04/10 16:20:28

What did you do after the exports? You'll need to rerun ./configure and don't forget that in order to test if you get the right version, don't use `gcc -v` use `gcc44 -v`.

SamiBH
Posts: 4
Joined: 2013/04/10 06:00:13
Contact:

Re: updating gcc problem

Post by SamiBH » 2013/04/10 17:10:23

hi

gcc44 -v

[code]Using built-in specs. Target: i386-redhat-linux6E Configured with: ../configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions --disable-gnu-unique-object --with-as=/usr/libexec/binutils220/as
--enable-languages=c,c++,fortran --disable-libgcj --with-mpfr=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-i386-redhat-linux6E/mpfr-install/
--with-ppl=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-i386-redhat-linux6E/ppl-install
--with-cloog=/builddir/build/BUILD/gcc-4.4.7-20120601/obj-i386-redhat-linux6E/cloog-install
--with-tune=generic --with-arch=i586 --build=i386-redhat-linux6E
Thread model: posix gcc version 4.4.7 20120313 (Red Hat 4.4.7-1) (GCC)[/code]

it says ver 4.4, but when I do ./make.sh (is this what you mean by "rerun ./configure" ) to install xbt ,I get

[code]cc1plus: error: unrecognized command line option "-std=c++0x"[/code]

and from Google search the error because gcc ver under 4.3 :-?

User avatar
TrevorH
Forum Moderator
Posts: 26936
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: updating gcc problem

Post by TrevorH » 2013/04/10 18:15:02

I've got no idea what you're trying to compile but usually programs come with a ./configure script that writes a Makefile specific to your system. If yours provides a make.sh then you'd better edit and read that and find out why it is ignoring your export CC=/CXX=

Worldwide7477
Posts: 1
Joined: 2015/02/06 00:09:02

Re: updating gcc problem

Post by Worldwide7477 » 2015/02/06 00:35:05

I know this posting is old but thought i would drop a line in anyway, the old xbt backend for udp system will not compile because centos is pita but the newer version such as rev 2389 will compile using the the make command home this helps those trying to use xbt backend.

Locked

Return to “CentOS 5 - Software Support”