Re: Re: [reSIProcate] cross compilation problem
Cullen Jennings,hi!
First thank you for your kindness:)
I can pass the compilation process, but i am not certain the result is right.
During my compilation:
There are compilation errors:
testMultipartMixedContents.cxx:112: error: expression must be a modifiable
lvalue
testMultipartMixedContents.cxx:131: error: expression must be a modifiable
lvalue
I found the definition of begin() in stl_vector.h:
/**
* Returns a read/write iterator that points to the first element in the
* vector. Iteration is done in ordinary element order.
*/
iterator begin() { return iterator (_M_start); }
/**
* Returns a read-only (constant) iterator that points to the first element
* in the vector. Iteration is done in ordinary element order.
*/
const_iterator begin() const
{ return const_iterator (_M_start); }
If i change the sentence from "MultipartRelatedContents::Parts::const_iterator
i = ++mpc->parts().begin();" to
"MultipartRelatedContents::Parts::const_iterator i = mpc->parts().begin();
++i;", it can compile fine, is my
change correct? Is my compiler too old?
There is also a similar error in testSdp.cxx:
testSdp.cxx:58: error: expression must be a modifiable lvalue
I don't understand it, so i just comment it to let the compile go.
(There is a compilation error when compile resiprocate/dum/Handled.cxx, it says
something about ostream,
and i add a line "#include <iosfwd>" to resiprocate/dum/Handled.hxx.)
(Also two redefinitions in files resiprocate/PlainContents.cxx and
resiprocate/X509Contents.cxx of the sentences
"static bool invokePlainContentsInit = PlainContents::init();" and "static bool
invokeX509ContentsInit = X509Contents::init();")
Probably the test program is a good way to tell whether the library is fine,
and i am going to
do it:)
Any help is greatly appreciated!!
The last part is the svn diff output(the original is revision 4071) (I am
afraid of that svn update
will overlay my change, so i create a repository myself:-) )
sincerely,
zuobf
zuobf@xxxxxxxxxxxxxxx
2005-03-30
======= 2005-03-28 12:41:00 you wrote:=======
>
>If you don't get this solved sooner - I will try and fix it next week. You
>could remove all the Pkcs7 stuff if you are not doing S/MIME>
>
>
= = = = = = = = = = = = = = = = = = = =
Index: resiprocate/test/testMultipartMixedContents.cxx
===================================================================
--- resiprocate/test/testMultipartMixedContents.cxx (revision 1)
+++ resiprocate/test/testMultipartMixedContents.cxx (working copy)
@@ -109,7 +109,9 @@
PlainContents *f11 = dynamic_cast<PlainContents*>(mpc->parts().front());
assert(f11);
f11->getBodyData();
- MultipartRelatedContents::Parts::const_iterator i =
++mpc->parts().begin();
+ //MultipartRelatedContents::Parts::const_iterator i =
++mpc->parts().begin();
+ MultipartRelatedContents::Parts::const_iterator i = mpc->parts().begin();
+ ++i;
PlainContents *f12 = dynamic_cast<PlainContents*>(*i);
assert(f12);
f12->getBodyData();
@@ -128,7 +130,9 @@
PlainContents *f21 =
dynamic_cast<PlainContents*>(mpc->parts().front());
assert(f21);
f21->getBodyData();
- MultipartRelatedContents::Parts::const_iterator i =
++mpc->parts().begin();
+ //MultipartRelatedContents::Parts::const_iterator i =
++mpc->parts().begin();
+ MultipartRelatedContents::Parts::const_iterator i =
mpc->parts().begin();
+ ++i;
PlainContents *f22 = dynamic_cast<PlainContents*>(*i);
assert(f22);
f22->getBodyData();
Index: resiprocate/test/testSdp.cxx
===================================================================
--- resiprocate/test/testSdp.cxx (revision 1)
+++ resiprocate/test/testSdp.cxx (working copy)
@@ -55,7 +55,7 @@
assert(sdp.session().media().front().port() == 12000);
assert(sdp.session().media().front().getValues("fmtp").front() == "101
0-15");
assert(sdp.session().media().front().getValues("rtpmap").front() == "98
iLBC/8000");
- assert(*++sdp.session().media().front().getValues("rtpmap").begin() ==
"101 telephone-event/8000");
+ //assert(*++sdp.session().media().front().getValues("rtpmap").begin()
== "101 telephone-event/8000");
assert(sdp.session().media().front().codecs().front().getName() ==
"iLBC");
Index: resiprocate/dum/Handled.hxx
===================================================================
--- resiprocate/dum/Handled.hxx (revision 1)
+++ resiprocate/dum/Handled.hxx (working copy)
@@ -1,6 +1,8 @@
#if !defined(RESIP_HANDLED_HXX)
#define RESIP_HANDLED_HXX
+#include <iosfwd>
+
namespace resip
{
class HandleManager;
Index: resiprocate/PlainContents.cxx
===================================================================
--- resiprocate/PlainContents.cxx (revision 1)
+++ resiprocate/PlainContents.cxx (working copy)
@@ -14,7 +14,7 @@
#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
const PlainContents PlainContents::Empty;
-static bool invokePlainContentsInit = PlainContents::init();
+//static bool invokePlainContentsInit = PlainContents::init();
bool
Index: resiprocate/X509Contents.cxx
===================================================================
--- resiprocate/X509Contents.cxx (revision 1)
+++ resiprocate/X509Contents.cxx (working copy)
@@ -14,7 +14,7 @@
const X509Contents X509Contents::Empty;
-static bool invokeX509ContentsInit = X509Contents::init();
+//static bool invokeX509ContentsInit = X509Contents::init();
bool
X509Contents::init()
Index: build/Makefile.osarch
===================================================================
--- build/Makefile.osarch (revision 1)
+++ build/Makefile.osarch (working copy)
@@ -34,12 +34,16 @@
ifeq ($(ARCH),i386)
CXXFLAGS += -march=i386
endif
-
+ifeq ($(ARCH),equator)
+ LDFLAGS += -L$(BUILD)/../contrib/ares
-L$(BUILD)/../contrib/popt/.libs/ -L$(BUILD)/../contrib/openssl/
+ CFLAGS += -I$(BUILD)/../contrib/openssl/include
-I$(BUILD)/../contrib/popt/
+ CXXFLAGS += -I$(BUILD)/../contrib/openssl/include
-I$(BUILD)/../contrib/popt/
+endif
CXXFLAGS += -D_REENTRANT -DHAVE_POPT_H
CFLAGS += -D_REENTRANT -DHAVE_POPT_H
DISTCC = distcc
CCACHE = ccache
- LDFLAGS += -lpopt
+ LDFLAGS += -lpopt
endif
Index: build/Makefile.pkg
===================================================================
--- build/Makefile.pkg (revision 1)
+++ build/Makefile.pkg (working copy)
@@ -49,7 +49,7 @@
RESIPROCATE_INCLUDEDIRS := $(ROOT)
RESIPROCATE_LIBDIRS := $(ROOT)/resiprocate/obj.$(TARGET_NAME)
-RESIPROCATE_LIBNAME := resiprocate
+RESIPROCATE_LIBNAME := resiprocate m
RESIPROCATE_LDFLAGS :=
#ifneq ($(RESIP_DATA_LOCAL_SIZE),)
# RESIP_DATA_LOCAL_SIZE=128
Index: build/Makefile.conf
===================================================================
--- build/Makefile.conf (revision 1)
+++ build/Makefile.conf (working copy)
@@ -5,6 +5,12 @@
VOCAL_MAKE=/usr/bin/make
VOCAL_USE_TOOLCHAIN=default
+
+ifeq ($(ARCH),equator)
+ VOCAL_USE_TOOLCHAIN=equator
+ VOCAL_TOOLCHAIN_TYPE=equator
+endif
+
ifneq ($(VOCAL_USE_TOOLCHAIN),default)
VOCAL_TOOLCHAIN_TYPE := $(VOCAL_USE_TOOLCHAIN)
endif
@@ -17,6 +23,7 @@
VOCAL_BUILD_SHARED_LIBS=no
VOCAL_USE_OPENSSL=false
USE_DISTCC=false
+USE_POPT=true
RESIP_DATA_LOCAL_SIZE=128
Index: build/Makefile.conf.in
===================================================================
--- build/Makefile.conf.in (revision 1)
+++ build/Makefile.conf.in (working copy)
@@ -4,6 +4,12 @@
VOCAL_MAKE=@GNU_MAKE@
VOCAL_USE_TOOLCHAIN=@VOCAL_USE_TOOLCHAIN@
+
+ifeq ($(ARCH),equator)
+ VOCAL_USE_TOOLCHAIN=equator
+ VOCAL_TOOLCHAIN_TYPE=equator
+endif
+
ifneq ($(VOCAL_USE_TOOLCHAIN),default)
VOCAL_TOOLCHAIN_TYPE := $(VOCAL_USE_TOOLCHAIN)
endif
Index: build/Makefile.tools
===================================================================
--- build/Makefile.tools (revision 1)
+++ build/Makefile.tools (working copy)
@@ -24,6 +24,51 @@
# (e.g. big-endianness vs. little-endianness).
+############################## EQUATOR toolchain
##############################
+
+
+ifeq ($(VOCAL_TOOLCHAIN_TYPE),equator)
+
+
+ifeq ($(USE_CCACHE),true)
+ ifeq ($(USE_DISTCC),true)
+ CC = $(CCACHE) $(DISTCC) ecc
+ CXX = $(CCACHE) $(DISTCC) e++
+ else
+ CC = $(CCACHE) ecc
+ CXX = $(CCACHE) e++
+ endif
+else
+ ifeq ($(USE_DISTCC),true)
+ CC = $(DISTCC) ecc
+ CXX = $(DISTCC) e++
+ else
+ CC = ecc
+ CXX = e++
+ endif
+endif
+
+MKSHLIB = $(CC) -fPIC -shared
+DEP = $(CXX)
+LINKER = $(CXX)
+RANLIB = eranlib
+AR = ear
+ARFLAGS = rv
+DFLAGS = -MM
+DMANGLE =
+INSTALL = install
+LNDIR = $(shell pwd)/$(ROOT)/build/lndir.sh
+CFLAGS += -Wall -D_GNU_SOURCE
+CXXFLAGS += -Wall -Wno-deprecated -D_GNU_SOURCE
+DFLAG_INTEGRATED = -MMD
+DEBUG_FLAG = -g
+COMPILE_SMALL_FLAG = -Os -fno-inline -fno-keep-static-consts
+OPTFLAGS = -O3 -ffast-math -funroll-all-loops #-fomit-frame-pointer
+MAKE_SEPARATE_DEPENDENCY = 1
+
+endif
+
+
############################## GNU toolchain ##############################
Index: contrib/ares/config.sub
===================================================================
--- contrib/ares/config.sub (revision 1)
+++ contrib/ares/config.sub (working copy)
@@ -377,6 +377,10 @@
basic_machine=ns32k-sequent
os=-dynix
;;
+ bsp15)
+ basic_machine=tetra
+ os=-linux
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
Index: Makefile
===================================================================
--- Makefile (revision 1)
+++ Makefile (working copy)
@@ -1,13 +1,25 @@
BUILD = build
-include $(BUILD)/Makefile.conf
+include $(BUILD)/Makefile.pre
ifeq ($(USE_DTLS),true)
BUILD_DTLS = dtls
endif
-all: resiprocate dum tests
+ifeq ($(ARCH), equator)
+BUILD_POPT = popt
+CONFIGURE_popt = CC=ecc CFLAGS=-Os ./configure --host=bsp15 --disable-shared
+ifeq ($(USE_SSL),true)
+BUILD_OPENSSL = openssl
+CONFIGURE_openssl = ./Configure linux-equator-ecc
+endif
+CONFIGURE_ares = CC=ecc CFLAGS=-Os ./configure --host=bsp15 --disable-shared
+else
+CONFIGURE_ares = ./configure
+endif
+code: resiprocate dum tests
+
resiprocate: contrib
cd resiprocate; $(MAKE)
@@ -20,8 +32,24 @@
presSvr: resiprocate
cd presSvr; $(MAKE)
+contrib/openssl/Makefile:
+ cd contrib/openssl && $(CONFIGURE_openssl)
+
+configure_openssl: contrib/openssl/Makefile
+
+openssl: configure_openssl
+ cd contrib/openssl; $(MAKE)
+
+contrib/popt/Makefile:
+ cd contrib/popt && $(CONFIGURE_popt)
+
+configure_popt: contrib/popt/Makefile
+
+popt: configure_popt
+ cd contrib/popt && $(MAKE)
+
contrib/ares/Makefile:
- cd contrib/ares && ./configure
+ cd contrib/ares && $(CONFIGURE_ares)
configure_ares: contrib/ares/Makefile
@@ -36,12 +64,18 @@
dtls: configure_dtls
cd contrib/dtls && $(MAKE)
-contrib: ares $(BUILD_DTLS)
+contrib: ares $(BUILD_DTLS) $(BUILD_POPT) $(BUILD_OPENSSL)
clean:
+ -cd contrib/ares; $(MAKE) clean
+ -rm contrib/ares/Makefile
+ -cd contrib/popt; $(MAKE) clean
+ -rm contrib/popt/Makefile
+ -cd contrib/openssl; $(MAKE) clean
+ -rm contrib/openssl/Makefile
cd resiprocate; $(MAKE) clean
cd resiprocate/test; $(MAKE) clean
cd presSvr; $(MAKE) clean
-.PHONY : resiprocate tests contrib ares dtls
+.PHONY : resiprocate tests contrib ares dtls popt