You are not logged in.

#1 2012-04-23 01:32:07

carcarah
Member
Registered: 2012-04-23
Posts: 6

GCC 4.7 issue. I need the older one (4,6 or lower)

dear comrades,

I did a "pacman -Suy" on my arch, and a pretty complicated issue has emerged:

The new gcc is 4.7, but I work with NVidia's CUDA 4.1, and CUDA 4.1 doesn't work with gcc 4.7.

Some people told me to run another pacman command and fall back gcc. The problem is: somo other people said this is dangerous.

The question here is: can I have two gcc versions, like in ubuntu?

Have gcc 4.7 as default gcc and 4.6 as an other gcc that I will call manually?

If the answer is YES, how can I proceed?

thanks.

Offline

#2 2012-04-23 02:11:19

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Search the AUR


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2012-04-23 02:26:34

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Dear Carcarah
You can use AUR for this task
in aur exist gcc4.5,4.4,3.x and much more
you care about time for compiling

and dont forget read how use other gcc in your specific program
and remmenber report the bug uptream

you Comrade another Arch User


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#4 2012-04-23 02:38:21

carcarah
Member
Registered: 2012-04-23
Posts: 6

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

hello comrade. Thanks for helping me.

I have these two packages: gcc-4.6.2-7-i686.pkg.tar.xz gcc-libs-4.6.2-7-i686.pkg.tar.xz

I want to do this: keep 4.7 and install gcc-4.6.2 or other gcc that CUDA 4.1 suports.

How should I proceed?

Thank you!

By the way: I reported this bug to NVidia. There is no answer from them.

Offline

#5 2012-04-23 02:47:43

carcarah
Member
Registered: 2012-04-23
Posts: 6

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

One more information:

I thing that CUDA 4.1 only suports gcc 4.4, I dont know about 4.5 and further.

Offline

#6 2012-04-23 02:59:43

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Dear Carcarah
You need a tool like Packer or Yaourt for download and quasi-"automagicali" install gcc44 from AUR
You cannot use the standard gcc from the Old repos since many packages can break

for information about AUR and AUR-helpers read the archlinux Wikia

beffore you install gcc44 trou AUR you have 2 gcc, and need to specifi that for cuda that gcc use ( edit tha path of gcc for cuda to point to gcc44 default install-site

you Comrade Anoter Archer


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#7 2012-04-23 03:11:37

carcarah
Member
Registered: 2012-04-23
Posts: 6

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Dear comrade Jristz,

I am doing what you told me: installing gcc-4.5 from Yaourt .

The installation is very verbose and taking to long.  hope this strategy works.

Thanks for helping!

Offline

#8 2012-04-23 03:32:56

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Ok Found informatiuon abouth how set gcc44 and maintain a gcc4x too
http://timelordz.com/wiki/Nvidia_CUDA
http://www.linuxquestions.org/questions … -a-894576/

and in a theme completi random from this i found this ther

sudo ln -s /usr/bin/gcc-4.4 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/local/cuda/bin/g++

in other woerd you can set the "default" gcc after using cuda or simlinking the gcc-cuda-link to the gcc4-path-equivalent

Last edited by Jristz (2012-04-23 03:34:58)


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#9 2012-04-23 03:53:18

carcarah
Member
Registered: 2012-04-23
Posts: 6

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

This is what I am doing, comrade!

I tried gcc 4.5.3, but I got the same error! sad

I am trying gcc 4.4.6 in yaourt.

Let's see what will happen.

Thank you, comrade.

Offline

#10 2012-04-23 04:26:21

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

remmember search the path of gcc-4.4
since /usr/bin/gcc for default is gcc4.7

note: cuda is updated now in arch-repo...


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#11 2012-04-23 06:46:30

carcarah
Member
Registered: 2012-04-23
Posts: 6

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

Dear comrades.

I did a gcc downgrade.


But the system is very slow running CUDA codes. I think it is the driver, I dont know. Thank you!

Last edited by carcarah (2012-04-23 13:54:35)

Offline

#12 2012-07-06 09:56:05

qdm
Member
From: Wuhan, China
Registered: 2011-02-01
Posts: 12
Website

Re: GCC 4.7 issue. I need the older one (4,6 or lower)

I successfully worked around this issue by:
- keeping gcc 4.7
- adding the following at the beginning of my .cu file
     #undef _GLIBCXX_ATOMIC_BUILTINS
     #undef _GLIBCXX_USE_INT128
- putting all of my non-CUDA-related c++ code into a separate .cpp file, and including it in the .cu file.

Offline

Board footer

Powered by FluxBB