Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Problem emergin cdk
Date: Tue, 28 Feb 2006 13:49:55
Message-Id: pan.2006.02.28.13.46.19.290886@cox.net
In Reply to: Re: [gentoo-amd64] Problem emergin cdk by Kirby Walborn
1 Kirby Walborn posted <44043BB1.7020703@×××××××××××××.com>, excerpted
2 below, on Tue, 28 Feb 2006 05:01:53 -0700:
3
4 > Lorenzo Milesi wrote:
5 >> It's nearly 1 week I'm trying to upgrade CDK but the compile fails.
6 >>
7 >> x86_64-pc-linux-gnu-g++ -shared -nostdlib
8 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/crti.o
9 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/crtbeginS.o .libs/dscale.o
10 >> .libs/fscale.o .libs/fslider.o .libs/scale.o .libs/slider.o
11 >> .libs/uscale.o .libs/uslider.o .libs/alphalist.o .libs/binding.o
12 >> .libs/button.o .libs/buttonbox.o .libs/calendar.o .libs/cdk.o
13 >> .libs/cdk_compat.o .libs/cdk_objs.o .libs/cdk_params.o .libs/cdkscreen.o
14 >> .libs/debug.o .libs/dialog.o .libs/draw.o .libs/entry.o .libs/fselect.o
15 >> .libs/get_index.o .libs/get_string.o .libs/graph.o .libs/histogram.o
16 >> .libs/itemlist.o .libs/label.o .libs/marquee.o .libs/matrix.o
17 >> .libs/mentry.o .libs/menu.o .libs/popup_dialog.o .libs/popup_label.o
18 >> .libs/position.o .libs/radio.o .libs/scroll.o .libs/selection.o
19 >> .libs/swindow.o .libs/select_file.o .libs/template.o .libs/traverse.o
20 >> .libs/version.o .libs/view_file.o .libs/view_info.o .libs/viewer.o
21 >> -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4
22 >> -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/lib
23 >> -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64
24 >> -L/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../.. -L/lib/../lib64
25 >> -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s
26 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/crtendS.o
27 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/crtn.o
28 >> -Wl,-soname -Wl,libcdk.so.1 -o .libs/libcdk.so.1.2.1
29 >> x86_64-pc-linux-gnu-g++:
30 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/crti.o: No such
31 >> file or directory
32 >> x86_64-pc-linux-gnu-g++:
33 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/crtbeginS.o: No such file or
34 >> directory
35 >> x86_64-pc-linux-gnu-g++:
36 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/crtendS.o: No such file or
37 >> directory
38 >> x86_64-pc-linux-gnu-g++:
39 >> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/crtn.o: No such
40 >> file or directory
41 >> make: *** [libcdk.la] Error 1
42 >>
43 >> !!! ERROR: dev-libs/cdk-5.0.20060220 failed. Call stack:
44 >> ebuild.sh, line 1928: Called dyn_compile ebuild.sh, line 966:
45 >> Called src_compile
46 >>
47 >> !!! (no error message)
48 >> !!! If you need support, post the topmost build error, and the call
49 >> stack if relevant.
50 >>
51 >>
52 >> It fails because it cannot find crti.o and crtn.o, but I have them in
53 >> /usr/lib64!
54 >>
55 > I had the same problem and fixed it by doing this:
56 >
57 > emerge --oneshot libtool
58 >
59 > After doing the above cdk emerged fine. I found the answer in the forums
60 > but not the reason why this fixes it.
61
62 It's looking for libraries, aka *.so (so=shared object, the MSWormOS
63 parallel is *.dll, dynamic link library). That's what would normally be
64 found in lib(64) dirs and what is normally linked against.
65
66 libtool is, I /believe/, the "library tool" (real smart there, eh? <g>)
67 that creates all those *.la (not sure what that stands for but linker
68 advice fits) text files, that in turn give gcc some help figuring out
69 libraries. I've never happened to come across the details and haven't
70 gotten around to looking them up either, but I HAVE seen a Gentoo dev
71 remark that libtool was a solution to one problem that ended up creating
72 another -- PARTICULARLY for a frequently updated from-source distro like
73 Gentoo.
74
75 Anyway, piecing together the various bits of information, apparently a bad
76 libtool version screwed up and missed the "s" in .so, so things weren't
77 fitting together correctly.
78
79 Complicating matters is that *.o files are binary object files -- pieces
80 of binary executables and libraries that gcc creates from C and C++ source
81 files, as a mid-stage, before combining them into the various libraries
82 and executables they form.
83
84 So... *.o object files should exist in the portage working dirs, for a
85 short time until the package is fully created and merged, after which
86 portage usually cleans them up; they should **NOT** exist in the library
87 dirs. Correspondingly, *.so files will be the most common file in the
88 library dirs, and would be what gcc was wanting.
89
90 How you got *.o files in your library dirs, I don't know (unless you put
91 them there manually trying to fix the error). Perhaps the defective
92 libtool had a part in that as well. In any case, they didn't belong
93 there, and it's no surprise gcc was erring out even with them there,
94 because that's not what it wanted or expected, and was only what it was
95 asking for because that's what the defective libtool told it it needed.
96
97 To anybody the least bit familiar with compilers, libraries, and object
98 files, an error such as that is a *HUGE* *FLASHING* *RED* *FLAG*!!!
99 Something is *TERRIBLY* wrong. I don't know that I would have traced it
100 to libtool, altho I might, as one of the first things I would have done
101 would be to go looking in the *.la file for that library to see if it had
102 *.o instead of *.so for the library, as I suspect it was listed wrong
103 there and I know that libtool handles those, but in any case, I would
104 have been VERY careful right about then trying to compile anything else,
105 because if gcc gets screwed up bad enough to be looking for *.o files
106 instead of *.so files, it's potentially screwed up bad enough to trash an
107 entire system, if you don't tread carefully.
108
109 Anyway, I learned something too, in reading this. If I ever have
110 something similar happen, I'll immediately check my libtool. I might have
111 gotten there before, but now I know to check it first.
112
113 --
114 Duncan - List replies preferred. No HTML msgs.
115 "Every nonfree program has a lord, a master --
116 and if you use the program, he is your master." Richard Stallman in
117 http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html
118
119
120 --
121 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] Re: Problem emergin cdk Paul de Vrieze <pauldv@g.o>