Bug 153774 - error from pthread.h
error from pthread.h
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-04-05 15:44 EDT by Sammy
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 2.3.4-21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-06 03:24:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sammy 2005-04-05 15:44:09 EDT
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):

How reproducible:

Steps to Reproduce:
1. update glibc-headers to 2.3.4-20 
2. try to compile something that includes pthread.h 

Additional info:
Comment 1 Jakub Jelinek 2005-04-05 15:58:20 EDT
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.
Comment 2 Sammy 2005-04-05 16:32:24 EDT
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

Comment 3 Jakub Jelinek 2005-04-05 16:48:35 EDT
Unfortunately that doesn't answer the question.
cd kdenetwork-3.4.0/kopete/protocols/gadu/libgadu
make > LOG 2>&1
less LOG
# 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

Comment 4 Jakub Jelinek 2005-04-06 03:24:36 EDT
Ok, the culprit was -ansi -fexceptions in C, which forbids inline keyword.
Fixed in glibc-2.3.4-21.

Note You need to log in before you can comment on or make changes to this bug.