Ok, I think I found the root of this pthread issue; it's an
idiosyncracy of gcc on the mips architecture. It seems that when
doing -shared linking on this ARCH, gcc ignores the -pthread flag,
so libpthread must be included explicitly.
http://lists.debian.org/debian-gcc/2004/10/msg00170.html

In any case, this fixes it for my environment:
--- ccrtp-1.5.0/src/Makefile.in.orig    2006-11-22 22:44:23.000000000
-0800
+++ ccrtp-1.5.0/src/Makefile.in 2006-11-22 22:50:20.000000000 -0800
@@ -238,7 +238,8 @@
 LT_VERSION = @LT_CCXX_VERSION@
 AM_CXXFLAGS = @WARN_FLAGS@
 # RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
-RELEASE = $(LT_VERSION) -release $(LT_RELEASE) @GNULIBS@
+# -lpthread for gcc ARCH=mips (-shared disables -pthread):
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE) -lpthread  @GNULIBS@
 lib_LTLIBRARIES = libccrtp1.la
 @[EMAIL PROTECTED] = ccrtp/crypto/openssl/hmac.cxx \
 @SRTP_OPENSSL_TRUE@            ccrtp/crypto/openssl/AesSrtp.cxx \

Someone more expert that I may be able to update configure.ac so
that the mips behavior is automagically detected and handled.

Peace,
  Chuck

Chuck Harrison wrote:
> 
> Working on the embbedded mips install for openWRT
> 
> Now libccrtp1.la has been created! Rah! Rah! On with the show...
> 
> The rtcpp-1.5.0/demo/Makefile does not put a -pthread flag in the
> link, but the first demo file to be processed, rtpsend, fails --
> looking for pthread references.
> 
> As a trial, I added -pthread to the Makefile.in
> but it made no change to the result:
> 
> Making all in demo
[...]
> /home/trunk/staging_dir_mipsel/usr/lib/libccgnu2.so: undefined
> reference to `pthread_rwlock_rdlock'


_______________________________________________
Ccrtp-devel mailing list
Ccrtp-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/ccrtp-devel

Reply via email to