Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

downloading/installing g++

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
mzimmers
Posts: 86
Joined: 2016-12-11 23:49

downloading/installing g++

#1 Post by mzimmers »

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...

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: downloading/installing g++

#2 Post by debiman »

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?

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: downloading/installing g++

#3 Post by Segfault »

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

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: downloading/installing g++

#4 Post by mzimmers »

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?

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: downloading/installing g++

#5 Post by Segfault »

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.

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: downloading/installing g++

#6 Post by mzimmers »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: downloading/installing g++

#7 Post by debiman »

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:

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: downloading/installing g++

#8 Post by mzimmers »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: downloading/installing g++

#9 Post by stevepusser »

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.
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: downloading/installing g++

#10 Post by GarryRicketson »

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 ... f_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/debi ... ng.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.

mzimmers
Posts: 86
Joined: 2016-12-11 23:49

Re: downloading/installing g++

#11 Post by mzimmers »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: downloading/installing g++

#12 Post by stevepusser »

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.
MX Linux packager and developer

Post Reply