Red Hat Bugzilla – Bug 153774
error from pthread.h
Last modified: 2007-11-30 17:11:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux; X11; en_US) KHTML/3.4.0 (like Gecko)
Description of problem:
When I am building packages that include /usr/include/pthread.h the compilation
fails with an error message from line 530 saying that there is syntax error before
void. The line reads:
extern lnline void
__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
removing inline does not produce the error but I am not sure this is the right thing.
Compilers etc are at toda's rawhide. Version -18 does not produce an error but
seems very different than the one in -20 (does not have the above function).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. update glibc-headers to 2.3.4-20
2. try to compile something that includes pthread.h
extern inline void ...
is valid C, so you must be compiling some that redefines inline to something
weird. Can you run gcc on whatever caused the error message in pthread.h:530
and instead of -c run it with -E -dD and attach the result here?
I'll probably change that inline to __inline, but I'd like to understand first
what exactly is going on.
I am compiling kdenetworks package with updates from stable branch. It is
building fine with -18 glibc headers. The files causing the problem
are part of gadu library under kopete. They are in directory
"kdenetwork-3.4.0/kopete/protocols/gadu/libgadu". They include pthread.h and
fail with error. The compilation flags are:
CFLAGS = -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 -O2
-g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -D_GNU_SOURCE -DNDEBUG -DNO_DEBUG -Wformat-security
CXXFLAGS = -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W
-Wpointer-arith -Wwrite-strings -O2 -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables
-D_GNU_SOURCE -DNDEBUG -DNO_DEBUG -fno-use-cxa-atexit -Wformat-security
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common
-fno-exceptions -fno-check-new -fno-common -fvisibility=hidden
-fvisibility-inlines-hidden -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL
Unfortunately that doesn't answer the question.
make > LOG 2>&1
# cut'n'paste the gcc command line which compiles the file that failed,
# replace -c with -E -dD and remove -o outfile
attach the output of that command here
Ok, the culprit was -ansi -fexceptions in C, which forbids inline keyword.
Fixed in glibc-2.3.4-21.