* [gentoo-dev] GCC / G++ 2.95.3 question
@ 2002-12-09 23:57 Marc Chabrol
2002-12-16 21:42 ` Martin Schlemmer
0 siblings, 1 reply; 2+ messages in thread
From: Marc Chabrol @ 2002-12-09 23:57 UTC (permalink / raw
To: gentoo-dev
Hi all,
I submit the following problem to all readers of gentoo-dev, as I think it's
an interesting issue. Sorry, it's a little long but it needs explanations.
A friend of mine installed Gentoo 1.2 this week end. After he finished his
progression to stage 3, he started emerging kde. Qt 3.1 emerged fine but arts
would not emerge (kde 3.0.4). After investigation we found that the configure
was failing on checking QT, the conftest.cc file generated would be compiled
with gcc instead of g++ and would fail on C++ symbols like cerr, cout, ...
(see log at the end of mail).
We could track that the reason why gcc was used was the presence of the two
following variables in /etc/env.d/05gcc:
CC=gcc
CXX=gcc
Because of this CXX, the configure would use gcc to compile C++ code.
We checked on the Changelog of the gcc ebuild to see that this modification
was recently (dec 3) made by azarah on the gcc-2.95.3-r7 ebuild (introduced
in version 1.13 of the ebuild).
We tried to put these two variables in another working configuration with
older gcc (same version 2.95.3-r7 but ebuild version 1.11) and it didn't
cause the problem.
The gcc and g++ binaries (/usr/bin ones) are different between the newly built
system and the old one, even if they were using the same ebuild (different
sizes and md5sums).
So, was somebody able to emerge kde using gcc emerged with version 1.14 of the
ebuild ? Is it a bug ?
Anyway we workarounded by removing the two lines from /etc/env.d/05gcc and now
it's working fine... I definitely had fun debugging this one ;)
FYI, here is the snippet used by configure to check for QT, that would not
compile using gcc and would using g++, followed by the bunch of errors while
using gcc.
#include <qglobal.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qstylefactory.h>
#include <private/qucomextra_p.h>
#if ! (QT_VERSION >= 302)
#error 1
#endif
int main() {
(void)QStyleFactory::create(QString::null);
QCursor c(Qt::WhatsThisCursor);
return 0;
}
/tmp/ccMh8Cuu.o: In function
`__malloc_alloc_template<0>::_S_oom_malloc(unsigned int)':
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x1a): undefined reference to `endl(ostream &)'
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x27): undefined reference to `cerr'
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x2c): undefined reference to `ostream::operator<<(char const *)'
/tmp/ccMh8Cuu.o(.__malloc_alloc_template<0>::gnu.linkonce.t._S_oom_malloc(unsigned
int)+0x37): undefined reference to `ostream::operator<<(ostream &(*)(ostream
&))'
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::Rep::copy(unsigned int, char const *,
unsigned int)':
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.copy(unsigned int,
char const *, unsigned int)+0x33): undefined reference to
`string_char_traits<char>::copy(char *, char const *, unsigned int)'
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::Rep::move(unsigned int, char const *,
unsigned int)':
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::Rep::gnu.linkonce.t.move(unsigned int,
char const *, unsigned int)+0x33): undefined reference to
`string_char_traits<char>::move(char *, char const *, unsigned int)'
/tmp/ccMh8Cuu.o: In function `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::replace(unsigned int, unsigned int, char
const *, unsigned int)':
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::gnu.linkonce.t.replace(unsigned int,
unsigned int, char const *, unsigned int)+0x31): undefined reference to
`__out_of_range(char const *)'
/tmp/ccMh8Cuu.o(.basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::gnu.linkonce.t.replace(unsigned int,
unsigned int, char const *, unsigned int)+0x8e): undefined reference to
`__length_error(char const *)'
collect2: ld returned 1 exit status
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] GCC / G++ 2.95.3 question
2002-12-09 23:57 [gentoo-dev] GCC / G++ 2.95.3 question Marc Chabrol
@ 2002-12-16 21:42 ` Martin Schlemmer
0 siblings, 0 replies; 2+ messages in thread
From: Martin Schlemmer @ 2002-12-16 21:42 UTC (permalink / raw
To: Marc Chabrol; +Cc: Gentoo-Dev
On Tue, 2002-12-10 at 01:57, Marc Chabrol wrote:
> Hi all,
>
> I submit the following problem to all readers of gentoo-dev, as I think it's
> an interesting issue. Sorry, it's a little long but it needs explanations.
>
> A friend of mine installed Gentoo 1.2 this week end. After he finished his
> progression to stage 3, he started emerging kde. Qt 3.1 emerged fine but arts
> would not emerge (kde 3.0.4). After investigation we found that the configure
> was failing on checking QT, the conftest.cc file generated would be compiled
> with gcc instead of g++ and would fail on C++ symbols like cerr, cout, ...
> (see log at the end of mail).
>
> We could track that the reason why gcc was used was the presence of the two
> following variables in /etc/env.d/05gcc:
>
> CC=gcc
> CXX=gcc
>
> Because of this CXX, the configure would use gcc to compile C++ code.
>
Yes, I was brain dead at the time. Its already been fixed on CVS,
please just edit your 05gcc and change the CXX line to CXX="g++".
--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-16 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-09 23:57 [gentoo-dev] GCC / G++ 2.95.3 question Marc Chabrol
2002-12-16 21:42 ` Martin Schlemmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox