5.2.20
09/25/2020

[#227] error: use of undeclared identifier 'pthread_mutex_init'
Summary error: use of undeclared identifier 'pthread_mutex_init'
Queue gloox
Queue Version 1.0.8
Type Bug
State Resolved
Priority 1. Low
Owners js (at) camaya (dot) net
Requester camaya (at) ryandesign (dot) com
Created 03/28/2014 (2373 days ago)
Due
Updated 09/13/2014 (2204 days ago)
Assigned
Resolved 09/13/2014 (2204 days ago)

History
09/13/2014 12:31:08 PM Jakob Schröter State ⇒ Resolved
 
07/14/2014 10:30:39 AM camaya (at) ryandesign (dot) com Comment #4 Reply to this comment
Could you test if it compiles with the attached patch?
Alternatively, this is also in svn, 1.0 branch.
Sorry I didn't get to this earlier, but version 1.0.10 builds fine 
now. Thanks.
04/14/2014 03:55:37 PM Jakob Schröter Comment #3
Assigned to Jakob Schröter
State ⇒ Accepted
New Attachment: gnutls.diff Download
Reply to this comment
Could you test if it compiles with the attached patch?
Alternatively, this is also in svn, 1.0 branch.
04/08/2014 09:17:09 PM Jakob Schröter Comment #2 Reply to this comment
Hm, this looks bad. It seems as if those problems originate in the 
GNUTLS macros gloox is using. Maybe they are outdated?
E.g.:
:info:build tlsgnutlsclient.cpp:23:1: error: use of undeclared 
identifier 'pthread_mutex_init'
:info:build GCRY_THREAD_OPTION_PTHREAD_IMPL;
:info:build ^
:info:build /opt/local/include/gcrypt.h:326:13: note: expanded from 
macro 'GCRY_THREAD_OPTION_PTHREAD_IMPL'
:info:build       err = pthread_mutex_init (lock, NULL);               
                    \


Have you tried building with OpenSSL?
03/28/2014 11:07:50 PM camaya (at) ryandesign (dot) com Comment #1
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ gloox
New Attachment: main.log Download
Summary ⇒ error: use of undeclared identifier 'pthread_mutex_init'
Reply to this comment
I cannot build any version of gloox (1.0 through 1.0.9 inclusive) on 
OS X 10.9 Mavericks. Versions 1.0.7 through 1.0.9 inclusive fail as 
follows:

/bin/sh ../libtool --tag=CXX   --mode=compile /usr/bin/clang++ 
-DHAVE_CONFIG_H -I. -I..  -Wall -pedantic -pipe -W -Wfloat-equal 
-Wcast-align -Wsign-compare -Wpointer-arith -Wswitch -Wunknown-pragmas 
-Wconversion -Wundef -Wcast-qual -Wwrite-strings -Wformat-security 
-Wmissing-format-attribute -Wno-long-long -isystem/opt/local/include 
-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -I/opt/local/include -I/opt/local/include -I/opt/local/include/p11-kit-1 -I/opt/local/include  -I/opt/local/include -D_THREAD_SAFE   -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -stdlib=libc++ -ansi -MT tlsgnutlsclient.lo -MD -MP -MF .deps/tlsgnutlsclient.Tpo -c -o tlsgnutlsclient.lo 
tlsgnutlsclient.cpp
libtool: compile:  /usr/bin/clang++ -DHAVE_CONFIG_H -I. -I.. -Wall 
-pedantic -pipe -W -Wfloat-equal -Wcast-align -Wsign-compare 
-Wpointer-arith -Wswitch -Wunknown-pragmas -Wconversion -Wundef 
-Wcast-qual -Wwrite-strings -Wformat-security 
-Wmissing-format-attribute -Wno-long-long -isystem/opt/local/include 
-isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -I/opt/local/include -I/opt/local/include -I/opt/local/include/p11-kit-1 -I/opt/local/include -I/opt/local/include -D_THREAD_SAFE -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -stdlib=libc++ -ansi -MT tlsgnutlsclient.lo -MD -MP -MF .deps/tlsgnutlsclient.Tpo -c tlsgnutlsclient.cpp  -fno-common -DPIC -o 
.libs/tlsgnutlsclient.o
In file included from tlsgnutlsclient.cpp:15:
./tlsgnutlsclient.h:74:7: warning: 'gnutls_certificate_credentials' is 
deprecated [-Wdeprecated-declarations]
       gnutls_certificate_credentials m_credentials;
       ^
/opt/local/include/gnutls/compat.h:75:42: note: 
'gnutls_certificate_credentials' declared here
typedef gnutls_certificate_credentials_t 
gnutls_certificate_credentials _GNUTLS_GCC_ATTR_DEPRECATED;
                                          ^
tlsgnutlsclient.cpp:23:1: error: use of undeclared identifier 
'pthread_mutex_init'
GCRY_THREAD_OPTION_PTHREAD_IMPL;
^
/opt/local/include/gcrypt.h:326:13: note: expanded from macro 
'GCRY_THREAD_OPTION_PTHREAD_IMPL'
       err = pthread_mutex_init (lock, NULL);                           
         \
             ^

The full log is attached.