Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22656 - build Kdelibs 3.1.2 with gcc 3.3 - configure not detect STL with (workaround)
Summary: build Kdelibs 3.1.2 with gcc 3.3 - configure not detect STL with (workaround)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 24066 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-11 22:33 UTC by Bernd Martin Wollny
Modified: 2003-07-12 15:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Martin Wollny 2003-06-11 22:33:23 UTC
Hello, 
if I try to ebuild kdelibs-3.1.2 the ebuild stops inside the ./configure.
./configure tells that no STL are installed. 
./configure use the following code to detect the STL: 
--------------   snipp ----------------------
#include <string>
using namespace std;

int main ()
{
  string astring="Hallo Welt.";
  astring.erase(0, 6); // now astring is "Welt"
  return 0;
}
-------------------  snipp --------------------

If you try to compile this code 
g++ -c configtest.cc -pedantic -O2 
gcc shows many errors. If you remove -pedantic or -O2 the code compiles correctly. 


As workaround remove  -pedantic from ./configure
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2003-06-12 07:20:19 UTC
Can you give a snapshot of the errors you get? 
 
-pedantic, according to the docs, only produces warnings, so I don't understand what's 
causing the error. 
 
http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Warning-Options.html#Warning%20Options 
Comment 2 Yellow Meanie ;) 2003-06-14 06:19:42 UTC
I've got exactly the same problem, with arts-1.1.2 (and previous versions which I've tried to recompile). This problem occurred when I upgraded to gcc-3.3, but doesn't go away after downgrading again.

Joel.

Here are the errors I get, removing -pedantic or optimisations produces no errors or warnings:

voodoo@lister voodoo $ gcc -c -pedantic -O2 test.cc 
In file included from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:683,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/g++-v3/cstdio:52,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h:35,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/g++-v3/bits/fpos.h:44,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/g++-v3/bits/char_traits.h:46,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/g++-v3/string:47,
                 from test.cc:1:
/usr/include/bits/stdio.h: In function `int vprintf(const char*, char*)':
/usr/include/bits/stdio.h:35: error: declaration of `int vprintf(const char*, 
   char*)' throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:317: error: than 
   previous declaration `int vprintf(const char*, char*) throw ()'
/usr/include/bits/stdio.h: In function `int getchar()':
/usr/include/bits/stdio.h:42: error: declaration of `int getchar()' throws 
   different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:394: error: than 
   previous declaration `int getchar() throw ()'
/usr/include/bits/stdio.h: In function `int getc_unlocked(FILE*)':
/usr/include/bits/stdio.h:51: error: declaration of `int getc_unlocked(FILE*)' 
   throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:403: error: than 
   previous declaration `int getc_unlocked(FILE*) throw ()'
/usr/include/bits/stdio.h: In function `int getchar_unlocked()':
/usr/include/bits/stdio.h:58: error: declaration of `int getchar_unlocked()' 
   throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:404: error: than 
   previous declaration `int getchar_unlocked() throw ()'
/usr/include/bits/stdio.h: In function `int putchar(int)':
/usr/include/bits/stdio.h:67: error: declaration of `int putchar(int)' throws 
   different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:419: error: than 
   previous declaration `int putchar(int) throw ()'
/usr/include/bits/stdio.h: In function `int fputc_unlocked(int, FILE*)':
/usr/include/bits/stdio.h:76: error: declaration of `int fputc_unlocked(int, 
   FILE*)' throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:428: error: than 
   previous declaration `int fputc_unlocked(int, FILE*) throw ()'
/usr/include/bits/stdio.h: In function `int putc_unlocked(int, FILE*)':
/usr/include/bits/stdio.h:86: error: declaration of `int putc_unlocked(int, 
   FILE*)' throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:433: error: than 
   previous declaration `int putc_unlocked(int, FILE*) throw ()'
/usr/include/bits/stdio.h: In function `int putchar_unlocked(int)':
/usr/include/bits/stdio.h:93: error: declaration of `int putchar_unlocked(int)' 
   throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:434: error: than 
   previous declaration `int putchar_unlocked(int) throw ()'
/usr/include/bits/stdio.h: In function `__ssize_t getline(char**, size_t*, 
   FILE*)':
/usr/include/bits/stdio.h:103: error: declaration of `__ssize_t getline(char**, 
   size_t*, FILE*)' throws different exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/include/stdio.h:480: error: than 
   previous declaration `__ssize_t getline(char**, size_t*, FILE*) throw ()'
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2003-07-07 19:39:20 UTC
*** Bug 24066 has been marked as a duplicate of this bug. ***
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2003-07-08 00:20:26 UTC
This problem is probably due to gcc not being compiled with the glibc that is installed. Check whether a remerge of gcc helps.
Comment 5 Gavrila 2003-07-08 15:34:26 UTC
Reemerging gcc 3.2 worked for me for the duplicate bug about kdepim. 

Thank you all
Comment 6 Paul de Vrieze (RETIRED) gentoo-dev 2003-07-09 12:12:51 UTC
Ok, happy to hear that. Closing the bug
Comment 7 Jan Schubert 2003-07-12 15:05:19 UTC
reemerging gcc resolved the problem also for me. 
 
Thx a lot...