images icon indicating copy to clipboard operation
images copied to clipboard

Support for GCC14 & GCC15 in the cpp images

Open gldraphael opened this issue 11 months ago • 5 comments

It would be very nice if we could specify a GCC version for the existing images similar to how we can currently specify a CMAKE version. But just having access to only the latest GCC would be nice too, since many of the newer C++ features (like println from the print header) are not supported in GCC13.

gldraphael avatar Jan 08 '25 04:01 gldraphael

Thank you for the feedback! I wonder if @sinemakinci1 has any thoughts on this? :)

bamurtaugh avatar Jan 30 '25 22:01 bamurtaugh

@gldraphael @bamurtaugh Thanks for forwarding, I think this is a very valid request if feasible, as there are some C++ features that require min GCC 14 or 15 to be able to compile (see: https://en.cppreference.com/w/cpp/compiler_support/23)!

sinemakinci1 avatar Jan 30 '25 22:01 sinemakinci1

Thanks so much for the feedback!

cc @gauravsaini04 @Kaniska244

bamurtaugh avatar Jan 30 '25 22:01 bamurtaugh

Hi @gldraphael ,

As you would be knowing, the c++ devcontainer image is currently available with two different OS flavors, ubuntu & debian.

For ubuntu noble (24.04) the default available gcc version is 13.3.0. However gcc-14 package is indeed available for installation.

For debian bookworm (12) the default available gcc version is 12.2.0. Also gcc-13 onwards aren't natively available in debian 12 for installation.

Please note gcc-15 doesn’t appear to be supported in either ubuntu noble or debian bookworm for the moment.

I will check further on making gcc-14 available as part of ubuntu noble flavor of c++ devcontainer image & also check the possibility of allowing the user to choose gcc version in this image. I will keep you posted further on the progress. Please let me know in case of any further concern/ clarification on this topic.

With Regards, Kaniska

Kaniska244 avatar Jan 31 '25 14:01 Kaniska244

I understand that the GCC versions available are currently tightly coupled to the chosen OS's standard PPA repositories. However, the latest compiler could always be made available via other means such as installing by source.

Consider the .NET devcontainer for example, it's very convenient to be able to specify the .NET version I need to develop .NET apps. This is also true for other container that I have used so far eg. python, TypeScript, etc.

When I tried this devcontainer, I was more interested in experimenting with the latest C++ features supported by the latest g++ compiler. While it's easy to install a specific version of CMAKE using a script included in the template, there's currently no way to specify the version of GCC I'd like to use.

gldraphael avatar Jan 31 '25 16:01 gldraphael

Hello @gldraphael ,

Would you kindly have a look at this PR, if this fulfills your requirement raised as part of this issue. Please let me know in case of any concern with this.

With Regards, Kaniska

Kaniska244 avatar May 06 '25 07:05 Kaniska244