1 |
On Tuesday 04 July 2006 20:36, Richard Fish wrote: |
2 |
> On 7/4/06, David Corbin <gentoo.org@××××××××××.com> wrote: |
3 |
> > Looking closer, my original copy of the error wasn't very complete. |
4 |
> > There are screenfuls of undefined references to various std:: symbols. |
5 |
> > Clearly my C++ library is messed up. How do I fix it? |
6 |
> |
7 |
|
8 |
Here's a sample of the output: |
9 |
|
10 |
There are 36 "undefined reference to" errors. |
11 |
|
12 |
quicklauncher.cpp: |
13 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE13insert_uniqueERKS3_+0xab): |
14 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
15 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QString, std::pair<QString |
16 |
const, int>, std::_Select1st<std::pair<QString const, int> >, |
17 |
std::less<QString>, std::allocator<std::pair<QString const, int> > |
18 |
>::insert_unique(std::_Rb_tree_iterator<std::pair<QString const, int> >, |
19 |
std::pair<QString const, int> const&)': |
20 |
quicklauncher.cpp: |
21 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE13insert_uniqueESt17_Rb_tree_iteratorIS3_ERKS3_+0x42): |
22 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
23 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QuickButton*, QuickButton*, |
24 |
std::_Identity<QuickButton*>, std::less<QuickButton*>, |
25 |
std::allocator<QuickButton*> >::_M_insert(std::_Rb_tree_node_base*, |
26 |
std::_Rb_tree_node_base*, QuickButton* const&)': |
27 |
quicklauncher.cpp: |
28 |
(.gnu.linkonce.t._ZNSt8_Rb_treeIP11QuickButtonS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE9_M_insertEPSt18_Rb_tree_node_baseS9_RKS1_+0x67): |
29 |
undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, |
30 |
std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, |
31 |
std::_Rb_tree_node_base&)' |
32 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QuickButton*, QuickButton*, |
33 |
std::_Identity<QuickButton*>, std::less<QuickButton*>, |
34 |
std::allocator<QuickButton*> >::insert_unique(QuickButton* const&)': |
35 |
quicklauncher.cpp: |
36 |
(.gnu.linkonce.t._ZNSt8_Rb_treeIP11QuickButtonS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE13insert_uniqueERKS1_+0x9f): |
37 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
38 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QString, std::pair<QString |
39 |
const, QuickButton*>, std::_Select1st<std::pair<QString const, QuickButton*> |
40 |
>, std::less<QString>, std::allocator<std::pair<QString const, QuickButton*> |
41 |
> >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, |
42 |
std::pair<QString const, QuickButton*> const&)': |
43 |
quicklauncher.cpp: |
44 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_P11QuickButtonESt10_Select1stIS5_ESt4lessIS0_ESaIS5_EE9_M_insertEPSt18_Rb_tree_node_baseSD_RKS5_+0x87): |
45 |
undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, |
46 |
std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, |
47 |
std::_Rb_tree_node_base&)' |
48 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QString, std::pair<QString |
49 |
const, QuickButton*>, std::_Select1st<std::pair<QString const, QuickButton*> |
50 |
>, std::less<QString>, std::allocator<std::pair<QString const, QuickButton*> |
51 |
> >::insert_unique(std::pair<QString const, QuickButton*> const&)': |
52 |
quicklauncher.cpp: |
53 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_P11QuickButtonESt10_Select1stIS5_ESt4lessIS0_ESaIS5_EE13insert_uniqueERKS5_+0xab): |
54 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
55 |
.libs/quicklauncher.o: In function `std::_Rb_tree<QString, std::pair<QString |
56 |
const, QuickButton*>, std::_Select1st<std::pair<QString const, QuickButton*> |
57 |
>, std::less<QString>, std::allocator<std::pair<QString const, QuickButton*> |
58 |
> >::insert_unique(std::_Rb_tree_iterator<std::pair<QString const, |
59 |
QuickButton*> >, std::pair<QString const, QuickButton*> const&)': |
60 |
quicklauncher.cpp: |
61 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_P11QuickButtonESt10_Select1stIS5_ESt4lessIS0_ESaIS5_EE13insert_uniqueESt17_Rb_tree_iteratorIS5_ERKS5_+0x42): |
62 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
63 |
.libs/popularity.o: In function |
64 |
`PopularityStatisticsImpl::normalizeHistory(PopularityStatisticsImpl::SingleFalloffHistory&)': |
65 |
popularity.cpp:(.text+0x4f): undefined reference to |
66 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
67 |
popularity.cpp:(.text+0x81): undefined reference to |
68 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
69 |
.libs/popularity.o: In function |
70 |
`PopularityStatisticsImpl::updateServiceRanks()': |
71 |
popularity.cpp:(.text+0xf6d): undefined reference to |
72 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
73 |
popularity.cpp:(.text+0x1128): undefined reference to |
74 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
75 |
.libs/popularity.o: In function `PopularityStatistics::readConfig(Prefs*)': |
76 |
popularity.cpp:(.text+0x17c9): undefined reference to |
77 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
78 |
.libs/popularity.o:popularity.cpp:(.text+0x1821): more undefined references to |
79 |
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)' follow |
80 |
.libs/popularity.o: In function `PopularityStatistics::moveToTop(QStringList |
81 |
const&)': |
82 |
popularity.cpp:(.text+0x209d): undefined reference to |
83 |
`std::_List_node_base::hook(std::_List_node_base*)' |
84 |
popularity.cpp:(.text+0x2101): undefined reference to |
85 |
`std::_List_node_base::hook(std::_List_node_base*)' |
86 |
popularity.cpp:(.text+0x2118): undefined reference to |
87 |
`std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, |
88 |
std::_Rb_tree_node_base&)' |
89 |
popularity.cpp:(.text+0x21af): undefined reference to |
90 |
`std::_List_node_base::hook(std::_List_node_base*)' |
91 |
popularity.cpp:(.text+0x2202): undefined reference to |
92 |
`std::_List_node_base::hook(std::_List_node_base*)' |
93 |
popularity.cpp:(.text+0x24f3): undefined reference to |
94 |
`std::_List_node_base::hook(std::_List_node_base*)' |
95 |
.libs/popularity.o: In function `std::_Rb_tree<QString, QString, |
96 |
std::_Identity<QString>, std::less<QString>, std::allocator<QString> |
97 |
>::erase(std::_Rb_tree_iterator<QString>, std::_Rb_tree_iterator<QString>)': |
98 |
popularity.cpp: |
99 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE5eraseESt17_Rb_tree_iteratorIS0_ES8_+0x54): |
100 |
undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
101 |
popularity.cpp: |
102 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE5eraseESt17_Rb_tree_iteratorIS0_ES8_+0x68): |
103 |
undefined reference to |
104 |
`std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, |
105 |
std::_Rb_tree_node_base&)' |
106 |
.libs/popularity.o: In function `std::_Rb_tree<QString, QString, |
107 |
std::_Identity<QString>, std::less<QString>, std::allocator<QString> |
108 |
>::erase(QString const&)': |
109 |
popularity.cpp: |
110 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EE5eraseERKS0_+0xa4): |
111 |
undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)' |
112 |
.libs/popularity.o: In function `std::_Rb_tree<QString, std::pair<QString |
113 |
const, double>, std::_Select1st<std::pair<QString const, double> >, |
114 |
std::less<QString>, std::allocator<std::pair<QString const, double> > |
115 |
>::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, |
116 |
std::pair<QString const, double> const&)': |
117 |
popularity.cpp: |
118 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_dESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE9_M_insertEPSt18_Rb_tree_node_baseSB_RKS3_+0x87): |
119 |
undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, |
120 |
std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, |
121 |
std::_Rb_tree_node_base&)' |
122 |
.libs/popularity.o: In function `std::_Rb_tree<QString, std::pair<QString |
123 |
const, double>, std::_Select1st<std::pair<QString const, double> >, |
124 |
std::less<QString>, std::allocator<std::pair<QString const, double> > |
125 |
>::insert_unique(std::pair<QString const, double> const&)': |
126 |
popularity.cpp: |
127 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_dESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE13insert_uniqueERKS3_+0xab): |
128 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' |
129 |
.libs/popularity.o: In function `std::_Rb_tree<QString, std::pair<QString |
130 |
const, double>, std::_Select1st<std::pair<QString const, double> >, |
131 |
std::less<QString>, std::allocator<std::pair<QString const, double> > |
132 |
>::insert_unique(std::_Rb_tree_iterator<std::pair<QString const, double> >, |
133 |
std::pair<QString const, double> const&)': |
134 |
popularity.cpp: |
135 |
(.gnu.linkonce.t._ZNSt8_Rb_treeI7QStringSt4pairIKS0_dESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE13insert_uniqueESt17_Rb_tree_iteratorIS3_ERKS3_+0x42): |
136 |
undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base* |
137 |
> Can you post some of that output? In particular, look for things |
138 |
> about missing "libstdc++.so.6". |
139 |
|
140 |
Here's a grep on the output for libstdc++ . |
141 |
|
142 |
|
143 |
configure: WARNING: Your libstdc++ doesn't appear to be patched for |
144 |
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld: |
145 |
warning: libstdc++.so.5, needed by /usr/qt/3/lib/libqt-mt.so, may conflict |
146 |
with libstdc++.so.6 |
147 |
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld: |
148 |
warning: libstdc++.so.5, needed by /usr/qt/3/lib/libqt-mt.so, may conflict |
149 |
with libstdc++.so.6 |
150 |
|
151 |
> It might be just that you need to run |
152 |
> fix_libtool_files.sh. |
153 |
> |
154 |
> If you truly think you have a broken C++ library, which is installed |
155 |
> as part of gcc, I would suggest: |
156 |
> |
157 |
> 1. emerge --oneshot gcc |
158 |
> 2. Use gcc-config to select the correct/current compiler |
159 |
> 3. revdep-rebuild --library=libstdc++.so.6 |
160 |
> |
161 |
|
162 |
I'll try those things out. |
163 |
|
164 |
> The 3rd command will rebuild all programs and libraries that use C++ |
165 |
> on your system. The first 2 are mostly to make sure you have a usable |
166 |
> C++ |
167 |
> |
168 |
> -Richard |
169 |
-- |
170 |
gentoo-user@g.o mailing list |