Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38829 - glibc-2.3.2-r9 breaks compiling with gcc-3.2.3-r3
Summary: glibc-2.3.2-r9 breaks compiling with gcc-3.2.3-r3
Status: RESOLVED DUPLICATE of bug 30701
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High blocker (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-20 09:44 UTC by Chris Bainbridge (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
0 users

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 Chris Bainbridge (RETIRED) gentoo-dev 2004-01-20 09:44:16 UTC
I had just emerged the new glibc 2.3.2 and then whilst compiling kdegraphics I got this error:

ake[3]: Leaving directory `/var/tmp/portage/kdegraphics-3.1.5/work/kdegraphics-3.1.5/kfile-plugins/ps'
Making all in jpeg
make[3]: Entering directory `/var/tmp/portage/kdegraphics-3.1.5/work/kdegraphics-3.1.5/kfile-plugins/jpeg'
/usr/qt/3/bin/moc ./kfile_jpeg.h -o kfile_jpeg.moc
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=pentium3 -mfpmath=sse -msse -mmmx -O2 -pipe -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -fexceptions -c -o exif.lo `test -f 'exif.cpp' || echo './'`exif.cpp
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=pentium3 -mfpmath=sse -msse -mmmx -O2 -pipe -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -fexceptions -c -o kfile_setcomment.lo `test -f 'kfile_setcomment.cpp' || echo './'`kfile_setcomment.cpp
In file included from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:683,
                 from kfile_setcomment.cpp:38:
/usr/include/bits/stdio.h: In function `int getchar()':
/usr/include/bits/stdio.h:42: declaration of `int getchar()' throws different
   exceptions
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:394: than previous
   declaration `int getchar() throw ()'
/usr/include/bits/stdio.h: In function `int getc_unlocked(FILE*)':
/usr/include/bits/stdio.h:51: declaration of `int getc_unlocked(FILE*)' throws
   different exceptions
REPEATS etc.

It looks like gcc and glibc both declare functions:

glibc in /usr/include/bits/stdio.h:

/* Read a character from stdin.  */
__STDIO_INLINE int
getchar (void)
{
  return _IO_getc (stdin);
}


gcc in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:

/* Read a character from stdin.  */
extern int getchar (void) __THROW;

__THROW evaluates to throw() which means throw nothing, so its semantically the same as the glibc declaration, but obviously gcc doesn't like that the syntax doesn't match anymore.

The reason:
In /usr/include/stdio.h (from glibc) functions used to be declared with __THROW macro appended (I have just checked this with glibc-2.3.2-r3). In glibc-2.3.2-r9 the __THROW macro has been removed from every function. This can be clearly seen by comparing the /usr/include/stdio.h file from r3 and r9:

< extern FILE *tmpfile (void) __THROW;
---
> extern FILE *tmpfile (void);
164c167
< extern FILE *__REDIRECT (tmpfile, (void) __THROW, tmpfile64);
---
> extern FILE *__REDIRECT (tmpfile, (void), tmpfile64);
etc.

I am not sure what the correct fix for this is, as I am not sure why the headers have changed from r3 to r9.
Comment 1 Daniel Tourde 2004-01-20 10:14:30 UTC
Same thing here.
When I try to emerge arts-1.1.5, the std headers are not found.

Daniel
Comment 2 Chris Bainbridge (RETIRED) gentoo-dev 2004-01-21 04:29:08 UTC
Try re-emerging gcc - it worked for me.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2004-01-21 10:56:16 UTC
Or do:

  # rm /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h

It is a known issue - not really stdio.h in particular, but the fact that
gcc installs and use 'fixed' headers ...
Comment 4 SpanKY gentoo-dev 2004-01-24 18:47:29 UTC

*** This bug has been marked as a duplicate of 30701 ***