[FEISTY] Problems compiling programs with pthread

Bug #81169 reported by Christophe Dumez
6
Affects Status Importance Assigned to Milestone
pth (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: libpthread-dev

Since some time I can't compile some programs (libtorrent, Wormux) anymore, I get this error :

        then mv -f ".deps/ai_engine.Tpo" ".deps/ai_engine.Po"; else rm -f ".deps/ai_engine.Tpo"; exit 1; fi
/usr/include/pthread.h:285: error: conflicting declaration ‘typedef struct pthread_st* pthread_t’
/usr/include/bits/pthreadtypes.h:36: error: ‘pthread_t’ has a previous declaration as ‘typedef long unsigned int pthread_t’
/usr/include/pthread.h:286: error: conflicting declaration ‘typedef struct pthread_attr_st* pthread_attr_t’
/usr/include/bits/pthreadtypes.h:43: error: ‘pthread_attr_t’ has a previous declaration as ‘typedef union pthread_attr_t pthread_attr_t’
/usr/include/pthread.h:287: error: conflicting declaration ‘typedef int pthread_key_t’
/usr/include/bits/pthreadtypes.h:109: error: ‘pthread_key_t’ has a previous declaration as ‘typedef unsigned int pthread_key_t’
/usr/include/pthread.h:289: error: conflicting declaration ‘typedef int pthread_mutexattr_t’
/usr/include/bits/pthreadtypes.h:79: error: ‘pthread_mutexattr_t’ has a previous declaration as ‘typedef union pthread_mutexattr_t pthread_mutexattr_t’
/usr/include/pthread.h:290: error: conflicting declaration ‘typedef struct pthread_mutex_st* pthread_mutex_t’
/usr/include/bits/pthreadtypes.h:73: error: ‘pthread_mutex_t’ has a previous declaration as ‘typedef union pthread_mutex_t pthread_mutex_t’
/usr/include/pthread.h:291: error: conflicting declaration ‘typedef int pthread_condattr_t’
/usr/include/bits/pthreadtypes.h:105: error: ‘pthread_condattr_t’ has a previous declaration as ‘typedef union pthread_condattr_t pthread_condattr_t’
/usr/include/pthread.h:292: error: conflicting declaration ‘typedef struct pthread_cond_st* pthread_cond_t’
/usr/include/bits/pthreadtypes.h:99: error: ‘pthread_cond_t’ has a previous declaration as ‘typedef union pthread_cond_t pthread_cond_t’
/usr/include/pthread.h:293: error: conflicting declaration ‘typedef int pthread_rwlockattr_t’
/usr/include/bits/pthreadtypes.h:142: error: ‘pthread_rwlockattr_t’ has a previous declaration as ‘typedef union pthread_rwlockattr_t pthread_rwlockattr_t’
/usr/include/pthread.h:294: error: conflicting declaration ‘typedef struct pthread_rwlock_st* pthread_rwlock_t’
/usr/include/bits/pthreadtypes.h:136: error: ‘pthread_rwlock_t’ has a previous declaration as ‘typedef union pthread_rwlock_t pthread_rwlock_t’

Probably something changed in libpthread-dev...

Revision history for this message
hectorC (hcengar) wrote :

Same problem for me. I'm trying to build two applications (Rosegarden and Ardour2) which use this library and both fail with errors like these:

/usr/include/pthread.h:285: error: conflicting declaration ‘typedef struct pthread_st* pthread_t’
/usr/include/bits/pthreadtypes.h:36: error: ‘pthread_t’ has a previous declaration as ‘typedef long unsigned int pthread_t’
/usr/include/pthread.h:286: error: conflicting declaration ‘typedef struct pthread_attr_st* pthread_attr_t’
/usr/include/bits/pthreadtypes.h:43: error: ‘pthread_attr_t’ has a previous declaration as ‘typedef union pthread_attr_t pthread_attr_t’
/usr/include/pthread.h:287: error: conflicting declaration ‘typedef int pthread_key_t’
/usr/include/bits/pthreadtypes.h:109: error: ‘pthread_key_t’ has a previous declaration as ‘typedef unsigned int pthread_key_t’
/usr/include/pthread.h:289: error: conflicting declaration ‘typedef int pthread_mutexattr_t’
/usr/include/bits/pthreadtypes.h:79: error: ‘pthread_mutexattr_t’ has a previous declaration as ‘typedef union pthread_mutexattr_t pthread_mutexattr_t’
/usr/include/pthread.h:290: error: conflicting declaration ‘typedef struct pthread_mutex_st* pthread_mutex_t’
/usr/include/bits/pthreadtypes.h:73: error: ‘pthread_mutex_t’ has a previous declaration as ‘typedef union pthread_mutex_t pthread_mutex_t’
/usr/include/pthread.h:291: error: conflicting declaration ‘typedef int pthread_condattr_t’
/usr/include/bits/pthreadtypes.h:105: error: ‘pthread_condattr_t’ has a previous declaration as ‘typedef union pthread_condattr_t pthread_condattr_t’
/usr/include/pthread.h:292: error: conflicting declaration ‘typedef struct pthread_cond_st* pthread_cond_t’
/usr/include/bits/pthreadtypes.h:99: error: ‘pthread_cond_t’ has a previous declaration as ‘typedef union pthread_cond_t pthread_cond_t’
/usr/include/pthread.h:293: error: conflicting declaration ‘typedef int pthread_rwlockattr_t’
/usr/include/bits/pthreadtypes.h:142: error: ‘pthread_rwlockattr_t’ has a previous declaration as ‘typedef union pthread_rwlockattr_t pthread_rwlockattr_t’
/usr/include/pthread.h:294: error: conflicting declaration ‘typedef struct pthread_rwlock_st* pthread_rwlock_t’
/usr/include/bits/pthreadtypes.h:136: error: ‘pthread_rwlock_t’ has a previous declaration as ‘typedef union pthread_rwlock_t pthread_rwlock_t’

Revision history for this message
hectorC (hcengar) wrote :

Also unable to build libgig.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I fixed the problem on my system by uninstalling libpthread-dev. Now my programs are compiling just fine. This is odd.

Revision history for this message
hectorC (hcengar) wrote :

Very odd, same thing here: uninstalled libpthread-dev and everything compiles fine.

Revision history for this message
blaamann (nofancystuff) wrote :

Confirmed.

libpthread-dev breaks building A LOT of application and libs.

For example x264, live555 and Mplayer.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

libpthread-dev and the binary package libpthread20 seem to have gone in gutsy; but
you might still have them if you upgraded from feisty.

I fell over this problem building rhythmbox and the error I got was:

GThread-ERROR **: file /build/buildd/glib2.0-2.14.1/gthread/gthread-posix.c: line 140 (): error 'Function not implemented' during 'pthread_getschedparam (pthread_self(), &policy, &sched)'
aborting...
Aborted (core dumped)

and an easily missed warning:

/usr/bin/ld: warning: libpthread.so.0, needed by /usr/lib/libgnomeui-2.so, may conflict with libpthread.so.20

Just removing libpthread-dev and libpthread20 seems to do the trick - it looks like it is all in the libc package these days.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 alpha with libpth20 and libpth-dev installed?

Changed in pth:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in pth:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.