Can anyone here confirm if the default installed OpenSuSE LEAP 42.2 c++ compiler (from GCC v4.8.5) is compliant with C++ 2014? The reason I ask is because when I tried to use -std=c++14 to compile a simple test program, it spits out the an error message as shown below. However, no error message if using -std=c++1y. According to GNU GCC online docs the c++1y is deprecated.
[habibie@linux-rf8f:/home/local/PEOPLE/habibie/works/C++/copystrings/build 389%] ~ c++ -std=c++14 -c ../copyStrings.cpp
c++: error: unrecognized command line option ‘-std=c++14’
[habibie@linux-rf8f:/home/local/PEOPLE/habibie/works/C++/copystrings/build 390%] ~ c++ -std=c++1y -c ../copyStrings.cpp
[habibie@linux-rf8f:/home/local/PEOPLE/habibie/works/C++/copystrings/build 391%] ~
The online docs refer to the latest version where this is true (such as the one included with Tumbleweed), however for 42.2’s GCC 4.8.5 the man page states;
c++1y
The next revision of the ISO C++ standard, tentatively planned for 2017. Support is highly experimental, and will almost certainly change in incompatible ways in future releases.
On 2017-08-19, habibie <habibie@no-mx.forums.microfocus.com> wrote:
> Can anyone here confirm if the default installed OpenSuSE LEAP 42.2 c++
> compiler (from GCC v4.8.5) is compliant with C++ 2014?
No, gcc 4.8.X is not C++14 compliant. It slightly depends what you mean by `compliant’, but for the most part it isn’t.
If you look at the second table in http://en.cppreference.com/w/cpp/compiler_support you can see that C++14 support is
only really provided from gcc 5.0 onwards. I recommend any serious programmer to upgrade to at least gcc 5.x, and am
dismayed that Leap 42.3 persists with gcc 4.8.5 as the default.
I recommend any serious programmer to upgrade to at least gcc 5.x, and …
OK. I noticed from software manager, OpenSuSE Leap v42.2 has both gcc5 and gcc6. So, I went ahead to install gcc6. Upon finishing the installation, my display went blank. I rebooted my computer and it booted all the way to a blank screen. So, I press Ctrl+Alt+F1 keys to switch to boot console and noticed the boot process last three lines as shown below. It looks like gcc6 update broke and/or incompatible the installed nVidia driver used by my graphics card? Anyway, I reinstalled all related nVidia drivers and ended up with the same blank screen.
.
:
OK ] reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes.
OK ] Started Update UTMP about System Runlevel Changes.
… am dismayed that Leap 42.3 persists with gcc 4.8.5 as the default.
Indeed. That said, does anyone here know of any Linux distros that supports the latest gcc, i.e. v7.x, etc.?
[QUOTE]
On Thu 24 Aug 2017 05:06:01 PM CDT, habibie wrote:
flymail;2835047 Wrote:
> On 2017-08-19, habibie <habibie@no-mx.forums.microfocus.com> wrote:
> > Can anyone here confirm if the default installed OpenSuSE LEAP
> > 42.2
> c++
> > compiler (from GCC v4.8.5) is compliant with C++ 2014?
>
> No, gcc 4.8.X is not C++14 compliant.That is understood.
> I recommend any serious programmer to upgrade to at least gcc 5.x, and
> …OK. I noticed from software manager, OpenSuSE Leap v42.2 has both
> gcc5
and gcc6. So, I went ahead to install gcc6. Upon finishing the
installation, my display went blank. I rebooted my computer and it
booted all the way to a blank screen. So, I press Ctrl+Alt+F1 keys to
switch to boot console and noticed the boot process last three lines as
shown below. It looks like gcc6 update broke and/or incompatible the
installed nVidia driver used by my graphics card? Anyway, I reinstalled
all related nVidia drivers and ended up with the same blank screen.
Habibie - please don’t concatenate your statements at the end of my quotes because it’s confusing and suggests I’ve said
something which I haven’t. e.g.
The first sentence is mine. The second is yours. Or…
On 2017-08-24, habibie <habibie@no-mx.forums.microfocus.com> wrote:
>> … am dismayed that Leap 42.3 persists with gcc 4.8.5 as the default.Indeed. That said,
>> does anyone here know of any Linux distros that supports the latest gcc, i.e. v7.x, etc.?
The first sentence is mine, the rest are yours. As you can see, confusing.
In answer to your question, both Leap 42.2 and Leap 42.3 do support gcc-5, gcc-6, and gcc-7 but default (sadly) to
gcc-4.8.X. Therefore you can install the more recent versions of gcc using Zypper and YaST, but must be invoked
specifically e.g.
sh-4.2$ gcc-5 -c code.cc
This of course is a complete pain for coders and is a reason why I have to contruct a (very slightly) different makefile
for Leap in contrast to sensible GNU/Linux distributions that default to gcc5.X. I believe Tumbleweed has made the
transition to gcc5 but not without troubles…
I am not sure I understood what you said above. But, I can see why by looking at the above quote where both yours and mine are combined into one single line sans a space. The fact is my previous post (I wished I could attach a screen capture to show you as seen on a Chromium web browser) shows both sentences are not in the same line and as a matter of fact they have been properly quoted to give some proper credits.
Regardless, now my computer still has no GUI desktop, except a nice blank screen with an underscore cursor blinking @top-right corner. I wish anyone here has a solution to help me fixing this issue.
On Fri 25 Aug 2017 12:46:01 PM CDT, habibie wrote:
<snip>
Regardless, now my computer still has no GUI desktop, except a nice
blank screen with an underscore cursor blinking @top-right corner. I
wish anyone here has a solution to help me fixing this issue.
Hi
Press ctrl+alt+F1 to get to a VT, login as root user and clean
up/re-install your nvidia driver?
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.79-18.26-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
In opensuse.org.help.programming-scripting, you wrote:
> flymail;2835496 Wrote:
> The first sentence is mine. The second is yours. Or…I am not sure I
> understood what you said above. But, I can see why by
> looking at the above quote where both yours and mine are combined into
> one single line sans a space. The fact is my previous post (I wished I
> could attach a screen capture to show you as seen on a Chromium web
> browser) shows both sentences are not in the same line and as a matter
> of fact they have been properly quoted to give some proper credits.
Sorry. It’s very difficult for me to comment since I’m looking at these forum posts through the NNTP interface using a
console program (slrn) not through an html webpage. There is probably an issue with the HTML quote conversion to NNTP.
> Regardless, now my computer still has no GUI desktop, except a nice
> blank screen with an underscore cursor blinking @top-right corner. I
> wish anyone here has a solution to help me fixing this issue.
Sorry to hear you have this problem. I’m not sure how just installing gcc6 (without changing links) should cause you
boot issues. If there is no graphical login then there are two possibilties: a the choice of the default systemd target
or configuration of the X Window System (+ GPU driver). You probably best post a new thread to the Install/Boot/Login
subforum because here you are in the Developer Programming subforum (and my knowledge of systemd is little more than
0%). Can you boot to a desktop in recovery mode?
On 2017-08-25, Miuku <Miuku@no-mx.forums.microfocus.com> wrote:
>
> flymail;2835496 Wrote:
>> I believe Tumbleweed has made the transition to gcc5 but not without
>> troubles…
> Tumbleweed defaults to gcc7, not 5.
Thanks Miuku for the correction. I didn’t realise TW was that bleeding edge!
Graphics modules are a special case…
They often compile on the fly on every boot.
To the @OP,
I wrote an article how to create update-alternatives supporting gcc,
So for instance you can switch your entire system to any version of GCC for any special work, and then switch back to the system default when you’re done… Allowing various GCC to be installed side by side and your having control over what the system uses.