make时提示pthread的错误,在线等
错误如下
gtm_txn.o: In function `GTM_BeginTransactionMulti':
gtm_txn.c:(.text+0xe09): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `GTM_GetGIDData':
gtm_txn.c:(.text+0x15af): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `ProcessBeginTransactionCommand':
gtm_txn.c:(.text+0x16fa): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `ProcessBeginTransactionGetGXIDCommand':
gtm_txn.c:(.text+0x187b): undefined reference to `pthread_getspecific'
gtm_txn.c:(.text+0x1a49): undefined reference to `pthread_getspecific'
gtm_txn.o:gtm_txn.c:(.text+0x1a6a): more undefined references to `pthread_getspecific' follow
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockAcquire':
gtm_lock.c:(.text+0x25): undefined reference to `pthread_rwlock_wrlock'
gtm_lock.c:(.text+0x36): undefined reference to `pthread_rwlock_rdlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockRelease':
gtm_lock.c:(.text+0x8b): undefined reference to `pthread_rwlock_unlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockInit':
gtm_lock.c:(.text+0xb4): undefined reference to `pthread_rwlock_init'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockDestroy':
gtm_lock.c:(.text+0xce): undefined reference to `pthread_rwlock_destroy'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockConditionalAcquire':
gtm_lock.c:(.text+0xf9): undefined reference to `pthread_rwlock_trywrlock'
gtm_lock.c:(.text+0x10a): undefined reference to `pthread_rwlock_tryrdlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_MutexLockConditionalAcquire':
gtm_lock.c:(.text+0x1d6): undefined reference to `pthread_mutex_trylock'
../common/libgtm.a(gtm_list.o): In function `new_list':
gtm_list.c:(.text+0x52): undefined reference to `pthread_getspecific'
gtm_list.c:(.text+0x83): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `new_head_cell':
gtm_list.c:(.text+0xdc): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `new_tail_cell':
gtm_list.c:(.text+0x13a): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `add_new_cell':
gtm_list.c:(.text+0x1f0): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o):gtm_list.c:(.text+0xc0e): more undefined references to `pthread_getspecific' follow
我知道是pthread的问题,问题是我在ubuntu已经安装这个库了,用man -k也可以查看到pthread_getspecific等这些方法,
xjxia@xjxia:~/postgres-xc$ ls -la /usr/lib/libboost_thread.so
lrwxrwxrwx 1 root root 25 2011-06-04 05:30 /usr/lib/libboost_thread.so -> libboost_thread.so.1.46.1
这个也是有的
xjxia@xjxia:~/postgres-xc$ whereis pthread
pthread: /usr/include/pthread.h
为什么make还是报错,求大神帮忙,在线等
gtm_txn.o: In function `GTM_BeginTransactionMulti':
gtm_txn.c:(.text+0xe09): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `GTM_GetGIDData':
gtm_txn.c:(.text+0x15af): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `ProcessBeginTransactionCommand':
gtm_txn.c:(.text+0x16fa): undefined reference to `pthread_getspecific'
gtm_txn.o: In function `ProcessBeginTransactionGetGXIDCommand':
gtm_txn.c:(.text+0x187b): undefined reference to `pthread_getspecific'
gtm_txn.c:(.text+0x1a49): undefined reference to `pthread_getspecific'
gtm_txn.o:gtm_txn.c:(.text+0x1a6a): more undefined references to `pthread_getspecific' follow
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockAcquire':
gtm_lock.c:(.text+0x25): undefined reference to `pthread_rwlock_wrlock'
gtm_lock.c:(.text+0x36): undefined reference to `pthread_rwlock_rdlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockRelease':
gtm_lock.c:(.text+0x8b): undefined reference to `pthread_rwlock_unlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockInit':
gtm_lock.c:(.text+0xb4): undefined reference to `pthread_rwlock_init'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockDestroy':
gtm_lock.c:(.text+0xce): undefined reference to `pthread_rwlock_destroy'
../common/libgtm.a(gtm_lock.o): In function `GTM_RWLockConditionalAcquire':
gtm_lock.c:(.text+0xf9): undefined reference to `pthread_rwlock_trywrlock'
gtm_lock.c:(.text+0x10a): undefined reference to `pthread_rwlock_tryrdlock'
../common/libgtm.a(gtm_lock.o): In function `GTM_MutexLockConditionalAcquire':
gtm_lock.c:(.text+0x1d6): undefined reference to `pthread_mutex_trylock'
../common/libgtm.a(gtm_list.o): In function `new_list':
gtm_list.c:(.text+0x52): undefined reference to `pthread_getspecific'
gtm_list.c:(.text+0x83): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `new_head_cell':
gtm_list.c:(.text+0xdc): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `new_tail_cell':
gtm_list.c:(.text+0x13a): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o): In function `add_new_cell':
gtm_list.c:(.text+0x1f0): undefined reference to `pthread_getspecific'
../common/libgtm.a(gtm_list.o):gtm_list.c:(.text+0xc0e): more undefined references to `pthread_getspecific' follow
我知道是pthread的问题,问题是我在ubuntu已经安装这个库了,用man -k也可以查看到pthread_getspecific等这些方法,
xjxia@xjxia:~/postgres-xc$ ls -la /usr/lib/libboost_thread.so
lrwxrwxrwx 1 root root 25 2011-06-04 05:30 /usr/lib/libboost_thread.so -> libboost_thread.so.1.46.1
这个也是有的
xjxia@xjxia:~/postgres-xc$ whereis pthread
pthread: /usr/include/pthread.h
为什么make还是报错,求大神帮忙,在线等
...全文
相关推荐
基于Linux的TCP多线程网络聊天室源码(内含Makefile)
消息处理模块:处理客户端发送的消息,如广播消息到所有在线用户。4. 线程安全的数据结构:如队列或缓冲区,用于存储待处理的消息,确保在多线程环境中的正确操作。5.
unpv13e.tar.gz
**错误信息**:当编译出错时,错误信息是解决问题的关键。根据错误提示,定位问题所在,可能是语法错误、链接错误或是缺少特定功能的实现。5.
make_use.rar_进程与线程_C/C++_
这样,我们就保证了生产和消费的顺序,避免了数据丢失或错误的情况。总的来说,理解进程与线程的概念对于进行高效的并发编程至关重要。
linux多线程
(&mutex); if (buffer_has_item == 0) { buffer = make_new_item(); // 假设这是创建新项的函数 buffer_has_item = 1; }
glibc-2.28安装指南[源码]
在进行glibc-2.28的安装时,首先需要确保系统中已安装的编译器和构建工具(如GCC和make)是最新的版本。


