[Solved] Downgrading gcc

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
wiccano
Posts: 13
Joined: 13. May 2010, 02:12

[Solved] Downgrading gcc

Post by wiccano »

Hi

I installed cuda 4.0 but this dont have support for gcc 4.5 or above.
how i do a secure downgrading of gcc (gcc 4.4.4 i supose)? or have two gcc instaled (4.5.2 and 4.4.4)?

Thanks, greetings from Chile

sorry my english
Last edited by wiccano on 26. Aug 2011, 15:59, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6349
Joined: 6. Jun 2009, 17:40

Re: Downgrading gcc

Post by gapan »

You don't downgrade gcc. Not unless you want everything broken. It is possible to install different gcc versions side by side, but it's not a straightforward task at all. You really need to know what you're doing. You will need to compile the gcc version you want from source, create a package while making sure no files from the already installed gcc will be replaced. When you have the older version working alongside the newer one, you will need to point CC to the old version, so the makefiles will use it.

You'd be better off if you searched for patches that make it build with the newer gcc, or file a bug report with the software developers. They will have to update their software at some point anyway.
Image
Image
wiccano
Posts: 13
Joined: 13. May 2010, 02:12

Re: Downgrading gcc

Post by wiccano »

thanks for reply =D

At end, i downloaded source of gcc 4.4.6, compiled and installed it, and i did a little change in the configuration file of nvcc (cuda's compiler) and i can run the binaries samples =D. This is what i do:

Download gcc-4.4 source ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.4.6 ... .6.tar.bz2,

Code: Select all

# tar jxvf gcc-4.4.6.tar.bz2
# cd gcc-4.4.6
# ./configure --prefix=/opt/gcc44
# make
# make install
Add line to cuda/bin/nvcc.profile
compiler-bindir=/opt/gcc44/bin

The bad thing is my "tree of dependencies" is broken now, but all works.

The source all this.
http://www.reddit.com/r/Ubuntu/comments ... untu_1104/

it is the 5000 post in problems topics XD

Greetings
Post Reply