This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC 3.0 branch segfaults when compiling KDElibs
- To: gcc at gcc dot gnu dot org
- Subject: GCC 3.0 branch segfaults when compiling KDElibs
- From: Luke Mauldin <lukeskyfly at txk dot net>
- Date: Mon, 4 Jun 2001 11:37:08 -0500
Hello, I compiled qt-2.3.0 with the gcc-3.0 branch(checked out on 6-03-01)
and it works and compiles fine. However, there are two problems that gcc
encounters when trying to build KDElibs-2.1.2. The first is a problem with
function calls. Here is the error message. make[3]: Entering directory
`/usr/src/redhat/BUILD/kdelibs-2.1.2/arts/mcopidl'
creating mcopidl.all_cc.cc ...
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../dcop -I../../libltdl
-I../../kdecore -I../../kdeui -I../../kssl -I/usr/lib/qt-2.3.0/include
-I/usr/X11R6/include -I/usr/include -I./../mcop -O2 -march=athlon
-mcpu=athlon -D_REENTRANT -DNDEBUG -fno-exceptions -fno-check-new -Wall
-pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings
-Wno-long-long -Wnon-virtual-dtor -fno-builtin -march=athlon -mcpu=athlon
-fno-exceptions -fno-check-new -DNDEBUG -UDEBUG -DNODEBUG
-UDEBUG_ASYNC_TRANSFER -UVPORT_DEBUG -UDEBUG_IO -UDEBUG_MESSAGES -UDEBUG_AUTH
-UDEBUG_CONNECTION_DATA -DYYDEBUG=0 -UNETWMDEBUG -UCSS_DEBUG
-UCSS_STYLESHEET_DEBUG -USPEED_DEBUG -UKJS_DEBUGGER -UFORMS_DEBUG
-UDEBUG_LAYOUT -UDEBUG_DRAW_BORDER -UPARSER_DEBUG -UDECODE_DEBUG
-UCACHE_DEBUG -UBUFFER_DEBUG -UJPEG_DEBUG -UDEBUG_LINEBREAKS -UBOX_DEBUG
-UTABLE_DEBUG -UYYERROR_VERBOSE -UKJS_DEBUG_MEM -UMIDIOUTDEBUG
-UGENERAL_DEBUG_MESSAGES -D_GNU_SOURCE -frtti -c mcopidl.all_cc.cc
In file included from /usr/include/stdio.h:631,
from mcopidl.cc:26,
from mcopidl.all_cc.cc:2:
/usr/include/bits/stdio.h:35:27: warning: ISO C does not permit named
variadic macros
In file included from mcopidl.all_cc.cc:2:
mcopidl.cc: In function `void moveIfChanged(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)':
mcopidl.cc:790: call of overloaded `memcmp(unsigned char*&, unsigned char*&,
size_t&)' is ambiguous
/usr/include/string.h:59: candidates are: int memcmp(const void*, const void*,
unsigned int)
/usr/include/g++-v3/bits/std_cstring.h:120: int
std::memcmp(const void*, const void*, unsigned int)
In file included from mcopidl.all_cc.cc:2:
mcopidl.cc: In function `void doIncludeHeader(FILE*)':
mcopidl.cc:825: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
mcopidl.cc:827: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
mcopidl.cc:829: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
In file included from mcopidl.all_cc.cc:2:
mcopidl.cc: In function `int main(int, char**)':
mcopidl.cc:2556: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
mcopidl.cc:2556: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
mcopidl.cc:2560: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
In file included from mcopidl.all_cc.cc:3:
yacc.yy: In function `int yyparse()':
yacc.yy:415: call of overloaded `strlen(char*&)' is ambiguous
/usr/include/string.h:218: candidates are: size_t strlen(const char*)
/usr/include/g++-v3/bits/std_cstring.h:200: size_t
std::strlen(const char*)
yacc.yy:417: call of overloaded `strcpy(char*, char*&)' is ambiguous
/usr/include/string.h:78: candidates are: char* strcpy(char*, const char*)
/usr/include/g++-v3/bits/std_cstring.h:104: char*
std::strcpy(char*, const char*)
/usr/include/g++-v3/bits/localefwd.h: At top level:
scanner.cc:2051: warning: `void* yy_flex_realloc(void*, unsigned int)' defined
but not used
make[3]: *** [mcopidl.all_cc.o] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/kdelibs-2.1.2/arts/mcopidl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/kdelibs-2.1.2/arts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/kdelibs-2.1.2'
make: *** [all-recursive-am] Error 2
If I go into the files and change the function calls from simply strcpy(...)
to std::strcpy(...) it works and compiles fine. I am not sure if that is a
bug or if that is kde's fault? I know that it does compile correctly with
gcc-2.96 and gcc-2.95.3. The second error message I get is when gcc
segfaults. Here is that error message:
g++ -shared -nostdlib /usr/lib/gcc-lib/i586-pc-linux-gnu/3.0/../../../crti.o
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.0/crtbeginS.o .libs/kmedia2.o
../../arts/mcop/.libs/libmcop.so -L/usr/lib/gcc-lib/i586-pc-linux-gnu/3.0
-L/usr/lib/gcc-lib/i586-pc-linux-gnu/3.0/../../..
-L/home/luke/gcccvs/gcc/objdir/i586-pc-linux-gnu/libstdc++-v3/src
-L/home/luke/gcccvs/gcc/objdir/i586-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/luke/gcccvs/gcc/objdir/gcc /usr/lib/libstdc++.so -lm -lc -lgcc_s
-lgcc /usr/lib/gcc-lib/i586-pc-linux-gnu/3.0/crtendS.o
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.0/../../../crtn.o -Wl,-soname
-Wl,libkmedia2_idl.so.0 -o .libs/libkmedia2_idl.so.0.0.0
(cd .libs && rm -f libkmedia2_idl.so.0 && ln -s libkmedia2_idl.so.0.0.0
libkmedia2_idl.so.0)
(cd .libs && rm -f libkmedia2_idl.so && ln -s libkmedia2_idl.so.0.0.0
libkmedia2_idl.so)
creating libkmedia2_idl.la
(cd .libs && rm -f libkmedia2_idl.la && ln -s ../libkmedia2_idl.la
libkmedia2_idl.la)
../../arts/mcopidl/mcopidl -t -I. -I../../arts/flow
../../arts/soundserver/soundserver.idl
make[3]: *** [soundserver.h] Segmentation fault (core dumped)
make[3]: Leaving directory
`/usr/src/redhat/BUILD/kdelibs-2.1.2/arts/soundserver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/kdelibs-2.1.2/arts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/kdelibs-2.1.2'
make: *** [all-recursive-am] Error 2
It did create a core file. I am not sure how to get information from the
core file though, so if you need information from that, please tell me how to
get it to you, and I will be more than happy to provide you with all of the
information possible.
Luke