You are not logged in.

#1 2016-05-07 23:55:25

blash20
Member
Registered: 2016-05-07
Posts: 2

[Solved] cuda7.5 and gcc 6.0

I've updated to gcc 6.0 and now I can not compile my cuda code. From what I have found out, these are not compatible so I have been trying to install gcc49 from aur, unfortunately it will not build with gcc 6.0. I get the following output:

/tmp/yaourt-tmp-user/aur-gcc49/src/gcc-4.9.3/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                        ^
In file included from /tmp/yaourt-tmp-user/aur-gcc49/src/gcc-4.9.3/gcc/cp/except.c:1013:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
Makefile:1058: recipe for target 'cp/except.o' failed
make[3]: *** [cp/except.o] Error 1
make[3]: Leaving directory '/tmp/yaourt-tmp-user/aur-gcc49/src/gcc-build/gcc'
Makefile:4226: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/tmp/yaourt-tmp-user/aur-gcc49/src/gcc-build'
Makefile:21618: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/tmp/yaourt-tmp-user/aur-gcc49/src/gcc-build'
Makefile:893: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build gcc49.
==> Restart building gcc49 ? [y/N]
==> ------------------------------
==> N

I have also tried  to install the previous gcc  package in

/var/cache/pacman/pkg/

with

pacman -U package_name

but that doesn't work either:

loading packages...
warning: downgrading package gcc (6.1.1-1 => 5.3.0-5)
resolving dependencies...
warning: cannot resolve "gcc-libs=5.3.0-5", a dependency of "gcc"
:: The following package cannot be upgraded due to unresolvable dependencies:
      gcc

:: Do you want to skip the above package for this upgrade? [y/N] 

If I can install an older version of gcc along side the latest one  my problem is solved.

For interest (those who are compiling cuda code, my error is similar to here, although compiling my own code.
Can anyone help?

Last edited by blash20 (2016-05-08 02:07:50)

Offline

#2 2016-05-08 01:04:49

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [Solved] cuda7.5 and gcc 6.0

Before I start: Partial Upgrades are not supported.

If you could compile it with GCC 5, then I suggest using the Arch Rollback Machine to "restore" your system to a date at which CUDA would install.

At this point, you could decide to hold back GCC.

====

A better solution is to create a gcc53 package for the AUR and compile it with GCC 5.3


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2016-05-08 01:18:17

blash20
Member
Registered: 2016-05-07
Posts: 2

Re: [Solved] cuda7.5 and gcc 6.0

Thank you for your response,

I currently have only gcc6.0 installed and so I'm just trying unsuccessfully to compile gcc5.3 with that. I've tried to create a gcc53 package by editing the PKGBUILD  here, please take note of the comments (I have left a comment), I seem to have the same problem as the other user.

I misunderstand your comment about Arch Rollback Machine, would I need GCC 5 to use this?

Edit: Thanks for telling me about Arch Rollback Machine, that worked I'll now look up how to hold back packages!

Last edited by blash20 (2016-05-08 02:07:18)

Offline

Board footer

Powered by FluxBB