Update GCC 4.8 to 4.9?

I installed openSUSE 13.2 and was surprised to find that it ships with a more dated c++ toolchain (not sure if its an issue with the compiler, or the standard library) than distributions that I was using previously (so certain features I relied on, and have been using for awhile, are missing).

Trying to find a solution, I noticed that the repo’s also contain gcc 4.9, however when I try to install it, it wants to uninstall quite a few other packages. I let it the first time, and halfway through, the whole OS crashed, and would not boot again. This was a clean install of 13.2, fully updated, and rebooted for good measure.

So I thought, I would try Tumbleweed, in hopes that its default toolchain had been updated already, or at least a solution to the dependency issues I had while installing 4.9 on 13.2. Unfortunately it wants to remove the same packages. Rather than cross my fingers and hope it doesnt blow up again, I thought I would ask if anyone knows how to correctly update the toolchain.

I can’t answer your question wrt how to update from GCC 4.8 to 4.9. Supposedly this was to be a feature of openSUSE-13.2 ( https://en.opensuse.org/Portal:13.2 ) , but I don’t know of a guide that explains how. I do recall ‘many’ years back when I once attempted a GCC update (around year 2003 or 2004) I encountered behaviour similar to what you encountered. Once bitten is twice shy, and I never tried such again. So my view even today is that a GCC update is not trivial.

wrt why v.4.8 (and not v.4.9) when openSUSE-13.2 was going through most of its development and testing, my understanding is there were concerns wrt the stability of 4.9 (note this was > 14 months ago). Hence the decision was taken thenn to go for known stability, and provide 4.9 only as an option.

Having typed the above, I also note the plan for the next version after 13.2 is to go to GCC-5.0, although there are still some problems there, as noted here in this openSUSE news from less than a week ago: https://news.opensuse.org/2015/03/05/kernel-3-19-snapshot-systemd/

zypper in gcc49 on a vanilla installation?

How about:


zypper ar -f http://download.opensuse.org/repositories/devel:/gcc/openSUSE_13.2/devel:gcc.repo
zypper dup --from devel_gcc

This, naturally, at your own risk - as changing something as radical as gcc can have unforeseen consequences.

Edit:
And it’s a development repo so that’s double trouble. Be warned.

From a message in the factory mailing list:

A bit further down the horizon are topics like GCC5 (still a lot of work happening, to ensure the full distribution builds) and …

They are working on gcc5. They won’t release it until the whole distribution can be built with gcc5. I guess they are skipping 4.9.

That is a very salient mailing list thread . In particular note this message about the difficulty wrt 4.9 : http://lists.opensuse.org/opensuse-factory/2015-03/msg00124.html

.

There are more updates on the GCC 5.0 status here: http://lists.opensuse.org/opensuse-packaging/2015-03/msg00034.html

The project to get packages to build with GCC 5 which we should try to transition to has progressed but is not yet finished.

Welcome - openSUSE Build Service

currently shows 13 package build fails and 59 packages not built due to failed requirements.

Of the packages that fail building some of them have patches from me either in SR state or just in the devel projects which have not been pushed to Factory.

Currently unfixed packages include (at least)

coreutils
mariadb
pinentry
post-build-checks
python3-base
reiserfs
shim
yast2-core
libzypp
memtest86+
xen

both libzypp and yast2-core are responsible for nearly all 59 packages in unresolved state (there is xen that also causes some unresolvables)

I especially ask maintainers of packages that have got a fix from me for their package but didn’t yet push that fix to Factory to do that.

And I am asking the yast/zypp people to look at their packages.

As openSUSE:Factory:Staging:Gcc49 only builds the set of packages to build the Minimal+X media the whole list of packages failing with GCC 5 will be larger - you are encouraged to add a repository building against openSUSE:Factory:Staging:Gcc49 to your devel project if it covers sth that can be built against Minimal+X (KDE & GNOME stack?)

Thanks,
Richard.