swoole安装失败

来源:互联网 发布:联通语音网络类型 编辑:程序博客网 时间:2024/05/20 21:57

swoole安装失败

swoole

环境是 Linux version 2.6.32 gcc 4.8 php 5.4.32

swoole-1.7.4

提示/tmp/pear/temp/swoole/include/swoole.h:401:2: error: unknown type name 'pthread_rwlock_t' pthread_rwlock_t _lock; ^ /tmp/pear/temp/swoole/include/swoole.h:402:2: error: unknown type name 'pthread_rwlockattr_t' pthread_rwlockattr_t attr; ^ /tmp/pear/temp/swoole/include/swoole.h:410:2: error: unknown type name 'pthread_spinlock_t' pthread_spinlock_t lock_t; ^ make: *** [src/core/RingQueue.lo] Error 1 ERROR: `make' failed

2014-08-23 22:52添加评论
分享
0

魔力一生缘

看了下是pthread.h include的了,但是pthread_spinlock_t pthread_rwlockattr_t 这个结构体没有定义。在pthreadtype.h中看到这几个结构体的定义依赖常量__USE_XOPEN2K。所以就先在swoole/include/swoole.h中添加了这个常量的定义。然后就可以编译通过了,看着功能也正常。 这个变量好像是和gcc编译有关的参数,具体是干什么的还没有详细研究。

原创粉丝点击