[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ccrtp-devel] rtcpp-1.5.0/demo/rtpsend ... undefined reference to'p
From: |
Chuck Harrison |
Subject: |
Re: [Ccrtp-devel] rtcpp-1.5.0/demo/rtpsend ... undefined reference to'pthread_...' |
Date: |
Wed, 22 Nov 2006 23:38:07 -0800 |
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
@address@hidden = 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'