downloading/installing g++

New to Debian (Or Linux in general)? Ask your questions here!

downloading/installing g++

Postby mzimmers » 2017-03-14 23:40

Hi, all -

I want to download the newest stable version of g++, as the version I have (4.9.2) doesn't recognize a compiler flag that one of my tools uses.

I'm new to installing stuff on Linux systems. Originally I thought I'd use apt-get, but I don't see a new version available there. Is it generally expected that I download a tarball from the GNU site and install that way? Or, is there another, more preferred method?

Thanks...
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: downloading/installing g++

Postby debiman » 2017-03-15 08:03

i'll just assume that you're using debian stable/jessie, information that you failed to provide.

mzimmers wrote:I'm new to installing stuff on Linux systems. Originally I thought I'd use apt-get, but I don't see a new version available there. Is it generally expected that I download a tarball from the GNU site and install that way? Or, is there another, more preferred method?

there's a reason why jessie uses the version it uses.
i don't think it's possible to use another one.
why do you need a newer version?
what are you trying to achieve?
User avatar
debiman
 
Posts: 1086
Joined: 2013-03-12 07:18

Re: downloading/installing g++

Postby Segfault » 2017-03-15 09:03

as the version I have (4.9.2) doesn't recognize a compiler flag that one of my tools uses.

Just another reason not use a distro with ancient software.
https://wiki.debian.org/GCC6
Segfault
 
Posts: 416
Joined: 2005-09-24 12:24

Re: downloading/installing g++

Postby mzimmers » 2017-03-15 14:49

Debiman: thank you for the reply. You are correct about my using Jessie; sorry I omitted that.

I was considering an upgrade to the compiler because in my experience, it's usually good practice to keep up to date with software updates. I'd be interested in learning more about why this might not be feasible with Jessie.

Segfault: thank you as well for the reply. I do find it surprising that the included compiler is as old as it is. Perhaps, as Debiman indicated, there's a reason for that. May I ask what distro release you use?
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: downloading/installing g++

Postby Segfault » 2017-03-15 14:53

I've never ran Stable. I had some Debian servers in past and even those were Testing branch. Although I think Stable makes sense for a server. For a desktop Testing is most suitable, IMHO.
Segfault
 
Posts: 416
Joined: 2005-09-24 12:24

Re: downloading/installing g++

Postby mzimmers » 2017-03-15 15:03

I'm using this system purely for my educational purposes. I'm new to most aspects of Linux, and I'm trying to develop some rudimentary skills.

So, I guess I want "stretch" then? I've never done a major upgrade of a Linux OS before; is there an "easy " way to do it, since I already have Debian on this system, or do I just follow the directions for a new install?

Thank you.
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: downloading/installing g++

Postby debiman » 2017-03-15 17:16

i'll repeat my question:
why do you think you need a newer compiler.

===

newbie upgrading to testing? for educational purposes?
why not, i guess we'll be hearing more from you then. :wink:
User avatar
debiman
 
Posts: 1086
Joined: 2013-03-12 07:18

Re: downloading/installing g++

Postby mzimmers » 2017-03-15 17:29

As I mentioned above, I'm using a tool that is generating a compiler flag for -c++1z. And, I've found it good practice to stay current on software versions. If this really is a bad idea, though, I am willing to abandon it. I get the impression, though, that SegFault and you don't completely see eye to eye on the importance of this.
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: downloading/installing g++

Postby stevepusser » 2017-03-15 17:48

You could stick with stable for your desktop, and develop with the Stretch g++ in a virtual machine, chroot, or whatever that systemd container thingy is called. You can have your cake and eat it, too.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.6, Pale Moon 27.4.1, Liquorix kernel 4.11-9, mpv 0.26.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8519
Joined: 2009-10-06 05:53

Re: downloading/installing g++

Postby GarryRicketson » 2017-03-15 17:57

Edited, Steve posted while I was writing,..----
Installing Debian Strectch on a VM, and using that is probably the safest
and best approach,..and as he said , that way you have both.
-----------end edit----




downloading/installing g++

Postby mzimmers » 2017-03-14 17:40
Hi, all -

I want to download the newest stable version of g++, as the version I have (4.9.2) doesn't recognize a compiler flag that one of my tools uses

It might help to clarify on this more, I see it as the reason the OP thinks
they need a newer version of g++, but it is not clear on what tool is the
"one of my tools ", ......

Postby mzimmers » it's usually good practice to keep up to date with software updates. I'd be interested in learning more about why this might not be feasible with Jessie.


Yes it is good practice to keep packages updated, and current, but the OS also needs to be up to date, in order to run some of the "newest and shiniest" software, or packages,..
https://wiki.debian.org/DontBreakDebian#Don.27t_suffer_from_Shiny_New_Stuff_Syndrome

Postby mzimmers » So, I guess I want "stretch" then? I've never done a major upgrade of a Linux OS before; is there an "easy " way to do it, since I already have Debian on this system, -----snip-----

You are the only one that can know, or decide if you need to and should be using Debian testing (stretch), the way to do that is first improve
your rudimentary skills,
I'm trying to develop some rudimentary skills

Some of the most basic rudimentary skills include knowing how to do effective searches, , there is plenty of excellent documentation at https://debian.org , and the https://wiki.debian.org, this documentation
goes into the details on upgrading your Debian stable (jessie) to stretch,
if you decide that is what you want to do, after reading the other documentation on "What version of Debian is best for me".
So here is a quick example, to help you develop those "rudimentary" skills,..
Simply, copy/paste, or type the keywords into a search engine,
What version of Debian is best for me
The very first hit,.
https://www.debian.org/doc/manuals/debian-faq/ch-choosing.en.html
Example # 2:
---- is there an "easy " way to do it,

Yes,
How to upgrade Debian Jessie to stretch or testing
First hit:
https://wiki.debian.org/DebianTesting
It is basically pretty simple, but then again that would depend on ones "rudimentary" skills, or lack of .
Of course, for someone that finds it to difficult to do any searches, and read the documentation, the whole process would seem impossible, any way, with a little practice it gets easier, and the wonderful thing about reading documentation and manuals, the more one does that , it all starts
making more sense, and gets easier.
User avatar
GarryRicketson
 
Posts: 4118
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: downloading/installing g++

Postby mzimmers » 2017-03-15 23:23

Thank you, Steve and Garry. Steve: I may go that route in the future; right now I'd like to keep things simple. But I appreciate the suggestion.

I did a little more reading, and I now realize that changing gcc on Debian (perhaps on other Linuxes as well) is a much more far-reaching effort than I thought. At this point, the more prudent approach seems to be to leave it alone, and figure out why some Qt projects are trying to introduce that compiler flag in the first place.

Thanks to everyone for the input...it was educational.
mzimmers
 
Posts: 80
Joined: 2016-12-11 23:49

Re: downloading/installing g++

Postby stevepusser » 2017-03-16 00:01

I'd guess that you're using one of the following features in your code, and whatever IDE you're using is automatically adding the flag. https://gcc.gnu.org/projects/cxx-status.html#cxx1z

If not, you can always try a build and force use of an older standard supported by 4.9 to see how much smoke pours out.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.0.6, Pale Moon 27.4.1, Liquorix kernel 4.11-9, mpv 0.26.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8519
Joined: 2009-10-06 05:53


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable