Gentoo Archives: gentoo-user

From: Paul Colquhoun <paulcol@×××××××××××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Gcc 5.3
Date: Wed, 30 Dec 2015 22:34:51
Message-Id: 13319502.2dI8TEsWB0@bluering
In Reply to: Re: [gentoo-user] Re: Gcc 5.3 by lee
1 On Wed, 30 Dec 2015 17:32:44 lee wrote:
2 > Neil Bothwick <neil@××××××××××.uk> writes:
3 > > On Tue, 29 Dec 2015 19:21:01 +0100, lee wrote:
4 > >> > As 4.9.3 is marked stable, I guess that's what'd you get per
5 > >> > default.
6 > >>
7 > >> 4.8.5
8 > >>
9 > >> I'd have to run emerge --sync to know about more recent versions. How
10 > >> is that supposed to be used, btw? I only run that when I do want to
11 > >> update everything. Now if I didn't want to update anything but gcc,
12 > >> could I run emerge --sync and install gcc 5.x without having trouble
13 > >
14 > > Emerge --sync only updates the portage tree, so
15 > >
16 > > emerge --sync
17 > > emerge -a sys-devel/gcc:5
18 > >
19 > >> with anything else I might install before actually updating everything?
20 > >> So if I'd never explicitly update everything but run emerge --sync
21 > >> frequently, things would be updated over time, occasionally?
22 > >
23 > > No, nothing would get updated. To do that you need to run emerge @world
24 > > after emerge --sync.
25 >
26 > Well, yes, but what if want to install a package that hasn't been
27 > installed yet, or re-emerge an installed package with different USE
28 > flags, after updating the portage tree? Will a more recent version be
29 > installed than would have been installed before the tree was updated,
30 > maybe updating other packages to more recent versions because they are
31 > needed for the new package?
32
33
34 You have a couple of options.
35
36 First, start with "emerge -p whatever" and see what update would happen with
37 no adjustments.
38
39 Then try again, but specify the version you want and see if that works:
40 "emerge -p =whatever-1.2.3"
41
42 If it is still trying to install updated versions of libraries or other
43 dependencies, make a file like /etc/portage/package.mask/whatever and block
44 anything higher than the library/dependency versions you already have.
45
46 A bit more work, but probably not much.
47
48 However, if you get too far behind, the versions you want may have been
49 removed from the portage tree. This is still not a deal breaker. Old ebuilds
50 are available from the Gentoo attic at https://sources.gentoo.org/cgi-bin/viewvc.cgi and can be installed in a local overlay. (I put mine in
51 /usr/local/portage). Just put "PORTDIR_OVERLAY=/usr/local/portage" into
52 /etc/portage/make/conf and you should be set.
53
54 You could also use the local overlay to just add the updated ebuilds for
55 things you do want to upgrade (and required dependency upgrades, etc) but I
56 think that would quickly become very unwieldy.
57
58
59
60 > Other distributions usually (want to) update a lot of packages once you
61 > update the information about available packages.
62 >
63 > >> > Stuff compiled with older gcc's should run with newer libgcc*[0], but
64 > >> > stuff compililed with a newer gcc might not run with the older
65 > >> > libgcc*. Same goes, with more problems IIRC, for libstdc++.
66 > >> > So beware of that. Apart from that? I'm not aware of problems.
67 > >>
68 > >> Uhm ... So I might break the system by switching between compiler
69 > >> versions?
70 > >
71 > > That's highly unlikely as software that has been compiled with the old
72 > > compiler will still work.
73 >
74 > And if not?
75 >
76 > Just yesterday I tried to update a Fedora install and it failed so that
77 > the machine is now unusable because it only keeps rebooting. I expected
78 > it to fail, just not that badly ... If I could find my USB stick, I'd
79 > be putting Gentoo on it now.
80 >
81 > > You may find that some programs fail to
82 > > recompile with the new compiler, but I didn't experience that with the
83 > > 4.9>5 step, although I had some that would build with 4.8 but not 4.9.
84 > >
85 > > I have an application which I would like to compile with gcc
86 > >
87 > >> 5.x just to see if that's even possible. I could switch, try it, and
88 > >> then switch back.
89 > >
90 > > Exactly, run gcc-config, compile/emerge the program, run gcc-config again.
91 >
92 > And what about ccache? Will it use the new version automatically and
93 > detect that the compiler version has changed so that files in the cache
94 > need to be recompiled?
95
96 --
97 Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/
98 Asking for technical help in newsgroups? Read this first:
99 http://catb.org/~esr/faqs/smart-questions.html#intro

Replies

Subject Author
Re: [gentoo-user] Re: Gcc 5.3 lee <lee@××××××××.de>