Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is it possible to install gcc13 ?
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
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 73
Location: Germany

PostPosted: Wed Feb 12, 2025 8:00 pm    Post subject: Is it possible to install gcc13 ? Reply with quote

Hello,

Motivation: My system works correctly with gcc14. But I want to play around with SYCL (https://link.springer.com/book/10.1007/978-1-4842-9691-2) using Intel software (https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html#gs.kbdt89). However, the most basic examples do not compile. Checking differences, it looks like gcc14 is the problem. It looks like gcc13 would be fine.

Hence my question. Is it possible to install gcc13 side by side with gcc14? I understand that all include files and libraries would be duplicated.

Thanks in advance!

Regards,
Pablo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54861
Location: 56N 3W

PostPosted: Wed Feb 12, 2025 8:06 pm    Post subject: Reply with quote

pstickar,

gcc:11 to gcc:14 are all stable in ::gentoo

emerge sys-devel/gcc:13 will install gcc in slot 13, which is what you want. Add --oneshot to avoid it being added to your world file.
Now use gcc-config to select gcc:13
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 73
Location: Germany

PostPosted: Thu Feb 13, 2025 7:09 am    Post subject: Reply with quote

Thank you, that worked.
I could not bring SYCL to work, though.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2726

PostPosted: Thu Feb 13, 2025 7:39 am    Post subject: Reply with quote

GCC 14 introduced stricter language standards and enabled them by default. There are switches to turn the old behavior on. Maybe if you start searching for the errors you would learn something in addition.

Otherwise nothing stops you from having multiple gcc versions installed next to each other. You just need to explicitly invoke the desired version. But don't change the system wide default version, I don't think that's a good idea.

Best Regards,
Georgi
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2152

PostPosted: Thu Feb 13, 2025 11:45 am    Post subject: Reply with quote

Do consider starting a (new?) thread about your SYCL issues.
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1810
Location: South America

PostPosted: Thu Feb 13, 2025 12:43 pm    Post subject: Reply with quote

Why don't you show us (perhaps change the thread's title or start a new one?) the smallest example program that doesn't build and tell us how you are trying to build it, and how does it fail?

GCC can't accept SYCL programs directly, you need special tools to build them. Like Intel's oneAPI DPC++/C++ compiler from your link. Which might or might not call GCC behind the scenes; I'm not familiar with these tools.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 73
Location: Germany

PostPosted: Thu Feb 13, 2025 4:41 pm    Post subject: Reply with quote

I summarized my attempts with SYCL in a new thread (https://forums.gentoo.org/viewtopic-p-8854599.html#8854599).
Thank you for the encouragement to post it.
_________________
p.
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