1 |
Hi all, |
2 |
|
3 |
I submit the following problem to all readers of gentoo-dev, as I think it's |
4 |
an interesting issue. Sorry, it's a little long but it needs explanations. |
5 |
|
6 |
A friend of mine installed Gentoo 1.2 this week end. After he finished his |
7 |
progression to stage 3, he started emerging kde. Qt 3.1 emerged fine but arts |
8 |
would not emerge (kde 3.0.4). After investigation we found that the configure |
9 |
was failing on checking QT, the conftest.cc file generated would be compiled |
10 |
with gcc instead of g++ and would fail on C++ symbols like cerr, cout, ... |
11 |
(see log at the end of mail). |
12 |
|
13 |
We could track that the reason why gcc was used was the presence of the two |
14 |
following variables in /etc/env.d/05gcc: |
15 |
|
16 |
CC=gcc |
17 |
CXX=gcc |
18 |
|
19 |
Because of this CXX, the configure would use gcc to compile C++ code. |
20 |
|
21 |
We checked on the Changelog of the gcc ebuild to see that this modification |
22 |
was recently (dec 3) made by azarah on the gcc-2.95.3-r7 ebuild (introduced |
23 |
in version 1.13 of the ebuild). |
24 |
|
25 |
We tried to put these two variables in another working configuration with |
26 |
older gcc (same version 2.95.3-r7 but ebuild version 1.11) and it didn't |
27 |
cause the problem. |
28 |
|
29 |
The gcc and g++ binaries (/usr/bin ones) are different between the newly built |
30 |
system and the old one, even if they were using the same ebuild (different |
31 |
sizes and md5sums). |
32 |
|
33 |
So, was somebody able to emerge kde using gcc emerged with version 1.14 of the |
34 |
ebuild ? Is it a bug ? |
35 |
|
36 |
Anyway we workarounded by removing the two lines from /etc/env.d/05gcc and now |
37 |
it's working fine... I definitely had fun debugging this one ;) |
38 |
|
39 |
|
40 |
FYI, here is the snippet used by configure to check for QT, that would not |
41 |
compile using gcc and would using g++, followed by the bunch of errors while |
42 |
using gcc. |
43 |
|
44 |
#include <qglobal.h> |
45 |
#include <qapplication.h> |
46 |
#include <qcursor.h> |
47 |
#include <qstylefactory.h> |
48 |
#include <private/qucomextra_p.h> |
49 |
#if ! (QT_VERSION >= 302) |
50 |
#error 1 |
51 |
#endif |
52 |
|
53 |
int main() { |
54 |
(void)QStyleFactory::create(QString::null); |
55 |
QCursor c(Qt::WhatsThisCursor); |
56 |
return 0; |
57 |
} |
58 |
|
59 |
/tmp/ccMh8Cuu.o: In function |
60 |
`__malloc_alloc_template<0>::_S_oom_malloc(unsigned int)': |
61 |
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned |
62 |
int)+0x1a): undefined reference to `endl(ostream &)' |
63 |
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned |
64 |
int)+0x27): undefined reference to `cerr' |
65 |
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned |
66 |
int)+0x2c): undefined reference to `ostream::operator<<(char const *)' |
67 |
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned |
68 |
int)+0x37): undefined reference to `ostream::operator<<(ostream &(*)(ostream |
69 |
&))' |
70 |
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>, |
71 |
__default_alloc_template<true, 0> >::Rep::copy(unsigned int, char const *, |
72 |
unsigned int)': |
73 |
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>, |
74 |
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.copy(unsigned int, |
75 |
char const *, unsigned int)+0x33): undefined reference to |
76 |
`string_char_traits<char>::copy(char *, char const *, unsigned int)' |
77 |
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>, |
78 |
__default_alloc_template<true, 0> >::Rep::move(unsigned int, char const *, |
79 |
unsigned int)': |
80 |
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>, |
81 |
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.move(unsigned int, |
82 |
char const *, unsigned int)+0x33): undefined reference to |
83 |
`string_char_traits<char>::move(char *, char const *, unsigned int)' |
84 |
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>, |
85 |
__default_alloc_template<true, 0> >::replace(unsigned int, unsigned int, char |
86 |
const *, unsigned int)': |
87 |
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>, |
88 |
__default_alloc_template<true, 0> >::gnu.linkonce.t.replace(unsigned int, |
89 |
unsigned int, char const *, unsigned int)+0x31): undefined reference to |
90 |
`__out_of_range(char const *)' |
91 |
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>, |
92 |
__default_alloc_template<true, 0> >::gnu.linkonce.t.replace(unsigned int, |
93 |
unsigned int, char const *, unsigned int)+0x8e): undefined reference to |
94 |
`__length_error(char const *)' |
95 |
collect2: ld returned 1 exit status |
96 |
|
97 |
|
98 |
-- |
99 |
gentoo-dev@g.o mailing list |