Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Gcc compiling, is this normal?
Date: Sun, 12 May 2013 21:28:19
Message-Id: 51900954.9050002@gmail.com
In Reply to: [gentoo-user] Gcc compiling, is this normal? by Dale
1 On 12/05/2013 23:16, Dale wrote:
2 > Howdy,
3 >
4 > I been noticing something weird when I upgrade gcc. Is this normal?
5 >
6 > root@fireball / # genlop -c
7 >
8 > Currently merging 2 out of 5
9 >
10 > * sys-devel/gcc-4.4.7
11 >
12 > current merge time: 6 seconds.
13 > ETA: 24 minutes and 27 seconds.
14 >
15 > Currently merging 3 out of 5
16 >
17 > * net-misc/curl-7.30.0
18 >
19 > current merge time: 7 seconds.
20 > ETA: 18 minutes and 50 seconds.
21 >
22 > Currently merging 2 out of 5
23 >
24 > * sys-devel/gcc-4.4.7
25 >
26 > current merge time: 7 seconds.
27 > ETA: 21 minutes and 14 seconds.
28 > root@fireball / #
29 >
30 >
31 > I'm not worried about curl. It just happened to be there. This is the
32 > list of packages it is supposed to update:
33 >
34 > root@fireball / # emerge -uvaDN world
35 >
36 > These are the packages that would be merged, in order:
37 >
38 > Calculating dependencies... done!
39 > [ebuild R ] sys-devel/gcc-4.5.4:4.5 USE="gtk mudflap (multilib)
40 > nls nptl openmp (-altivec) -cxx -doc (-fixed-point) -fortran -gcj
41 > (-hardened) (-libssp) -lto -multislot -nopie -nossp -objc -objc++
42 > -objc-gc {-test} -vanilla (-graphite%)" 0 kB
43 > [ebuild R ] sys-devel/gcc-4.4.7:4.4 USE="gtk mudflap (multilib)
44 > nls nptl openmp (-altivec) -cxx -doc (-fixed-point) -fortran -gcj
45 > (-hardened) (-libssp) -multislot -nopie -nossp -objc -objc++ -objc-gc
46 > {-test} -vanilla (-graphite%)" 0 kB
47 > [ebuild U ] net-misc/curl-7.30.0 [7.29.0-r1] USE="ipv6 ssl threads
48 > -adns -idn -kerberos -ldap -metalink -rtmp -ssh -static-libs {-test}"
49 > CURL_SSL="openssl -axtls -cyassl -gnutls -nss -polarssl" 0 kB
50 > [ebuild U ] app-misc/tmux-1.8 [1.6] USE="-vim-syntax" 0 kB
51 > [ebuild U ~] kde-base/kdelibs-4.10.3-r2:4 [4.10.3:4] USE="3dnow alsa
52 > bzip2 fam handbook jpeg2k lzma mmx nls opengl (policykit)
53 > semantic-desktop spell sse sse2 ssl udev udisks upower zeroconf -acl
54 > (-altivec) (-aqua) -debug -doc -kerberos -openexr {-test}" 0 kB
55 >
56 > Total: 5 packages (3 upgrades, 2 reinstalls), Size of downloads: 0 kB
57 >
58 > Would you like to merge these packages? [Yes/No] y
59 >
60 > I noticed this one or twice before. It is compiling the same compiler
61 > version twice when it should be upgrading/recompiling two *different*
62 > versions. I read before that gcc compiles three times or something but
63 > the thing is, it can compile for HOURS and never finish. Usually I stop
64 > it and restart emerge and it compiles as it should, one for each version
65 > and finishes as it should time wise. I once started the upgrade and
66 > went to take a nap. I woke up around 5 or 6 hours later to find gcc
67 > compiling twice on the same version. Even libreoffice only takes a hour
68 > or so.
69 >
70 > Anyone else see this before? Now to go stop this one and get it to
71 > update right and not take all week.
72
73 What have you got in world for gcc?
74 What's in make.conf?
75
76 gcc's build system does cause gcc tro be built three times[1], but
77 that's internal to gcc and has nothing to do with portage. There should
78 still only be one emerge for a SLOT. If it's doing the same package
79 twice, then the files in /var/tmp/portage are liable to get continually
80 clobbered and who knows what will happen.
81
82
83 [1] The logic goes something like this: it's a compiler, so the code it
84 produces must be consistently identical for identical inputs. So, the
85 current compiler builds gcc, giving version Y built by version X. That
86 instance of gcc in turn builds a gcc, giving version Y built by version Y.
87
88 Now you should have two copies of the same version of gcc, and they
89 should be identical, plus the output code must also be identical. The
90 gcc builds system checks for this by actually doing compiles and
91 comparing the results. I've gotten a bit hazy on what specific bits
92 actually do what, but that's the general concept. But all this
93 rebuilding is internal and you only see it if you examine the console
94 output scrolling by, it will never show up in any portage tools.
95
96 --
97 Alan McKinnon
98 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Gcc compiling, is this normal? David Relson <relson@×××××××××××××.com>
Re: [gentoo-user] Gcc compiling, is this normal? Dale <rdalek1967@×××××.com>