stalinizer / wt

Wt, C++ Web Toolkit
http://www.webtoolkit.eu/wt
Other
0 stars 0 forks source link

netbsd compile error pthread #1

Open h4ck3rm1k3 opened 10 years ago

h4ck3rm1k3 commented 10 years ago

Compiling In file included from /usr/include/g++/bits/gthr-default.h:45:0, from /usr/include/g++/bits/gthr.h:166, from /usr/include/g++/ext/atomicity.h:34, from /usr/include/g++/bits/basic_string.h:41, from /usr/include/g++/string:53, from /arpa/gm/h/h4ck3rm1k3/experiments/wt-master/src/Wt/WApplication:18, from /arpa/gm/h/h4ck3rm1k3/experiments/wt-master/src/Wt/Resizable.C:7: /sys/pkg6_amd64/include/pthread.h:285:42: error: conflicting declaration 'typedef struct pthread_st* pthread_t' /usr/include/pthread_types.h:65:30: error: 'pthread_t' has a previous declaration as 'typedef struct pthread_st* pthread_t' /sys/pkg6_amd64/include/pthread.h:286:42: error: conflicting declaration 'typedef struct pthread_attr_st* pthread_attr_t' /usr/include/pthread_types.h:66:34: error: 'pthread_attr_t' has a previous declaration as 'typedef struct pthread_attr_st pthread_attr_t' /sys/pkg6_amd64/include/pthread.h:288:42: error: conflicting declaration 'typedef int pthread_once_t' /usr/include/pthread_types.h:71:34: error: 'pthread_once_t' has a previous declaration as 'typedef struct pthread_once_st pthread_once_t' /sys/pkg6_amd64/include/pthread.h:289:42: error: conflicting declaration 'typedef int pthread_mutexattr_t' /usr/include/pthread_types.h:68:39: error: 'pthread_mutexattr_t' has a previous declaration as 'typedef struct pthread_mutexattr_st pthread_mutexattr_t' /sys/pkg6_amd64/include/pthread.h:290:42: error: conflicting declaration 'typedef struct pthread_mutex_st* pthread_mutex_t' /usr/include/pthread_types.h:67:35: error: 'pthread_mutex_t' has a previous declaration as 'typedef struct pthread_mutex_st pthread_mutex_t' /sys/pkg6_amd64/include/pthread.h:291:42: error: conflicting declaration 'typedef int pthread_condattr_t' /usr/include/pthread_types.h:70:38: error: 'pthread_condattr_t' has a previous declaration as 'typedef struct pthread_condattr_st pthread_condattr_t' /sys/pkg6_amd64/include/pthread.h:292:42: error: conflicting declaration 'typedef struct pthread_cond_st* pthread_cond_t' /usr/include/pthread_types.h:69:34: error: 'pthread_cond_t' has a previous declaration as 'typedef struct pthread_cond_st pthread_cond_t' /sys/pkg6_amd64/include/pthread.h:293:42: error: conflicting declaration 'typedef int pthread_rwlockattr_t' /usr/include/pthread_types.h:74:40: error: 'pthread_rwlockattr_t' has a previous declaration as 'typedef struct pthread_rwlockattr_st pthread_rwlockattr_t' /sys/pkg6_amd64/include/pthread.h:294:42: error: conflicting declaration 'typedef struct pthread_rwlock_st* pthread_rwlock_t' /usr/include/pthread_types.h:73:36: error: 'pthread_rwlock_t' has a previous declaration as 'typedef struct pthread_rwlock_st pthread_rwlock_t' In file included from /usr/include/g++/bits/gthr.h:166:0, from /usr/include/g++/ext/atomicity.h:34, from /usr/include/g++/bits/basic_string.h:41, from /usr/include/g++/string:53, from /arpa/gm/h/h4ck3rm1k3/experiments/wt-master/src/Wt/WApplication:18, from /arpa/gm/h/h4ck3rm1k3/experiments/wt-master/src/Wt/Resizable.C:7: /usr/include/g++/bits/gthr-default.h:130:9: error: 'pthread_detach' was not declared in this scope /usr/include/g++/bits/gthr-default.h:130:1: error: invalid type in declaration before ';' token /usr/include/g++/bits/gthr-default.h: In function 'int gthread_detach(pthreadst)': /usr/include/g++/bits/gthr-default.h:668:46: error: 'gthrw_pthreaddetach' cannot be used as a function ** Error code 1 (continuing)

h4ck3rm1k3 commented 10 years ago

Workaround

add this before

struct pthread_st;
typedef struct pthread_st *pthread_t;
extern int pthread_detach(pthread_t);

The problem is that pthread_detach does not exist, __pthread_detach exists.