Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: gnome installation problem: unreslved references in the gst libraries
Date: Tue, 09 Oct 2007 10:17:31
Message-Id: pan.2007.10.09.10.05.42@cox.net
In Reply to: [gentoo-amd64] gnome installation problem: unreslved references in the gst libraries by Nadav Horesh
1 "Nadav Horesh" <nadavh@×××××××××××.com> posted
2 710F2847B0018641891D9A21602763600B6DEB@×××××××××××××××.il, excerpted
3 below, on Tue, 09 Oct 2007 08:55:16 +0200:
4
5 > I have an ongoing problem with gnome installation started somewhere in
6 > one of the gnome-2.14.x upgrades, and it became worse on every upgrade
7 > till it prevented the upgrade to the recent gnome version (with a
8 > serious side effect of preventing upgrade to python 2.5.1).
9 >
10 > The problem is that in some stage of the build it stops because of an
11 > unresolved reference to some routine in the gstreamer&friends
12 > libraries. It is not a problem of a specific function/library because:
13 >
14 > 1. At different versions of gnome I got different unresolved link.
15 > 2. At the last upgrade, I added a (gstxxx) library that contained the
16 > missing link, what led to error of another missing link in a gstxxx
17 > library.
18 >
19 > I tried "revdep-rebuild" at several stages but it did not help. My
20 > questions are:
21 >
22 > 1. Is there something wrong in my configuration files that might couse
23 > the problem?
24 > 2. Is there a way to rebuild the whole gnome package from scratch?
25
26 > CFLAGS="-march=k8 -O2 -pipe -frename-registers -fweb -freorder-blocks
27 > -funit-at-a-time -ftree-pre -fgcse-sm -fgcse-las -fgcse-after-reload
28 > -fmerge-all-constants -mfpmath=sse -msse3 -m3dnow -ftree-vectorize
29 > -falign-functions=64 -fomit-frame-pointer"
30
31 > CXXFLAGS="-march=k8 -Os -pipe -frename-registers -fweb -freorder-blocks
32 > -funit-at-a-time -ftree-pre -fgcse-sm -fgcse-las -fgcse-after-reload
33 > -fmerge-all-constants -combine -mfpmath=sse -msse3 -ftree-vectorize"
34
35 > MAKEOPTS="-j2"
36
37 > USE=[snip] gstreamer [snip]
38
39 Revdep-rebuild can help so trying it was a good idea, but doesn't always
40 help if there's something else wrong.
41
42 FWIW, personally, as an admitted control freak when it comes to the
43 desktop I choose to run, I prefer KDE's exposure of options, and despise
44 GNOME's lack of them, so you won't find GNOME on my system and I'm not
45 familiar with it, so there's little I can help if the problem turns out
46 to be GNOME specific. However, it's quite possible the problem is
47 generic enough that the following general hints and techniques may be of
48 help.
49
50 CFLAGS/CXXFLAGS: Some (but not all) of those C(XX)FLAGS look pretty
51 close to mine. There's nothing wrong with running a big string like
52 that, as long as you understand it may cause problems with some ebuilds,
53 and are willing to try recompiling with something simpler if you do run
54 into issues.
55
56 In particular -combine doesn't work well at all with CXXFLAGS, and still
57 occasionally (altho much less frequently) causes issues with CFLAGS as
58 well. As I mentioned, some of your flags look like mine, and you may
59 have taken that flag from a discussion here some months ago. Only
60 however it happened, it appears you have -combine in your CXXFLAGS
61 instead of your CFLAGS. I'd reverse that.
62
63 The problem I've run into is that while -combine is in theory safe for
64 both CFLAGS and CXXFLAGS, because gcc knows when it can't be used (with
65 exceptions for one thing, and they are pretty common in C++/CXX code,
66 thus it's generally not worth even trying there), when gcc removes it, it
67 spits a warning about it. Some of the configure scripts are setup to
68 interpret any warning as an error, and thus decide that whatever they
69 were testing for with that test-compile doesn't work on the system in
70 question. At least in some cases, that causes them to turn OFF something
71 that turns out to be needed later on, thus causing the problem to show up
72 NOT by stopping the configure, but later in the process, during the
73 compile or linking steps.
74
75 So... try removing -combine from your CXXFLAGS (where as I said gcc
76 normally turns it off anyway), and if you want to continue to use it (I
77 use it), put it in CFLAGS instead.
78
79 However, the bigger picture message is that sometimes, you may need to
80 try compiling without some of the stuff in your C(XX)FLAGS. You can try
81 one of two things. If you just want to get it to work, or want to see if
82 it's ANYTHING in the C(XX)FLAGS, try setting something really simple,
83 like "-march=k8 -O2 -pipe". If that works, you can try adding a few
84 flags at a time back in and recompiling, until you figure out what's
85 breaking things. Alternatively, if you have some idea what's breaking
86 it, you can try just removing that. If you are wrong and it's the C(XX)
87 FLAGS but a different one, you won't as quickly pin it down the ANY of
88 the C(XX)FLAGS, but if you are right, you'll have eliminated the problem C
89 (XX)FLAG without eliminating any other optimization, and without having
90 to either settle for the generic settings or go thru several tries to get
91 it. So basically, it depends on how sure you are that you know which
92 CFLAG is the issue, before you try again. If you are quite sure, just
93 removing it should be the most efficient way to success. If you aren't
94 even really sure it's the CFLAGS, and are just trying things, you may
95 want to just try the simple thing first, to quickly find out whether it's
96 a CFLAG problem at all.
97
98 FWIW, -ftree-vectorize is another possible problem CFLAG. The others
99 only seem to cause problems rarely, tho I do remove them when I'm trying
100 for the "simple" CFLAGS option, just to see if the problem is my CFLAGS
101 or not.
102
103 I also note with interest that you have CXXFLAGS set to -Os, while CFLAGS
104 is set to -O2, plus that specific -falign-functions=64. I just find it
105 strange that someone would have them set differently, is all, tho I /can/
106 see why someone might choose to do so, given that CXX programs are
107 sometimes bigger programs, and I don't believe it's common to set any of
108 the -falign-X flags, at least in global/system scope context (tho for
109 individual packages may be useful).
110
111 One more thing with C(XX)FLAGS. Not that this will fix your current
112 problem, but it's useful info... on amd64, the frame pointer isn't needed
113 for debugging, so gcc automatically turns it off at -O1 (-O) and above.
114 The gcc manpage does mention this under the notes for -O1, but says it
115 only applies to some archs, and doesn't say which ones. Apparently,
116 amd64/x86_64 is one such arch where it can and does turn it off, while
117 x86 (32-bit) is not. Thus, the flag makes sense for x86 but not as much
118 for amd64, and that one's pretty much just cluttering up your C(XX)FLAGS
119 lines. I know I had it in my flags too, until someone pointed this out
120 to me, and I ultimately removed it.
121
122 The same applies to -funit-at-a-time, tho the status here is newer. Unit-
123 at-a-time was introduced with gcc-3.3 IIRC, where it was most definitely
124 NOT default except for -Os, as it still caused a lot of problems. That
125 in fact was the reason -Os was recommended against back at that time --
126 the unit-at-a-time it enabled just didn't work with a lot of apps back
127 then. Since then, however, the flag has gradually been promoted, until
128 now (gcc 4.2), it's the default with -O1 (IIRC it was the -O2 default
129 with 4.1, and maybe with 4.0). At present, there's still a way to
130 disable it, but the manpage specifically warns that the disabling flag is
131 likely to disappear after a time, so don't use it unless absolutely
132 necessary, and then, plan on fixing the problem before too many more gcc
133 upgrades. So therefore... unless you routinely compile stuff with gcc
134 3.x still, and want -funit-at-a-time for that, it's probably pretty safe
135 to eliminate that from your C(XX)FLAGS as well. Both your C/CXXFLAGS and
136 mine are long enough as it is; no reason to have them any longer than
137 necessary! =8^)
138
139 Moving on... MAKEOPTS=-j2. While that's recommended and thus relatively
140 common, occasionally individual packages will have problems with it. I
141 actually run -j (no number, thus unlimited jobs) by default, so I
142 probably see issues more often than most, since with that setting it'll
143 try to massively parallelize things if it can, thus being much more apt
144 to actually find any problems that exist. The usual problem here is that
145 an emerge will die when it can't find a file that is created by the same
146 package... only the dependency tree isn't quite complete and under
147 certain circumstances it'll try to create the later file depending on the
148 former, before the former file is itself created! A prime example, fixed
149 quickly once I found and reported the bug, is
150
151 http://bugs.gentoo.org/show_bug.cgi?id=194720
152
153 If you suspect that might be the issue, you can test with MAKEOPTS=-j1
154 and see. If that fixes it, please file a bug, as I did with the one
155 above.
156
157 OK, now USE flags. I'm not familiar enough with GNOME to know if
158 gstreamer is a hard dependency or not, but since it's gstreamer causing
159 the problem, if gstreamer isn't a hard dependency, USE=-gstreamer might
160 be enough to avoid the problem.
161
162 Talking about USE flags... You mention running revdep-rebuild but if you
163 mentioned the -N parameter to emerge, I missed it. -N (--newuse) causes
164 portage to remerge anything where your (or the package's) USE flags have
165 changed since you last merged it. Any time you are having issues such as
166 this, it's a good idea to try running that. As with the -D (--deep)
167 parameter, I prefer to use it routinely, every time I --update world. So
168 I have a little emerge -NuD world script that I run, and don't have to
169 worry about it. Be warned, however; if you've not run an emerge -N world
170 in awhile, you may have quite a list of packages to remerge the first
171 time you try it.
172
173 Perhaps that'll help with the current problem, perhaps not, but at least
174 some of it should be useful in any case. =8^)
175
176 --
177 Duncan - List replies preferred. No HTML msgs.
178 "Every nonfree program has a lord, a master --
179 and if you use the program, he is your master." Richard Stallman
180
181 --
182 gentoo-amd64@g.o mailing list