[Ekiga-devel-list] [PATCH] ZRTP inclusion to Opal and Ekiga, build errors "fixed"



hello,

@ekiga-devlist, opal-devlist

"fixed" build, patch attached. but seems incomplete for production use.
and check the destructor of the extended class pls and someone pls tell me what i'm doing wrong here with that .so stuff

-lopal -lpt /usr/lib/libsigc-2.0.so /usr/lib/libxml2.so -lresolv
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `PWLibStupidLinkerHacks::libSRTPLoader'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_process_srtp'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_attach_stream'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_randstr'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_init'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_process_srtcp'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_done_session_ctx'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_start_stream'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `OpalZrtpDefault::DoGetZrtpProfile()'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_down'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_init_session_ctx'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_process_rtcp'
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../lib/libopal.so: undefined reference to `zrtp_process_rtp'
collect2: ld returned 1 exit status
make[3]: *** [ekiga] Error 1


@opal-devlist sf list admin

postmaster mailbox checking spamfilter blocks and bounces googlemail-users, reported to gmail.com.
i could register my own mta but it could be blocked by SORBS etc, too.

@all, bugs pz com

Your MTA without/wrong reverse-DNS could be blocked by the big mailproviders.

build host: latest debian lenny/sid snapshot amd64 x86_64
build try to link with libopal (latest SVN trunk)

schorpp tom1:/usr/local/src/libzrtp-0.6.5$ autoreconf
schorpp tom1:/usr/local/src/libzrtp-0.6.5$ ./configure CFLAGS="-O0 -g3 -fPIC -W -Wall -DBUILD_DEBUG_LOG -DBUILD_WITH_CFUNC -DBUILD_DEFAULT_CACHE -DBUILD_DEFAULT_TIMER -DBUILD_ZRTP_MUTEXES -DWITH_ZFONE -DUSE_BUILTIN_SRTP" --prefix=/usr

--gcc -f for position independant code missing, needed on x86_64 platform to link libzrtp.a with shared objects.

========================= configuring libzrtp ================================
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/usr/local/src/libzrtp-0.6.5/config/missing: Unknown `--run' option
Try `/usr/local/src/libzrtp-0.6.5/config/missing --help' for more information
configure: WARNING: `missing' script is too old or missing

--autoconf incomplete

schorpp tom1:/usr/local/src/libzrtp-0.6.5$ make install
Making install in bnlib
make[1]: Entering directory `/usr/local/src/libzrtp-0.6.5/bnlib'
test -d /usr/local/include/zrtp || mkdir /usr/local/include/zrtp
cp *.h /usr/local/include/zrtp
cp: cannot create regular file `/usr/local/include/zrtp/bn64.h': Permission denied
cp: cannot create regular file `/usr/local/include/zrtp/lbn64.h': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/src/libzrtp-0.6.5/bnlib'
make: *** [install-recursive] Error 1

-- configure --prefix=/usr option is ignored for bnlib, Makefile.in with incomplete automake-support but ok for /usr/local install.

y
tom


Index: include/zrtp/opalzrtp.h
===================================================================
--- include/zrtp/opalzrtp.h	(revision 20393)
+++ include/zrtp/opalzrtp.h	(working copy)
@@ -20,6 +20,7 @@
 	static bool DeInit();
 
 	static zrtp_global_ctx *GetZrtpContext();
+	static zrtp_profile_t* GetZrtpProfile();
 	static unsigned char *GetZID();
 	static void SetEventProcessor(ZrtpEventProcessor *eventProcessor);
 	static ZrtpEventProcessor * GetEventProcessor();
@@ -29,6 +30,7 @@
   protected:
 	virtual unsigned char *DoGetZID();
 	virtual zrtp_global_ctx *DoGetZrtpContext();
+	virtual zrtp_profile_t* DoGetZrtpProfile();
 	virtual bool DoInit(char *name, char *zidFile);
 	
   private:
Index: include/rtp/zrtpudp.h
===================================================================
--- include/rtp/zrtpudp.h	(revision 20393)
+++ include/rtp/zrtpudp.h	(working copy)
@@ -9,9 +9,9 @@
 #include <opal/rtpconn.h>
 
 
-struct zrtp_profile_t;
-struct zrtp_conn_ctx_t;
-struct zrtp_stream_ctx_t;
+//struct zrtp_profile_t; already declared in libzrtp.h or header hell
+//struct zrtp_conn_ctx_t;
+//struct zrtp_stream_ctx_t;
 
 
 class OpalZrtp_UDP : public SecureRTP_UDP
@@ -55,13 +55,13 @@
     ~LibZrtpSecurityMode_Base();
 
     RTP_UDP * CreateRTPSession(
-      OpalRTPConnection & connection,    ///< Connection creating session (may be needed by secure connections)
-      const PString & encoding,          ///<  identifies initial RTP encoding (RTP/AVP, UDPTL etc)
-#if OPAL_RTP_AGGREGATE
-      PHandleAggregator * _aggregator,   ///< handle aggregator
-#endif
-      unsigned id,                       ///< Session ID for RTP channel
-      PBoolean remoteIsNAT               ///< PTrue is remote is behind NAT
+      OpalRTPConnection & connection,    ///< Connection creating session (may be needed by secure connections)
+      const PString & encoding,          ///<  identifies initial RTP encoding (RTP/AVP, UDPTL etc)
+#if OPAL_RTP_AGGREGATE
+      PHandleAggregator * _aggregator,   ///< handle aggregator
+#endif
+      unsigned id,                       ///< Session ID for RTP channel
+      PBoolean remoteIsNAT               ///< PTrue is remote is behind NAT
     );
 
     PBoolean Open();
Index: src/zrtp/opalzrtp.cxx
===================================================================
--- src/zrtp/opalzrtp.cxx	(revision 20393)
+++ src/zrtp/opalzrtp.cxx	(working copy)
@@ -6,7 +6,8 @@
 #include <ptlib.h>
 #include <opal/buildopts.h>
 #include <zrtp/opalzrtp.h>
-#include <rtp/zrtp.h>
+#include <zrtp/zrtpeventproc.h>
+#include <rtp/zrtpudp.h>
 #include <sip/sipcon.h>
 
 namespace PWLibStupidLinkerHacks {
@@ -28,8 +29,9 @@
 	virtual ~OpalZrtpDefault();
 
   protected:
+	virtual zrtp_global_ctx *DoGetZrtpContext();
+	virtual zrtp_profile_t *DoGetZrtpProfile();
 	virtual unsigned char *DoGetZID();
-	virtual zrtp_global_ctx *DoGetZrtpContext();
 	virtual bool DoInit(char *name, char *zidFile);
 
   private:
@@ -88,6 +90,14 @@
 	return instance->DoGetZrtpContext();
 }
 
+zrtp_profile_t* OpalZrtp::GetZrtpProfile() {
+	if (!instance) {
+		return NULL;
+	}
+	
+	return instance->DoGetZrtpProfile();
+} 
+
 unsigned char *OpalZrtp::GetZID() {
 	if (!instance) {
 		return NULL;
@@ -107,14 +117,18 @@
 OpalZrtp::~OpalZrtp() {
 };
 
-unsigned char *OpalZrtp::DoGetZID() {
+zrtp_global_ctx *OpalZrtp::DoGetZrtpContext() {
 	return NULL;
 }
 
-zrtp_global_ctx *OpalZrtp::DoGetZrtpContext() {
+zrtp_profile_t* OpalZrtp::DoGetZrtpProfile() {
 	return NULL;
 }
 
+unsigned char *OpalZrtp::DoGetZID() {
+	return NULL;
+}
+
 bool OpalZrtp::DoInit(char *name, char *zidFile) {
 	return false;
 }
Index: src/rtp/zrtpudp.cxx
===================================================================
--- src/rtp/zrtpudp.cxx	(revision 20393)
+++ src/rtp/zrtpudp.cxx	(working copy)
@@ -18,8 +18,12 @@
 #define ZRTP_PLATFORM ZP_LINUX
 #endif
 
+#include <zrtp.h>
+#include <zrtp/opalzrtp.h>
 #include "rtp/zrtpudp.h"
 
+#define SRTP_MAX_TAG_LEN 12 
+#define SRTP_MAX_TRAILER_LEN SRTP_MAX_TAG_LEN 
 
 //////////////////////////////////////////////////////////////////////
 
@@ -139,11 +143,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-#include <zrtp.h>
-
-#define SRTP_MAX_TAG_LEN 12 
-#define SRTP_MAX_TRAILER_LEN SRTP_MAX_TAG_LEN 
-
 #define DECLARE_LIBZRTP_CRYPTO_ALG(name, sas, pk, auth, cipher, hash) \
 class OpalZrtpSecurityMode_##name : public LibZrtpSecurityMode_Base \
 { \
@@ -171,7 +170,7 @@
 {
 	Init(NULL, NULL, NULL, NULL, NULL);
   zrtpSession = new(zrtp_conn_ctx_t);
-  ::zrtp_init_session_ctx(zrtpSession, OpalZrtp::GetZrtpContext(), OpalZrtp::GetZID());
+  ::zrtp_init_session_ctx(zrtpSession, OpalZrtp::GetZrtpContext(), OpalZrtp::GetZrtpProfile(), OpalZrtp::GetZID());
   zrtpSession->ctx_usr_data = this;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]