Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: A different Openoffice Build problem
Date: Sat, 28 Oct 2006 20:27:53
Message-Id: ei0eac$sl0$3@sea.gmane.org
In Reply to: Re: [gentoo-amd64] Re: A different Openoffice Build problem by felix@crowfix.com
1 felix@×××××××.com posted 20061028062217.GA10209@×××××××.com, excerpted
2 below, on Fri, 27 Oct 2006 23:22:17 -0700:
3
4 > The second run [of fix_libtool_files.sh] drops the v's inside the [],
5 > and the first four FIXING lines with .../32/... disappear. A third
6 > rundupped the second run. Seems suspicious to me that it would repeat
7 > the FIXING lines.
8
9 > I am not sure what you mean by "ensure they have the path" -- how would
10 > I determine what path they have?
11
12 Answering both of those at once... Take as an example a particular *.la
13 file with a gcc dependence I have merged here, /usr/lib64/libkbear.la
14 (part of the kbear package, kbear is a KDE based graphical FTP tool).
15
16 There are several entries in this file, but one we are interested in:
17
18 # Libraries that this one depends upon.
19 dependency_libs='-R/usr/kde/3.5/lib64 -R/usr/qt/3/lib64 -R/usr/lib64
20 -lstdc++ -L/usr/lib64 -L/usr/qt/3/lib64 -L/usr/kde/3.5/lib64
21 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1
22 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/lib
23 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../lib64 -L/lib/../lib64
24 -L/usr/lib/../lib64 -L/usr/x86_64-pc-linux-gnu/bin
25 -L/usr/x86_64-pc-linux-gnu/lib /usr/kde/3.5/lib64/libkparts.la
26 -L/usr/X11R6/lib64 /usr/kde/3.5/lib64/libkio.la
27 /usr/kde/3.5/lib64/libkdesu.la /usr/kde/3.5/lib64/libkwalletclient.la
28 /usr/lib64/libfam.la /usr/kde/3.5/lib64/libkdeui.la
29 /usr/kde/3.5/lib64/libkdecore.la /usr/kde/3.5/lib64/libDCOP.la -lresolv
30 -lutil /usr/lib64/libart_lgpl_2.la /usr/lib64/libidn.la
31 /usr/kde/3.5/lib64/libkdefx.la /usr/qt/3/lib64/libqt-mt.la -lmng -ljpeg
32 -lXi -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig
33 -lXext -lX11 -lSM -lICE /usr/lib64/libmng.la /usr/lib64/liblcms.la
34 /usr/lib64/libjpeg.la /usr/lib64/libXi.la /usr/lib64/libXrandr.la
35 /usr/lib64/libXcursor.la /usr/lib64/libXfixes.la /usr/lib64/libXinerama.la
36 /usr/lib64/libXft.la /usr/lib64/libfontconfig.la /usr/lib64/libfreetype.la
37 /usr/lib64/libexpat.la -lpng -lz /usr/lib64/libXext.la /usr/lib64/libSM.la
38 /usr/lib64/libICE.la -lpthread /usr/lib64/libXrender.la
39 /usr/lib64/libX11.la /usr/lib64/libXau.la /usr/lib64/libXdmcp.la -ldl
40 -lstdc++ -lc -lgcc_s'
41
42 As you can see, gcc/x86_64-pc-linux-gnu/4.1.1 is listed several times in
43 the file. It doesn't list 3.4.6 at all, but that's because kbear was
44 compiled against 4.1.1. If it had been compiled against 3.4.6, it would
45 list it, and perhaps not 4.1.1. What the fix_libtool_files.sh script does
46 is simply check if the version of gcc you gave it on the command line
47 matches anything in that list. If it does, it says "fixing" and adds the
48 equivalent entry for the current gcc, if it's not already there.
49
50 Thus, after the first round of fixes, both paths should be already there,
51 but additional rounds will still say "fixing" as all it has done at that
52 point is found an entry that matched what you fed it on the command line
53 -- it doesn't yet know whether it actually has to add the new version or
54 if it has already been added.
55
56 I think the [v] thing is a fairly new addition to the script. I'm not
57 sure (I could go look but I don't want to parse thru all that scripting
58 to verify), but I'd guess the v's indicate an actual fix. Thus, you can see
59 some of those had two places to fix the first time thru, others had one,
60 some had none (they already had both the old and new paths). On the
61 second and subsequent runs, they all had the fixes already, so no v's,
62 even tho there were still matches triggering the "fixing" messages.
63
64 So that's the explanation. What you'd do to "ensure they have the path"
65 manually would be to open the *.la files the build complains about, and
66 verify that they point to the correct gcc as well as the old one.
67
68 In some cases simply removing (rename for testing first) the *.la files in
69 question works as well or better, forcing the linker to work a bit harder
70 to find what the *.la file was supposed to be a shortcut to finding, only
71 the shortcut unfortunately turns into a "longcut" at times! In theory,
72 the deletion /should/ work, but we all know theory doesn't always match
73 reality, thus it's best to try a rename first, just to be safe.
74
75 BTW, I know perhaps more about this than most as I ran the
76 masked-for-testing gcc 4.0 and early 4.1 series, including weekly gcc
77 alphas (now the gcc-4.2 alphas, but I'm no longer running them) for
78 awhile. When your gcc version is changing weekly, you run
79 fix_libtool_files a LOT! <g> Back then at least, the script would
80 occasionally miss something, and I'd have to go in and add the correct
81 location by hand, or try renaming/deleting the *.la file entirely.
82
83 ...
84
85 Anyway, you said running the script didn't help, and then tried renaming
86 the old gcc dirs, and found it breaking earlier. I could have predicted
87 that wouldn't work, as if it's not finding 4.1.1, just renaming the old
88 ones isn't likely to help. However, you are on the right track for what
89 I'd suggest next. You just didn't take it as far as you needed to to get
90 it to work.
91
92 To do it properly, if you haven't been running FEATURES=buildpkg and thus
93 already have the packages available, use quickpkg to package up your
94 gcc-3.4.6 version (and 3.4.2 while you are at it), so you can remerge them
95 quickly without recompiling, then unmerge them. (Note that in some
96 circumstances, unmerging the old ones might create issues, but you already
97 tested most of that with the rename, and your core system continued to
98 function so apparently at least the core system is fine without the old
99 versions.)
100
101 Now, run revdep-rebuild -p and see which packages you need to remerge.
102 One of those is probably what was killing your OOo build. Remerge them as
103 necessary (either removing the -p or doing it one by one, don't forget the
104 --oneshot so as not to unnecessarily pollute your world file if you do it
105 one by one).
106
107 When you are finished with the rebuild, try merging OOo again. If all
108 goes well, the rebuild will have fixed your problem and you'll be in
109 business.
110
111 If you have issues after unmerging the old gccs, or run into something
112 that won't compile with gcc4 but will with gcc3, you have the binary
113 packages you created before the unmerge, and should be able to remerge
114 them quickly using emerge's -k switch, along with the =gcc-<ver> syntax to
115 get the version you want. Having gcc binpkgs around is also quite handy
116 in case gcc breaks for some reason, since trying to use a broken gcc to
117 emerge gcc doesn't tend to work so well.
118
119 --
120 Duncan - List replies preferred. No HTML msgs.
121 "Every nonfree program has a lord, a master --
122 and if you use the program, he is your master." Richard Stallman
123
124 --
125 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: A different Openoffice Build problem felix@×××××××.com
Re: [gentoo-amd64] Re: A different Openoffice Build problem Arvid Norlander <arvid.norlander@×××××.com>