Bug 80408 - glibc header is slightly broken: parse error before "__threadid"
glibc header is slightly broken: parse error before "__threadid"
Status: CLOSED NOTABUG
Product: Red Hat Public Beta
Classification: Retired
Component: glibc (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-25 18:26 EST by Tom "spot" Callaway
Modified: 2016-11-24 10:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-28 00:02:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix for sigthread compilation issue (386 bytes, patch)
2002-12-25 18:28 EST, Tom "spot" Callaway
no flags Details | Diff
c file that triggers glibc error (18.12 KB, application/octet-stream)
2002-12-26 20:57 EST, Tom "spot" Callaway
no flags Details
mpg123.c from xmms 1.2.7 (CORRECT FILE) (28.04 KB, text/plain)
2002-12-26 21:00 EST, Tom "spot" Callaway
no flags Details
corresponding .h for mpg123.c (from xmms source tree) (8.03 KB, text/plain)
2002-12-26 21:02 EST, Tom "spot" Callaway
no flags Details

  None (edit)
Description Tom "spot" Callaway 2002-12-25 18:26:19 EST
Description of problem:

/usr/include/bits/sigthread.h is a little broken. This prevents a lot of
applications from building on Phoebe.

Version-Release number of selected component (if applicable):

2.3.1-21

How reproducible:

Always

Steps to Reproduce:
1. Build an app (xmms/mplayer are good examples)
2. Watch it die.
    
Actual results:

parse error before "__threadid"

Expected results:

Successful build of application.

Additional info:

Attaching patch that will resolve the issue.
Comment 1 Tom "spot" Callaway 2002-12-25 18:28:06 EST
Created attachment 88911 [details]
fix for sigthread compilation issue
Comment 2 Jakub Jelinek 2002-12-26 16:03:09 EST
Can you write the sequence of includes which trigger that?
There haven't been many changes in sigthread.h for a long time (last was
just renaming the first argument of pthread_kill from __thread to __threadid).
In glibc-2.3.1-21 <bits/sigthread.h> seems to be included only from signal.h:
# include <bits/pthreadtypes.h>
# include <bits/sigthread.h>
and pthread.h:
#include <signal.h>
#include <bits/pthreadtypes.h>
...
#include <bits/sigthread.h>

So I'd really like to know what's going on.
Comment 3 Tom "spot" Callaway 2002-12-26 20:55:50 EST
make[3]: Entering directory `/usr/src/redhat/BUILD/xmms-1.2.7/Input/mpg123'
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../..
-I../../xmms -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
-I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include -DI386_ASSEM
-I../../intl    -O2 -g -march=i386 -mcpu=i686 -Wall -Wpointer-arith
-finline-functions -ffast-math -funroll-all-loops -c mpg123.c
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../xmms -I/usr/include/gtk-1.2
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT
-I/usr/X11R6/include -DI386_ASSEM -I../../intl -O2 -g -march=i386 -mcpu=i686
-Wall -Wpointer-arith -finline-functions -ffast-math -funroll-all-loops
-Wp,-MD,.deps/mpg123.pp -c mpg123.c  -fPIC -DPIC -o mpg123.lo
In file included from /usr/local/include/signal.h:364,
                 from mpg123.h:14,
                 from mpg123.c:1:
/usr/include/bits/sigthread.h:36: parse error before "__threadid"
make[3]: *** [mpg123.lo] Error 1

I'm also going to attach the mpg123.c file
Comment 4 Tom "spot" Callaway 2002-12-26 20:57:03 EST
Created attachment 88927 [details]
c file that triggers glibc error
Comment 5 Tom "spot" Callaway 2002-12-26 21:00:58 EST
Created attachment 88928 [details]
mpg123.c from xmms 1.2.7 (CORRECT FILE)

It would help if I could upload the proper file.
Comment 6 Tom "spot" Callaway 2002-12-26 21:02:09 EST
Created attachment 88930 [details]
corresponding .h for mpg123.c (from xmms source tree)

This file is correct. I can attach a full SRPM if needed.
Comment 7 Jakub Jelinek 2002-12-27 04:05:50 EST
In file included from /usr/local/include/signal.h:364
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think this is the culprit. Where does it come from? It is certainly not part
of the distro.
Comment 8 Tom "spot" Callaway 2002-12-28 00:02:26 EST
Agreed. I don't know where that file came from, but its definitely the culprit.

diff -u /usr/local/include/signal.h /usr/include/signal.h
--- /usr/local/include/signal.h 2002-09-05 18:51:25.000000000 -0400
+++ /usr/include/signal.h       2002-12-19 05:36:23.000000000 -0500
@@ -361,6 +361,7 @@
 #if defined __USE_POSIX199506 || defined __USE_UNIX98
 /* Some of the functions for handling signals in threaded programs must
    be defined here.  */
+# include <bits/pthreadtypes.h>
 # include <bits/sigthread.h>
 #endif /* use Unix98 */

NOTABUG, sorry. 

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