Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ebuild needs a particular gcc version...how to select?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
salfter
n00b
n00b


Joined: 02 Jan 2003
Posts: 63

PostPosted: Mon Jun 25, 2018 4:19 pm    Post subject: ebuild needs a particular gcc version...how to select? Reply with quote

So gcc 7 is now keyworded stable. I have some ebuilds for software that won't yet build on gcc 7. I can include something like DEPEND=<gcc-7 to make sure that an older compiler is available (and to keep emerge --depclean from deleting it), but what do I need to include to instruct emerge to use gcc 6 for these ebuilds? For now, I'm using gcc-config to switch to the older compiler before building the affected packages and then to switch back to gcc 7 for everything else, but is there something I can include within the ebuild so I don't have to do this?
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1603
Location: KUUSANKOSKI, Finland

PostPosted: Mon Jun 25, 2018 4:35 pm    Post subject: Re: ebuild needs a particular gcc version...how to select? Reply with quote

I think just by setting CC and CXX environment variables to point to the older compilers should work...

Are these your own ebuilds? If they're not then I'd rather use /etc/portage/package.env for changing the compiler. See Clang wiki page for examples.
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6299

PostPosted: Mon Jun 25, 2018 4:39 pm    Post subject: Reply with quote

The right solution is to fix the compilation with gcc-7.
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1603
Location: KUUSANKOSKI, Finland

PostPosted: Mon Jun 25, 2018 4:43 pm    Post subject: Reply with quote

mv wrote:
The right solution is to fix the compilation with gcc-7.
++

... but if the issue is in the hands of upstream... :x
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
salfter
n00b
n00b


Joined: 02 Jan 2003
Posts: 63

PostPosted: Mon Jun 25, 2018 5:00 pm    Post subject: Reply with quote

I did a little more digging, and the issue was with the CUDA SDK and CUDA toolkit. I had v9.0.something installed, which apparently only works with gcc 6.x (or earlier, to a point). v.9.2 is the first version that supports gcc 7. I keyworded nvidia-cuda-toolkit and nvidia-cuda-sdk ~amd64, rebuilt them, and now have one of the affected ebuilds rebuilding with gcc 7. Earlier, the build was bombing out fairly early; now, it appears to be building without issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum