Bug 80408 - glibc header is slightly broken: parse error before "__threadid"
Summary: glibc header is slightly broken: parse error before "__threadid"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: glibc
Version: phoebe
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-25 23:26 UTC by Tom "spot" Callaway
Modified: 2016-11-24 15:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-28 05:02:26 UTC


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

Description Tom "spot" Callaway 2002-12-25 23:26:19 UTC
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 23:28:06 UTC
Created attachment 88911 [details]
fix for sigthread compilation issue

Comment 2 Jakub Jelinek 2002-12-26 21:03:09 UTC
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-27 01:55:50 UTC
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-27 01:57:03 UTC
Created attachment 88927 [details]
c file that triggers glibc error

Comment 5 Tom "spot" Callaway 2002-12-27 02:00:58 UTC
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-27 02:02:09 UTC
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 09:05:50 UTC
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 05:02:26 UTC
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.