You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2010/11/14 10:27:29 UTC

svn commit: r1034963 - in /tuscany/sca-cpp/trunk: ./ components/chat/ components/log/ components/nosqldb/ kernel/ modules/http/ modules/java/ modules/json/ modules/python/ ubuntu/

Author: jsdelfino
Date: Sun Nov 14 09:27:28 2010
New Revision: 1034963

URL: http://svn.apache.org/viewvc?rev=1034963&view=rev
Log:
Port to Ubuntu server 10.10 64-bit. C++ code fixes required to compile and run on 64-bit. Update INSTALL doc and build scripts. Remove a few obsolete scripts.

Removed:
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-image
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-image
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-gcc-4.5
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-install
    tuscany/sca-cpp/trunk/ubuntu/uec2-bin-image
    tuscany/sca-cpp/trunk/ubuntu/uec2-dev-image
Modified:
    tuscany/sca-cpp/trunk/INSTALL
    tuscany/sca-cpp/trunk/README
    tuscany/sca-cpp/trunk/components/chat/xmpp.hpp
    tuscany/sca-cpp/trunk/components/log/Makefile.am
    tuscany/sca-cpp/trunk/components/log/scribe.hpp
    tuscany/sca-cpp/trunk/components/nosqldb/tinycdb.hpp
    tuscany/sca-cpp/trunk/configure.ac
    tuscany/sca-cpp/trunk/kernel/fstream.hpp
    tuscany/sca-cpp/trunk/kernel/function.hpp
    tuscany/sca-cpp/trunk/kernel/gc.hpp
    tuscany/sca-cpp/trunk/kernel/hash.hpp
    tuscany/sca-cpp/trunk/kernel/list.hpp
    tuscany/sca-cpp/trunk/kernel/parallel.hpp
    tuscany/sca-cpp/trunk/kernel/sstream.hpp
    tuscany/sca-cpp/trunk/kernel/stream.hpp
    tuscany/sca-cpp/trunk/kernel/string-test.cpp
    tuscany/sca-cpp/trunk/kernel/string.hpp
    tuscany/sca-cpp/trunk/kernel/tree.hpp
    tuscany/sca-cpp/trunk/kernel/xml.hpp
    tuscany/sca-cpp/trunk/kernel/xsd-test.cpp
    tuscany/sca-cpp/trunk/modules/http/curl-connect.cpp
    tuscany/sca-cpp/trunk/modules/http/http.hpp
    tuscany/sca-cpp/trunk/modules/http/httpd.hpp
    tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp
    tuscany/sca-cpp/trunk/modules/http/openauth.hpp
    tuscany/sca-cpp/trunk/modules/java/eval.hpp
    tuscany/sca-cpp/trunk/modules/json/json-test.cpp
    tuscany/sca-cpp/trunk/modules/json/json.hpp
    tuscany/sca-cpp/trunk/modules/python/eval.hpp
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image
    tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all

Modified: tuscany/sca-cpp/trunk/INSTALL
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/INSTALL?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/INSTALL (original)
+++ tuscany/sca-cpp/trunk/INSTALL Sun Nov 14 09:27:28 2010
@@ -1,16 +1,12 @@
 Apache Tuscany SCA Runtime
 ==========================
 
-Automated installation on Ubuntu 10.04
-======================================
+Automated installation on Ubuntu 10.10 64-bit
+=============================================
 
 Tuscany provides two automated install scripts for Ubuntu. You can start with
-a fresh Ubuntu Server 10.04 system and these scripts will take care of all the
-download, build and installation steps for you.
-
-ubuntu/ubuntu-install:
-Minimum build and installation using dependencies (Apache HTTPD server,
-Memcached etc) from your Ubuntu 10.04 system.
+a fresh Ubuntu Server 10.10 64-bit system and these scripts will take care of
+all the download, build and installation steps for you.
 
 ubuntu/ubuntu-install-all:
 Complete build and installation with most dependencies built from source.
@@ -21,14 +17,14 @@ dependencies are downloaded and built in
 To run the automated installation:
 mkdir tuscany
 cd tuscany
-wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install
-chmod +x ./ubuntu-install
-./ubuntu-install
+wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all
+chmod +x ./ubuntu-install-all
+./ubuntu-install-all
 
 The installation script will display each command as it's executed.
 
 That's all you need to do to build and install the Tuscany SCA runtime on
-Ubuntu 10.04.
+Ubuntu 10.10 64-bit.
 
 For manual build and install steps on other systems or if you need to customize
 your installation, read on...
@@ -40,30 +36,23 @@ Building
 The Tuscany SCA Linux build uses the GNU Autotools tool chain.
 
 First install the following development tools:
-autoconf-2.64
+autoconf-2.67
 automake-1.11
 libtool-2.2.6
-doxygen-1.6.1
-gcc-g++-4.5
-
-The GCC 4.5 compiler may not yet be included in your Linux distribution.
-GCC 4.5 Ubuntu / Debian packages can be downloaded from:
-http://ftp.debian.org/debian/pool/main/g/gcc-4.5/
-
-To download and setup GCC 4.5 on Ubuntu 10.04, run this script:
-http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-gcc-4.5
-
+doxygen-1.7.1
+gcc-g++-4.4.5
 
 Then install the following development dependencies:
 
 Apache HTTP server and APR:
 httpd-2.3.8 (http://httpd.apache.org/)
 with included libapr and libaprutil
-built with OpenSSL libssl-0.9.8g
+built with OpenSSL libssl-0.9.8, libpcre3-8.02,
+and expat 2.0.1
 
 Memcached:
 memcached-1.4.5 (http://memcached.org/)
-built with libevent-1.4.11
+built with libevent-1.4.13
 
 XML:
 libxml2-2.7.7 (http://xmlsoft.org/)
@@ -86,12 +75,12 @@ Apache Axis2/C 1.6.0 (http://ws.apache.o
 
 Queueing:
 Apache Qpid/C++ 0.6 (http://qpid.apache.org/)
-built with libuuid-2.16, libboost-1.38.1, libboost-program-options-1.38.1 and
-libboost-filesystem-1.38.1
+built with libuuid-2.17.2, libboost-1.42.0, libboost-program-options-1.42.0 and
+libboost-filesystem-1.42.0
 
 Python:
-Python 2.6.4 (http://www.python.org/)
-Google AppEngine 1.3.7 (http://code.google.com/appengine/)
+Python 2.6.6 (http://www.python.org/)
+Google AppEngine 1.3.8 (http://code.google.com/appengine/)
 
 Java:
 a Java 5+ JDK (http://openjdk.java.net/, http://harmony.apache.org/)
@@ -111,7 +100,6 @@ Apache Vysper 0.5 (http://mina.apache.or
 
 Libstrophe (http://code.stanziq.com/strophe/)
 build it from source at git://github.com/jsdelfino/libstrophe.git
-requires Expat 2.0.1 (http://sourceforge.net/projects/expat/)
 
 SQL Database:
 postgresql-9.0.1 (http://www.postgresql.org/)
@@ -174,7 +162,7 @@ in the configure help:
 ./configure --help
 
 
-Here's an example configuration, tested on Ubuntu 10.04, with the system
+Here's an example configuration tested on Ubuntu 10.10 64-bit, with the system
 dependencies installed in the standard system directories and some of the
 dependencies installed under $HOME:
 
@@ -226,163 +214,3 @@ Installing
 To install the Tuscany SCA binaries, do this:
 make install
 
-
-Building dependencies from source
-=================================
-
-Here are example build and install steps for some of the dependencies.
-
-Apache HTTPD, including APR, using the HTTP prefork MPM (recommended):
-wget http://archive.apache.org/dist/httpd/httpd-2.3.8.tar.gz
-tar xzf httpd-2.3.8.tar.gz
-cd httpd-2.3.8
-./configure --enable-ssl --enable-proxy --enable-usertrack \
---with-included-apr --with-mpm=prefork --prefix=$HOME/httpd-2.3.8-bin
-make
-make install
-export PATH=$HOME/httpd-2.3.8-bin/bin:$PATH
-
-Memcached:
-wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
-tar xzf memcached-1.4.5.tar.gz
-cd memcached-1.4.5
-./configure --prefix=$HOME/memcached-1.4.5-bin
-make
-make install
-
-TinyCDB:
-wget http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz
-tar xzf tinycdb_0.77.tar.gz
-cd tinycdb-0.77
-make
-make prefix=$HOME/tinycdb-0.77-bin install
-
-CURL:
-wget http://curl.haxx.se/download/curl-7.19.5.tar.gz
-tar xzf curl-7.19.5.tar.gz
-cd curl-7.19.5
-./configure --prefix=$HOME/curl-7.19.5-bin
-make
-make install
-
-Libxml2:
-wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.7.tar.gz
-tar xzf libxml2-sources-2.7.7.tar.gz
-cd libxml2-2.7.7
-./configure --prefix=$HOME/libxml2-2.7.7-bin 
-make
-make install
-
-TraceMonkey:
-wget http://hg.mozilla.org/tracemonkey/archive/e4364736e170.tar.gz
-tar xzf tracemonkey-e4364736e170.tar.gz
-cd tracemonkey-e4364736e170/js/src
-autoconf2.13
-./configure --prefix=$HOME/tracemonkey-bin
-make
-make install
-
-Apache Axis2/C:
-wget http://www.apache.org/dist/ws/axis2-c/1_6_0/axis2c-src-1.6.0.tar.gz
-tar xzf axis2c-src-1.6.0.tar.gz
-cd axis2c-src-1.6.0
-./configure --enable-libxml2 --enable-openssl \
---with-apache2=$HOME/httpd-2.3.8-bin/include --prefix=$HOME/axis2c-1.6.0-bin
-make
-make install
-export AXIS2C_HOME=$HOME/axis2c-1.6.0-bin
-
-Apache Qpid/C++:
-wget http://www.apache.org/dist/qpid/0.6/qpid-cpp-0.6.tar.gz
-tar xzf qpid-cpp-0.6.tar.gz
-cd qpidc-0.6
-./configure --prefix=$HOME/qpidc-0.6-bin
-make
-make install
-
-Libexpat:
-wget http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
-tar xzf expat-2.0.1.tar.gz
-cd expat-2.0.1
-./configure --prefix=$HOME/expat-2.0.1-bin
-make
-make install
-
-Libstrophe:
-git clone git://github.com/jsdelfino/libstrophe.git
-cd libstrophe
-./bootstrap.sh
-./configure --prefix=$HOME/libstrophe-bin --with-expat=$HOME/expat-2.0.1-bin
-make
-make install
-
-HTML Tidy:
-cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy
-cd tidy
-build/gnuauto/setup.sh
-./configure --prefix=$HOME/htmltidy-bin
-make
-make install
-
-Libopkele:
-git clone git://github.com/jsdelfino/libopkele.git
-cd libopkele
-./autogen.bash
-./configure --prefix=$HOME/libopkele-bin --with-curl=$HOME/curl-7.19.5-bin \
---with-expat=$HOME/expat-2.0.1-bin --with-htmltidy=$HOME/htmltidy-bin
-
-Mod_auth_openid:
-git clone git://github.com/jsdelfino/mod_auth_openid.git
-cd mod_auth_openid
-./autogen.sh
-./configure --prefix=$HOME/mod-auth-openid-bin \
---with-apr=$HOME/httpd-2.3.8-bin --with-httpd=$HOME/httpd-2.3.8-bin \
---with-curl=$HOME/curl-7.19.5-bin --with-libopkele=$HOME/libopkele-bin
-make
-make install
-
-PostgreSQL:
-wget ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v9.0.1/postgresql-9.0.1.tar.gz
-tar xzf postgresql-9.0.1.tar.gz
-cd postgresql-9.0.1
-./configure --prefix=$HOME/postgresql-9.0.1-bin
-make
-make install
-
-Apache Thrift (including Facebook fb303):
-wget http://www.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
-tar xzf thrift-0.2.0-incubating.tar.gz
-cd thrift-0.2.0
-./bootstrap.sh
-./configure --prefix=$HOME/thrift-0.2.0-bin --with-java=no --with-erlang=no \
---with-perl=no --with-ruby=no --with-csharp=no --disable-static
-make
-make install
-cd contrib/fb303
-./bootstrap.sh
-./configure --prefix=$HOME/thrift-0.2.0-bin/contrib/fb303 \
-PY_PREFIX=$HOME/thrift-0.2.0-bin/contrib/fb303 \
---with-thriftpath=$HOME/thrift-0.2.0-bin
-make
-make install
-cp cpp/lib/libfb303.so $HOME/thrift-0.2.0-bin/contrib/fb303/lib
-
-Facebook Scribe:
-wget http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz
-tar xzf scribe-2.2.tar.gz
-cd scribe
-./bootstrap.sh --prefix=$HOME/scribe-2.2-bin PY_PREFIX=$HOME/scribe-2.2-bin \
---with-thriftpath=$HOME/thrift-0.2.0-bin \
---with-fb303path=$HOME/thrift-0.2.0-bin/contrib/fb303 \
---disable-static
-make
-make install
-cp src/lib/libscribe.so $HOME/scribe-2.2-bin/lib
-
-Apache Libcloud:
-wget http://www.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.3.1.tar.bz2
-tar xjf apache-libcloud-incubating-0.3.1.tar.bz2
-cd apache-libcloud-0.3.1
-python setup.py build
-python setup.py install --home $HOME/libcloud-0.3.1-bin
-

Modified: tuscany/sca-cpp/trunk/README
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/README?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/README (original)
+++ tuscany/sca-cpp/trunk/README Sun Nov 14 09:27:28 2010
@@ -86,7 +86,7 @@ Here's a rough guide to the Tuscany SCA 
  |   |   |-- store-sql        Online store using an SQL database
  |   |   |-- store-vhost      Online store on virtual hosts
  |   |
- |   |-- ubuntu               Automated install on Ubuntu 9.10
+ |   |-- ubuntu               Automated install on Ubuntu 10.10 64-bit
  |
  |-- branches                 Topic and release branches
  |

Modified: tuscany/sca-cpp/trunk/components/chat/xmpp.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/chat/xmpp.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/chat/xmpp.hpp (original)
+++ tuscany/sca-cpp/trunk/components/chat/xmpp.hpp Sun Nov 14 09:27:28 2010
@@ -87,8 +87,8 @@ private:
     friend void connHandler(xmpp_conn_t * const conn, const xmpp_conn_event_t status, const int err, xmpp_stream_error_t* const errstream, void *const udata);
     friend int messageHandler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* const udata);
     friend const failable<bool> connect(XMPPClient& xc);
-    friend const failable<int> send(const char* data, const int len, XMPPClient& xc);
-    friend const failable<int> send(xmpp_stanza_t* const stanza, XMPPClient& xc);
+    friend const failable<size_t> send(const char* data, const size_t len, XMPPClient& xc);
+    friend const failable<size_t> send(xmpp_stanza_t* const stanza, XMPPClient& xc);
     friend const failable<bool> post(const value& to, const value& val, XMPPClient& xc);
     friend const failable<bool> disconnect(XMPPClient& xc);
     friend const failable<bool> listen(const lambda<failable<bool>(const value&, const value&, XMPPClient&)>& listener, XMPPClient& xc);
@@ -227,13 +227,13 @@ const failable<bool> connect(XMPPClient&
 /**
  * Send a buffer on an XMPP session.
  */
-const failable<int> send(const char* data, const int len, XMPPClient& xc) {
+const failable<size_t> send(const char* data, const size_t len, XMPPClient& xc) {
     if (len == 0)
         return 0;
-    const int written = xc.conn->tls? tls_write(xc.conn->tls, data, len) : sock_write(xc.conn->sock, data, len);
-    if (written < 0) {
+    const size_t written = xc.conn->tls? tls_write(xc.conn->tls, data, len) : sock_write(xc.conn->sock, data, len);
+    if (written == (size_t)-1) {
         xc.conn->error = xc.conn->tls? tls_error(xc.conn->tls) : sock_error();
-        return mkfailure<int>("Couldn't send stanza to XMPP server");
+        return mkfailure<size_t>("Couldn't send stanza to XMPP server");
     }
     return send(data + written, len - written, xc);
 }
@@ -241,20 +241,20 @@ const failable<int> send(const char* dat
 /**
  * Send a string on an XMPP session.
  */
-const failable<int> send(const string& data, XMPPClient& xc) {
+const failable<size_t> send(const string& data, XMPPClient& xc) {
     return send(c_str(data), length(data), xc);
 }
 
 /**
  * Send a stanza on an XMPP session.
  */
-const failable<int> send(xmpp_stanza_t* const stanza, XMPPClient& xc) {
+const failable<size_t> send(xmpp_stanza_t* const stanza, XMPPClient& xc) {
     char *buf;
     size_t len;
     const int rc = xmpp_stanza_to_text(stanza, &buf, &len);
      if (rc != 0)
-         return mkfailure<int>("Couldn't convert stanza to text");
-     const failable<int> r = send(buf, len, xc);
+         return mkfailure<size_t>("Couldn't convert stanza to text");
+     const failable<size_t> r = send(buf, len, xc);
      if (!hasContent(r)) {
          xmpp_free(xc.conn->ctx, buf);
          return r;
@@ -283,7 +283,7 @@ const failable<bool> post(const value& t
     xmpp_stanza_add_child(body, textStanza(c_str(vs), xc.ctx));
 
     // Send it
-    const failable<int> r = send(stanza, xc);
+    const failable<size_t> r = send(stanza, xc);
     xmpp_stanza_release(stanza);
     if (!hasContent(r))
         return mkfailure<bool>(reason(r));
@@ -295,7 +295,7 @@ const failable<bool> post(const value& t
  */
 const failable<bool> disconnect(XMPPClient& xc) {
     xc.disconnecting = true;
-    const failable<int> r = send("</stream:stream>", xc);
+    const failable<size_t> r = send("</stream:stream>", xc);
     if (!hasContent(r))
         return mkfailure<bool>(reason(r));
     return true;

Modified: tuscany/sca-cpp/trunk/components/log/Makefile.am
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/log/Makefile.am?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/log/Makefile.am (original)
+++ tuscany/sca-cpp/trunk/components/log/Makefile.am Sun Nov 14 09:27:28 2010
@@ -43,15 +43,17 @@ CLEANFILES = gen-cpp/*
 comp_LTLIBRARIES = liblog.la liblogger.la
 noinst_DATA = liblog.so liblogger.so
 
+CXXFLAGS = ${DEFAULT_CXXFLAGS} -Wno-unused-parameter -Wno-conversion
+
 nodist_liblog_la_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h
-liblog_la_CXXFLAGS = -Wno-unused-parameter
+liblog_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion
 liblog_la_SOURCES = log.cpp
 liblog_la_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe
 liblog.so:
 	ln -s .libs/liblog.so
 
 nodist_liblogger_la_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h
-liblogger_la_CXXFLAGS = -Wno-unused-parameter
+liblogger_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion
 liblogger_la_SOURCES = logger.cpp
 liblogger_la_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe
 liblogger.so:
@@ -60,7 +62,7 @@ liblogger.so:
 comp_PROGRAMS = scribe-cat
 
 nodist_scribe_cat_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h
-scribe_cat_CXXFLAGS = -Wno-unused-parameter
+scribe_cat_CXXFLAGS = -Wno-unused-parameter -Wno-conversion
 scribe_cat_SOURCES = scribe-cat.cpp
 scribe_cat_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe
 

Modified: tuscany/sca-cpp/trunk/components/log/scribe.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/log/scribe.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/log/scribe.hpp (original)
+++ tuscany/sca-cpp/trunk/components/log/scribe.hpp Sun Nov 14 09:27:28 2010
@@ -35,12 +35,21 @@
 #undef PACKAGE_VERSION
 #undef VERSION
 
+// Ignore integer conversion issues in Thrift and Scribe headers
+#ifdef WANT_MAINTAINER_MODE
+#pragma GCC diagnostic ignored "-Wconversion"
+#endif
+
 #include <protocol/TBinaryProtocol.h>
 #include <transport/TSocket.h>
 #include <transport/TTransportUtils.h>
 
 #include "gen-cpp/scribe.h"
 
+#ifdef WANT_MAINTAINER_MODE
+#pragma GCC diagnostic warning "-Wconversion"
+#endif
+
 #include "string.hpp"
 #include "list.hpp"
 #include "value.hpp"

Modified: tuscany/sca-cpp/trunk/components/nosqldb/tinycdb.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/nosqldb/tinycdb.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/nosqldb/tinycdb.hpp (original)
+++ tuscany/sca-cpp/trunk/components/nosqldb/tinycdb.hpp Sun Nov 14 09:27:28 2010
@@ -316,7 +316,7 @@ struct postFinish {
     postFinish(const string& ks, const string& vs) : ks(ks), vs(vs) {
     }
     const failable<bool> operator()(struct cdb_make& cdbm) const {
-        if (cdb_make_add(&cdbm, c_str(ks), length(ks), c_str(vs), length(vs)) == -1)
+        if (cdb_make_add(&cdbm, c_str(ks), (unsigned int)length(ks), c_str(vs), (unsigned int)length(vs)) == -1)
             return mkfailure<bool>("Could not add tinycdb entry");
         return true;
     }
@@ -362,7 +362,7 @@ struct putFinish {
     putFinish(const string& ks, const string& vs) : ks(ks), vs(vs) {
     }
     const failable<bool> operator()(struct cdb_make& cdbm) const {
-        if (cdb_make_add(&cdbm, c_str(ks), length(ks), c_str(vs), length(vs)) == -1)
+        if (cdb_make_add(&cdbm, c_str(ks), (unsigned int)length(ks), c_str(vs), (unsigned int)length(vs)) == -1)
             return mkfailure<bool>("Could not add tinycdb entry");
         return true;
     }
@@ -403,7 +403,7 @@ const failable<value> get(const value& k
     const string ks(scheme::writeValue(key));
 
     cdbi_t vlen;
-    if (cdb_seek(fd, c_str(ks), length(ks), &vlen) <= 0)
+    if (cdb_seek(fd, c_str(ks), (unsigned int)length(ks), &vlen) <= 0)
         return mkfailure<value>("Could not get tinycdb entry");
     char* data = gc_cnew(vlen + 1);
     cdb_bread(fd, data, vlen);

Modified: tuscany/sca-cpp/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/configure.ac?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/configure.ac (original)
+++ tuscany/sca-cpp/trunk/configure.ac Sun Nov 14 09:27:28 2010
@@ -424,35 +424,44 @@ if test "${want_java}" = "true"; then
   AC_SUBST(JAR)
 
   # Detect most common Java VMs
-  if test -f "${JAVA_PREFIX}/jre/lib/i386/libjava.so"; then
-    if test -f "${JAVA_PREFIX}/jre/lib/i386/server/libjvm.so"; then
-      # Server VM
-      AC_MSG_NOTICE([checking for server Java VM])
-      JAVA_CHECK_LIB="-L${JAVA_PREFIX}/jre/lib/i386 -R${JAVA_PREFIX}/jre/lib/i386 -L${JAVA_PREFIX}/jre/lib/i386/server -R${JAVA_PREFIX}/jre/lib/i386/server"
+  JAVA_LIBJAVA_SO=`find ${JAVA_PREFIX}/jre/lib -name libjava.so`
+  if test "${JAVA_LIBJAVA_SO}" != ""; then
+    JAVA_LIBJAVA=`dirname "${JAVA_LIBJAVA_SO}"`
+    JAVA_LIBJVM_SO=`find ${JAVA_PREFIX}/jre/lib -name libjvm.so`
+    JAVA_J9_VM=`echo "${JAVA_LIBJVM}" | grep "j9vm"`
+    if test "${JAVA_J9_VM}" != ""; then
+      # IBM J9 VM
+      AC_MSG_NOTICE([checking for J9 Java VM])
+      JAVA_LIBJVM=`dirname "${JAVA_LIBJVM_SO}"`
+      JAVA_CHECK_LIB="-L${JAVA_LIBJAVA} -R${JAVA_LIBJAVA} -L${JAVA_LIBJVM} -R${JAVA_LIBJVM}"
       LIBS="${JAVA_CHECK_LIB} ${defaultlibs}"
-      AC_CHECK_LIB([java], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -ljava -ljvm -lverify"], [], [-ljvm -lverify])
+      AC_CHECK_LIB([java], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -ljava -ljvm -ljsig"], [], [-ljvm -ljsig])
       if test "${JAVA_LDFLAGS}" != ""; then
-        AC_DEFINE([JAVA_SERVER_VM], 1, [Server Java VM])
+        AC_DEFINE([JAVA_J9_VM], 1, [J9 Java VM])
       fi
     else
-      if test -f "${JAVA_PREFIX}/jre/lib/i386/j9vm/libjvm.so"; then
-        # J9 VM
-        AC_MSG_NOTICE([checking for J9 Java VM])
-        JAVA_CHECK_LIB="-L${JAVA_PREFIX}/jre/lib/i386 -R${JAVA_PREFIX}/jre/lib/i386 -L${JAVA_PREFIX}/jre/lib/i386/j9vm -R${JAVA_PREFIX}/jre/lib/i386/j9vm"
-        LIBS="${JAVA_CHECK_LIB} ${defaultlibs}"
-        AC_CHECK_LIB([java], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -ljava -ljvm -ljsig"], [], [-ljvm -ljsig])
-        if test "${JAVA_LDFLAGS}" != ""; then
-          AC_DEFINE([JAVA_J9_VM], 1, [J9 Java VM])
-        fi
+      # SUN JDK or OpenJDK VM
+      AC_MSG_NOTICE([checking for OpenJDK Java VM])
+      JAVA_LIBJVM_SO=`find ${JAVA_PREFIX}/jre/lib -name libjvm.so | grep server`
+      JAVA_LIBJVM=`dirname "${JAVA_LIBJVM_SO}"`
+      AC_MSG_NOTICE([libjava ${JAVA_LIBJAVA} libjvm ${LIBJVM}])
+      JAVA_CHECK_LIB="-L${JAVA_LIBJAVA} -R${JAVA_LIBJAVA} -L${JAVA_LIBJVM} -R${JAVA_LIBJVM}"
+      LIBS="${JAVA_CHECK_LIB} ${defaultlibs}"
+      AC_CHECK_LIB([java], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -ljava -ljvm -lverify"], [], [-ljvm -lverify])
+      if test "${JAVA_LDFLAGS}" != ""; then
+        AC_DEFINE([JAVA_OPENJDK_VM], 1, [OpenJDK Java VM])
       fi
     fi
   else
-    if test -f "${JAVA_PREFIX}/jre/bin/default/libharmonyvm.so"; then
+    JAVA_LIBHARMONYVM_SO=`find ${JAVA_PREFIX}/jre/bin -name libharmonyvm.so`
+    if test "${JAVA_LIBHARMONYVM_SO}" != ""; then
       # Apache Harmony VM
+      JAVA_LIBHARMONYVM=`dirname "${JAVA_LIBHARMONYVM_SO}"`
+      JAVA_LIBJAVA=`dirname "${JAVA_LIBHARMONYVM}"`
       AC_MSG_NOTICE([checking for Apache Harmony Java VM])
-      JAVA_CHECK_LIB="-L${JAVA_PREFIX}/jre/bin -R${JAVA_PREFIX}/jre/bin -L${JAVA_PREFIX}/jre/bin/default -R${JAVA_PREFIX}/jre/bin/default"
+      JAVA_CHECK_LIB="-L${JAVA_LIBJAVA} -R${JAVA_LIBJAVA} -L${JAVA_LIBHARMONYVM} -R${JAVA_LIBHARMONYVM}"
       LIBS="${JAVA_CHECK_LIB} ${defaultlibs}"
-      AC_CHECK_LIB([harmonyvm], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -lharmonyvm -lhythr -licuuc -lch ${JAVA_PREFIX}/jre/bin/default/libicudata.so.34"], [], [-lhythr -licuuc -lch ${JAVA_PREFIX}/jre/bin/default/libicudata.so.34])
+      AC_CHECK_LIB([harmonyvm], [JNI_CreateJavaVM], [JAVA_LDFLAGS="${JAVA_CHECK_LIB} -lharmonyvm -lhythr -licuuc -lch ${JAVA_LIBHARMONYVM}/libicudata.so.34"], [], [-lhythr -licuuc -lch ${JAVA_LIBHARMONYVM}/libicudata.so.34])
       if test "${JAVA_LDFLAGS}" != ""; then
         AC_DEFINE([JAVA_HARMONY_VM], 1, [Apache Harmony Java VM])
       fi
@@ -868,8 +877,10 @@ else
 fi
 
 # Configure GCC C++ and LD options.
+AC_SUBST([DEFAULT_CXXFLAGS], ["${cxxflags}"])
 AC_SUBST([CXXFLAGS], ["${cxxflags}"])
 AC_SUBST([LDFLAGS], ["${ldflags}"])
+AC_SUBST([DEFAULT_LDFLAGS], ["${ldflags}"])
 LIBS="${defaultlibs}"
 
 AC_CONFIG_FILES([Makefile

Modified: tuscany/sca-cpp/trunk/kernel/fstream.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/fstream.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/fstream.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/fstream.hpp Sun Nov 14 09:27:28 2010
@@ -101,7 +101,7 @@ public:
         fclose(file);
     }
 
-    const int read(void* buf, int size) {
+    const size_t read(void* buf, size_t size) {
         return fread(buf, 1, size, file);
     }
 

Modified: tuscany/sca-cpp/trunk/kernel/function.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/function.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/function.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/function.hpp Sun Nov 14 09:27:28 2010
@@ -83,7 +83,7 @@ public:
     Callable() {
     }
 
-    virtual const int size() const = 0;
+    virtual const size_t size() const = 0;
 
     virtual const R operator()(P... p) const = 0;
 
@@ -110,7 +110,7 @@ public:
             return function(std::forward<P>(p)...);
         }
 
-        virtual const int size() const {
+        virtual const size_t size() const {
             return sizeof(function);
         }
 

Modified: tuscany/sca-cpp/trunk/kernel/gc.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/gc.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/gc.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/gc.hpp Sun Nov 14 09:27:28 2010
@@ -244,40 +244,40 @@ template<typename T> T* gc_new() {
 }
 
 template<typename T> apr_status_t gc_pool_acleanup(void* v) {
-    int* m = static_cast<int*>(v);
-    int n = *m;
+    size_t* m = static_cast<size_t*>(v);
+    size_t n = *m;
     T* t = (T*)(m + 1);
-    for (int i = 0; i < n; i++, t++)
+    for (size_t i = 0; i < n; i++, t++)
         t->~T();
     return APR_SUCCESS;
 }
 
-template<typename T> T* gc_anew(apr_pool_t* p, int n) {
-    int* gc_anew_ptr = static_cast<int*>(apr_palloc(p, sizeof(int) + sizeof(T[n])));
+template<typename T> T* gc_anew(apr_pool_t* p, size_t n) {
+    size_t* gc_anew_ptr = static_cast<size_t*>(apr_palloc(p, sizeof(size_t) + sizeof(T[n])));
     assert(gc_anew_ptr != NULL);
     *gc_anew_ptr = n;
     apr_pool_cleanup_register(p, gc_anew_ptr, gc_pool_acleanup<T>, apr_pool_cleanup_null) ;
     return (T*)(gc_anew_ptr + 1);
 }
 
-template<typename T> T* gc_anew(const gc_pool& p, int n) {
+template<typename T> T* gc_anew(const gc_pool& p, size_t n) {
     return gc_anew<T>(pool(p), n);
 }
 
-template<typename T> T* gc_anew(int n) {
+template<typename T> T* gc_anew(size_t n) {
     return gc_anew<T>(gc_current_pool(), n);
 }
 
 /**
  * Allocate an array of chars.
  */
-char* gc_cnew(apr_pool_t* p, int n) {
+char* gc_cnew(apr_pool_t* p, size_t n) {
     char* gc_cnew_ptr = static_cast<char*>(apr_palloc(p, n));
     assert(gc_cnew_ptr != NULL);
     return gc_cnew_ptr;
 }
 
-char* gc_cnew(int n) {
+char* gc_cnew(size_t n) {
     return gc_cnew(gc_current_pool(), n);
 }
 

Modified: tuscany/sca-cpp/trunk/kernel/hash.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/hash.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/hash.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/hash.hpp Sun Nov 14 09:27:28 2010
@@ -43,8 +43,8 @@ namespace tuscany
  * tree at contrib/ltree/crc32.[ch] and from FreeBSD at
  * src/usr.bin/cksum/crc32.c.
  */
-const unsigned int crc32hash(const char* data, const unsigned int len) {
-    return apr_memcache_hash_default(NULL, data, len);
+const unsigned int crc32hash(const char* data, const size_t len) {
+    return (unsigned int)apr_memcache_hash_default(NULL, data, len);
 }
 
 /**
@@ -89,7 +89,7 @@ const unsigned int crc32hash(const char*
  *
  *                  -- Ralf S. Engelschall <rs...@engelschall.com>
  */
-const unsigned int times33hash(const char* data, const unsigned int len) {
+const unsigned int times33hash(const char* data, const size_t len) {
     apr_ssize_t l = len;
     return apr_hashfunc_default(data, &l);
 }
@@ -107,8 +107,8 @@ const unsigned int times33hash(const cha
  * Passes Bob Jenkin's frog.c torture-test. No collisions possible for 4 byte
  * keys, no small 1 to 7 bit differentials.
  */
-const unsigned int murmurhash(const char* key, const unsigned int klen) {
-    unsigned int len = klen;
+const unsigned int murmurhash(const char* key, const size_t klen) {
+    unsigned int len = (unsigned int)klen;
     const unsigned int seed = 0;
 
     // 'm' and 'r' are mixing constants generated offline.
@@ -153,8 +153,8 @@ const unsigned int murmurhash(const char
  * An endian and alignment neutral, but half the speed, version of
  * the murmur hash.
  */
-const unsigned int portablemurmurhash(const char* key, const unsigned int klen) {
-    unsigned int len = klen;
+const unsigned int portablemurmurhash(const char* key, const size_t klen) {
+    unsigned int len = (unsigned int)klen;
     const unsigned int seed = 0;
 
     // 'm' and 'r' are mixing constants generated offline.

Modified: tuscany/sca-cpp/trunk/kernel/list.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/list.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/list.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/list.hpp Sun Nov 14 09:27:28 2010
@@ -379,14 +379,14 @@ template<typename T> const list<T> cdddr
  * Returns the length of a list.
  */
 template<typename T> struct lengthRef {
-    const int operator()(const int c, const list<T>& p) {
+    const size_t operator()(const size_t c, const list<T>& p) {
         if(isNil(p))
             return c;
         return (*this)(c + 1, cdr(p));
     }
 };
 
-template<typename T> const int length(const list<T>& p) {
+template<typename T> const size_t length(const list<T>& p) {
     return lengthRef<T> ()(0, p);
 }
 
@@ -537,7 +537,7 @@ template<typename T> const list<T> seq(c
 /**
  * Returns the i-th element of a list.
  */
-template<typename T> const T listRef(const list<T>& l, const int i) {
+template<typename T> const T listRef(const list<T>& l, const size_t i) {
     if (i == 0)
         return car(l);
     return listRef(cdr(l), i - 1);

Modified: tuscany/sca-cpp/trunk/kernel/parallel.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/parallel.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/parallel.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/parallel.hpp Sun Nov 14 09:27:28 2010
@@ -42,7 +42,7 @@ namespace tuscany {
 /**
  * Returns the current thread id.
  */
-unsigned int threadId() {
+long int threadId() {
     return syscall(__NR_gettid);
 }
 
@@ -134,7 +134,7 @@ public:
  */
 template<typename T> class wqueue {
 public:
-    wqueue(int max) : max(max), size(0), tail(0), head(0), values(new (gc_anew<T>(max)) T[max]) {
+    wqueue(size_t max) : max(max), size(0), tail(0), head(0), values(new (gc_anew<T>(max)) T[max]) {
         pthread_mutex_init(&mutex, NULL);
         pthread_cond_init(&full, NULL);
         pthread_cond_init(&empty, NULL);
@@ -150,23 +150,23 @@ public:
     }
 
 private:
-    const int max;
-    int size;
-    int tail;
-    int head;
+    const size_t max;
+    size_t size;
+    size_t tail;
+    size_t head;
     pthread_mutex_t mutex;
     pthread_cond_t full;
     pthread_cond_t empty;
     gc_ptr<T> values;
 
-    template<typename X> friend const int enqueue(wqueue<X>& q, const X& v);
+    template<typename X> friend const size_t enqueue(wqueue<X>& q, const X& v);
     template<typename X> friend const X dequeue(wqueue<X>& q);
 };
 
 /**
  * Adds an element to the tail of the queue.
  */
-template<typename T> const int enqueue(wqueue<T>&q, const T& v) {
+template<typename T> const size_t enqueue(wqueue<T>&q, const T& v) {
     pthread_mutex_lock(&q.mutex);
     while(q.size == q.max)
         pthread_cond_wait(&q.full, &q.mutex);
@@ -211,7 +211,7 @@ void *workerThreadFunc(void *arg) {
 /**
  * Returns a list of worker threads.
  */
-const list<pthread_t> workerThreads(wqueue<lambda<bool()> >& wqueue, const int count) {
+const list<pthread_t> workerThreads(wqueue<lambda<bool()> >& wqueue, const size_t count) {
     if (count == 0)
         return list<pthread_t>();
     pthread_t thread;
@@ -229,7 +229,7 @@ private:
     // copies of the queue and thread pool when a worker is copied 
     class sharedWorker {
     public:
-        sharedWorker(int max) : work(wqueue<lambda<bool()> >(max)), threads(workerThreads(work, max)) {
+        sharedWorker(size_t max) : work(wqueue<lambda<bool()> >(max)), threads(workerThreads(work, max)) {
         }
 
         wqueue<lambda<bool()> > work;
@@ -237,7 +237,7 @@ private:
     };
 
 public:
-    worker(int max) : w(*(new (gc_new<sharedWorker>()) sharedWorker(max))) {
+    worker(size_t max) : w(*(new (gc_new<sharedWorker>()) sharedWorker(max))) {
     }
 
     worker(const worker& wk) : w(wk.w) {

Modified: tuscany/sca-cpp/trunk/kernel/sstream.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/sstream.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/sstream.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/sstream.hpp Sun Nov 14 09:27:28 2010
@@ -60,10 +60,11 @@ public:
 
     ostringstream& vprintf(const char* fmt, ...) {
         va_list args;
-        va_start (args, fmt);
         string s;
+        va_start (args, fmt);
         s.len = vsnprintf(NULL, 0, fmt, args);
         s.buf = gc_cnew(s.len + 1);
+        va_start (args, fmt);
         vsnprintf(s.buf, s.len + 1, fmt, args);
         buf = cons(s, buf);
         len += s.len;
@@ -104,7 +105,7 @@ private:
 
     friend const string str(ostringstream& os);
 
-    int len;
+    size_t len;
     list<string> buf;
 };
 
@@ -122,7 +123,7 @@ class istringstream : public istream {
 public:
     istringstream(const string& s) {
         cur = 0;
-        const int slen = length(s);
+        const size_t slen = length(s);
         len = slen;
         buf = c_str(s);
       }
@@ -136,8 +137,8 @@ public:
         buf = is.buf;
     }
 
-    const int read(void* b, int size) {
-        const int n = len - cur;
+    const size_t read(void* b, size_t size) {
+        const size_t n = len - cur;
         if (n == 0)
             return 0;
         if (n > size) {
@@ -173,8 +174,8 @@ public:
     }
 
 private:
-    int len;
-    int cur;
+    size_t len;
+    size_t cur;
     const char* buf;
 };
 
@@ -183,10 +184,10 @@ private:
  */
 const list<string> tokenize(const char* sep, const string& str) {
     struct nested {
-        static const list<string> tokenize(const char* sep, const string& str, const int start = 0) {
+        static const list<string> tokenize(const char* sep, const string& str, const size_t start = 0) {
             if (start >= length(str))
                 return list<string>();
-            const int i = find(str, sep, start);
+            const size_t i = find(str, sep, start);
             if (i == length(str))
                 return mklist(string(substr(str, start)));
             return cons(string(substr(str, start, i - start)), tokenize(sep, str, i + 1));
@@ -222,7 +223,7 @@ struct ilistRead{
     }
     const list<string> operator()() {
         char buffer[1024];
-        const int n = read(is, buffer, sizeof(buffer));
+        const size_t n = read(is, buffer, sizeof(buffer));
         if (n ==0)
             return list<string>();
         return cons(string(buffer, n), (*this)());
@@ -236,7 +237,7 @@ const list<string> streamList(istream& i
 /**
  * Fragment the first element of a list of strings to fit the given max length.
  */
-const list<string> fragment(list<string> l, int max) {
+const list<string> fragment(list<string> l, size_t max) {
     const string s = car(l);
     if (length(s) <= max)
         return l;

Modified: tuscany/sca-cpp/trunk/kernel/stream.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/stream.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/stream.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/stream.hpp Sun Nov 14 09:27:28 2010
@@ -106,7 +106,7 @@ ostream& operator<<(ostream& os, unused 
  */
 class istream {
 public:
-    virtual const int read(void* buf, int size) = 0;
+    virtual const size_t read(void* buf, size_t size) = 0;
     virtual const bool eof() = 0;
     virtual const bool fail() = 0;
     virtual const int get() = 0;
@@ -116,7 +116,7 @@ public:
 /**
  * Read from an input stream.
  */
-const int read(istream& is, void * buf, int size) {
+const size_t read(istream& is, void * buf, size_t size) {
     return is.read(buf, size);
 }
 
@@ -164,10 +164,11 @@ public:
 
     odebugstream& vprintf(const char* fmt, ...) {
         va_list args;
-        va_start (args, fmt);
         string s;
+        va_start (args, fmt);
         s.len = vsnprintf(NULL, 0, fmt, args);
         s.buf = gc_cnew(s.len + 1);
+        va_start (args, fmt);
         vsnprintf(s.buf, s.len + 1, fmt, args);
         buf = buf + s;
         va_end (args);

Modified: tuscany/sca-cpp/trunk/kernel/string-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/string-test.cpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/string-test.cpp (original)
+++ tuscany/sca-cpp/trunk/kernel/string-test.cpp Sun Nov 14 09:27:28 2010
@@ -122,11 +122,11 @@ string add(string& x, string& y) {
 char charBuffer[16384];
 
 struct addStrings{
-    const int size;
-    addStrings(const int size) : size(size) {
+    const size_t size;
+    addStrings(const size_t size) : size(size) {
     }
     bool operator()() const {
-        const int sz = size / 4;
+        const size_t sz = size / 4;
         string x(charBuffer, sz);
         string y(charBuffer, sz);
         assert(length(add(x, y)) == sz * 2);
@@ -135,11 +135,11 @@ struct addStrings{
 };
 
 struct addStdStrings{
-    const int size;
-    addStdStrings(const int size) : size(size) {
+    const size_t size;
+    addStdStrings(const size_t size) : size(size) {
     }
     bool operator()() const {
-        const int sz = size / 4;
+        const size_t sz = size / 4;
         std::string x(charBuffer, sz);
         std::string y(charBuffer, sz);
         assert(stdAdd(x, y).length() == (unsigned int)(sz * 2));

Modified: tuscany/sca-cpp/trunk/kernel/string.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/string.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/string.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/string.hpp Sun Nov 14 09:27:28 2010
@@ -94,7 +94,7 @@ public:
         string_memcpy(buf, s, len + 1);
     }
 
-    string(const char* s, const int n) {
+    string(const char* s, const size_t n) {
         len = n;
         if (len == 0) {
             buf = stringEmptyBuffer;
@@ -105,7 +105,7 @@ public:
         buf[len] = '\0';
     }
 
-    string(const int n, const char c) {
+    string(const size_t n, const char c) {
         len = n;
         if (len == 0) {
             buf = stringEmptyBuffer;
@@ -152,7 +152,7 @@ public:
     }
 
     const bool operator<(const string& s) const {
-        const int n = len < s.len? len : s.len;
+        const size_t n = len < s.len? len : s.len;
         const int c = memcmp(buf, s.buf, n);
         if (c < 0)
             return true;
@@ -162,7 +162,7 @@ public:
     }
 
     const bool operator>(const string& s) const {
-        const int n = len < s.len? len : s.len;
+        const size_t n = len < s.len? len : s.len;
         int c = memcmp(buf, s.buf, n);
         if (c > 0)
             return true;
@@ -178,12 +178,12 @@ private:
     friend class ostringstream;
     friend const string operator+(const string& a, const string& b);
     friend const string operator+(const string& a, const char* b);
-    friend const int length(const string& s);
+    friend const size_t length(const string& s);
     friend const char* c_str(const string& s);
-    friend const int find(const string& s1, const char* s2, const int start);
-    friend const string substr(const string& s, const int pos, const int n);
+    friend const size_t find(const string& s1, const char* s2, const size_t start);
+    friend const string substr(const string& s, const size_t pos, const size_t n);
 
-    int len;
+    size_t len;
     char* buf;
 };
 
@@ -202,7 +202,7 @@ const string operator+(const string& a, 
 
 const string operator+(const string& a, const char* b) {
     string s;
-    const int blen = strlen(b);
+    const size_t blen = strlen(b);
     s.len = a.len + blen;
     s.buf = gc_cnew(s.len + 1);
     string_memcpy(s.buf, a.buf, a.len);
@@ -214,7 +214,7 @@ const string operator+(const string& a, 
 /**
  * Returns the length of a string.
  */
-const int length(const string& s) {
+const size_t length(const string& s) {
     return s.len;
 }
 
@@ -228,7 +228,7 @@ const char* c_str(const string& s) {
 /**
  * Find the first occurrence of string s2 in s1, starting at the given position.
  */
-const int find(const string& s1, const char* s2, const int start) {
+const size_t find(const string& s1, const char* s2, const size_t start) {
     if (start >= s1.len)
         return s1.len;
     const char *f = strstr(s1.buf + start, s2);
@@ -237,7 +237,7 @@ const int find(const string& s1, const c
     return f - s1.buf;
 }
 
-const int find(const string& s1, const char* s2) {
+const size_t find(const string& s1, const char* s2) {
     return find(s1, s2, 0);
 }
 
@@ -251,14 +251,14 @@ const bool contains(const string& s1, co
 /**
  * Find the first occurence of any character from a string in a string.
  */
-const int find_first_of(const string& s1, const string& s2) {
+const size_t find_first_of(const string& s1, const string& s2) {
     return strcspn(c_str(s1), c_str(s2));
 }
 
 /**
  * Find the first occurence of a character in a string.
  */
-const int find(const string& s, const char c) {
+const size_t find(const string& s, const char c) {
     const char* cs = c_str(s);
     const char* f = strchr(cs, c);
     if (f == NULL)
@@ -269,7 +269,7 @@ const int find(const string& s, const ch
 /**
  * Find the last occurence of a character in a string.
  */
-const int find_last(const string& s, const char c) {
+const size_t find_last(const string& s, const char c) {
     const char* cs = c_str(s);
     const char* f = strrchr(cs, c);
     if (f == NULL)
@@ -280,7 +280,7 @@ const int find_last(const string& s, con
 /**
  * Return a substring of a string.
  */
-const string substr(const string& s, const int pos, const int n) {
+const string substr(const string& s, const size_t pos, const size_t n) {
     if (pos >= s.len)
         return string();
     if (pos + n > s.len)
@@ -288,7 +288,7 @@ const string substr(const string& s, con
     return string(s.buf + pos, n);
 }
 
-const string substr(const string& s, const int pos) {
+const string substr(const string& s, const size_t pos) {
     return substr(s, pos, length(s));
 }
 

Modified: tuscany/sca-cpp/trunk/kernel/tree.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/tree.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/tree.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/tree.hpp Sun Nov 14 09:27:28 2010
@@ -96,14 +96,14 @@ template<typename T> const list<T> sort(
 /**
  * Make a balanced tree from an ordered list of leaves.
  */
-template<typename T> const list<T> btreeHelper(const list<T>& elements, const int n) {
+template<typename T> const list<T> btreeHelper(const list<T>& elements, const size_t n) {
     if (n == 0)
         return cons<T>(list<T>(), elements);
-    const int leftSize = (n - 1) / 2; {
+    const size_t leftSize = (n - 1) / 2; {
         const list<T> leftResult = btreeHelper<T>(elements, leftSize); {
             const list<T> leftTree = car(leftResult);
             const list<T> nonLeftElements = cdr(leftResult);
-            const int rightSize = n - (leftSize + 1); {
+            const size_t rightSize = n - (leftSize + 1); {
                 const T thisEntry = car(nonLeftElements);
                 const list<T> rightResult = btreeHelper<T>(cdr(nonLeftElements), rightSize); {
                     const list<T> rightTree = car(rightResult);

Modified: tuscany/sca-cpp/trunk/kernel/xml.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/xml.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/xml.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/xml.hpp Sun Nov 14 09:27:28 2010
@@ -196,7 +196,7 @@ int readCallback(void *context, char* bu
     const string s(car(f));
     rc.ilist = cdr(f);
     memcpy(buffer, c_str(s), length(s));
-    return length(s);
+    return (int)length(s);
 }
 
 /**

Modified: tuscany/sca-cpp/trunk/kernel/xsd-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/xsd-test.cpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/xsd-test.cpp (original)
+++ tuscany/sca-cpp/trunk/kernel/xsd-test.cpp Sun Nov 14 09:27:28 2010
@@ -45,7 +45,7 @@ bool printNode(xmlTextReaderPtr reader) 
 }
 
 int xmlRead(void *context, char* buffer, int len) {
-    return fread(buffer, 1, len, (FILE*)context);
+    return (int)fread(buffer, 1, len, (FILE*)context);
 }
 
 int xmlClose(void *context) {

Modified: tuscany/sca-cpp/trunk/modules/http/curl-connect.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/curl-connect.cpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/curl-connect.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/curl-connect.cpp Sun Nov 14 09:27:28 2010
@@ -60,8 +60,8 @@ const bool testConnect(const string& url
             if (pollfds->rtnevents & APR_POLLIN) {
                 char data[8192];
                 if (pollfds->desc.s == csock) {
-                    const int rl = ::read(0, data, sizeof(data));
-                    if (rl == -1)
+                    const size_t rl = ::read(0, data, sizeof(data));
+                    if (rl == (size_t)-1)
                         return false;
                     if (rl > 0) {
                         const failable<bool> src = http::send(data, rl, cs);
@@ -69,12 +69,12 @@ const bool testConnect(const string& url
                     }
                 }
                 else {
-                    const failable<int> frl = http::recv(data, sizeof(data), cs);
+                    const failable<size_t> frl = http::recv(data, sizeof(data), cs);
                     assert(hasContent(frl));
-                    const int rl = content(frl);
+                    const size_t rl = content(frl);
                     if (rl == 0)
                         return true;
-                    const int wl = ::write(0, data, rl);
+                    const size_t wl = ::write(0, data, rl);
                     assert(wl == rl);
                 }
                 continue;

Modified: tuscany/sca-cpp/trunk/modules/http/http.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/http.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/http.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/http.hpp Sun Nov 14 09:27:28 2010
@@ -94,8 +94,8 @@ private:
     friend CURL* handle(const CURLSession& cs);
     friend apr_socket_t* sock(const CURLSession& cs);
     friend const failable<bool> connect(const string& url, CURLSession& cs);
-    friend const failable<bool> send(const char* c, const int l, const CURLSession& cs);
-    friend const failable<int> recv(char* c, const int l, const CURLSession& cs);
+    friend const failable<bool> send(const char* c, const size_t l, const CURLSession& cs);
+    friend const failable<size_t> recv(char* c, const size_t l, const CURLSession& cs);
 
 public:
     string ca;
@@ -257,7 +257,7 @@ template<typename R> const failable<list
     ostringstream os;
     write(cadr(hdr), os);
     const string s = str(os);
-    const int sz = length(s);
+    const size_t sz = length(s);
 
     // Setup the read, write header and write data callbacks
     CURLReadContext rcx(mklist(s));
@@ -564,7 +564,7 @@ const failable<bool> connect(const strin
 /**
  * Send an array of chars.
  */
-const failable<bool> send(const char* c, const int l, const CURLSession& cs) {
+const failable<bool> send(const char* c, const size_t l, const CURLSession& cs) {
 
     // Send the data
     size_t wl = 0;
@@ -582,30 +582,30 @@ const failable<bool> send(const char* c,
         return mkfailure<bool>(apreason(pollrc));
 
     // Send what's left
-    return send(c + wl, (int)((size_t)l - wl), cs);
+    return send(c + wl, l - wl, cs);
 }
 
 /**
  * Receive an array of chars.
  */
-const failable<int> recv(char* c, const int l, const CURLSession& cs) {
+const failable<size_t> recv(char* c, const size_t l, const CURLSession& cs) {
 
     // Receive data
     size_t rl;
     const CURLcode rc = curl_easy_recv(cs.h, c, (size_t)l, &rl);
     if (rc == CURLE_OK)
-        return (int)rl;
+        return (size_t)rl;
     if (rc == 1)
         return 0;
     if (rc != CURLE_AGAIN)
-        return mkfailure<int>(curlreason(rc));
+        return mkfailure<size_t>(curlreason(rc));
 
     // If the socket was not ready, wait for it to become ready
     const apr_pollfd_t* pollfds;
     apr_int32_t pollcount;
     apr_status_t pollrc = apr_pollset_poll(cs.rpollset, -1, &pollcount, &pollfds);
     if (pollrc != APR_SUCCESS)
-        return mkfailure<int>(apreason(pollrc));
+        return mkfailure<size_t>(apreason(pollrc));
 
     // Receive again
     return recv(c, l, cs);

Modified: tuscany/sca-cpp/trunk/modules/http/httpd.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/httpd.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/httpd.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/httpd.hpp Sun Nov 14 09:27:28 2010
@@ -328,7 +328,7 @@ const int setupReadPolicy(request_rec* r
  */
 const list<string> read(request_rec* r) {
     char b[1024];
-    const int n = ap_get_client_block(r, b, sizeof(b));
+    const size_t n = ap_get_client_block(r, b, sizeof(b));
     if (n <= 0)
         return list<string>();
     return cons(string(b, n), read(r));

Modified: tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp Sun Nov 14 09:27:28 2010
@@ -203,10 +203,10 @@ int tunnel(conn_rec* conn, http::CURLSes
 
                     // Receive from target
                     char data[8192];
-                    const failable<int> frl = http::recv(data, sizeof(data), cs);
+                    const failable<size_t> frl = http::recv(data, sizeof(data), cs);
                     if (!hasContent(frl))
                         return abort(conn, string("Couldn't receive from target") + reason(frl));
-                    const int rl = content(frl);
+                    const size_t rl = content(frl);
 
                     // Target connection closed
                     if (rl == 0)

Modified: tuscany/sca-cpp/trunk/modules/http/openauth.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/openauth.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/openauth.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/openauth.hpp Sun Nov 14 09:27:28 2010
@@ -51,7 +51,7 @@ const maybe<string> sessionID(const list
     if (isNil(c))
         return maybe<string>();
     const string cn = cookieName(c_str(car(c)));
-    const int i = find(cn, "=");
+    const size_t i = find(cn, "=");
     if (i < length(cn)) {
         const list<string> kv = mklist<string>(substr(cn, 0, i), substr(cn, i+1));
         if (!isNil(kv) && !isNil(cdr(kv))) {

Modified: tuscany/sca-cpp/trunk/modules/java/eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/eval.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/java/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/java/eval.hpp Sun Nov 14 09:27:28 2010
@@ -316,7 +316,7 @@ const jobjectArray valuesToJarrayHelper(
 }
 
 const jobjectArray valuesToJarray(const JavaRuntime& jr, const list<value>& v) {
-    jobjectArray a = jr.env->NewObjectArray(length(v), jr.objectClass, NULL);
+    jobjectArray a = jr.env->NewObjectArray((jsize)length(v), jr.objectClass, NULL);
     return valuesToJarrayHelper(jr, a, v, 0);
 }
 
@@ -360,7 +360,7 @@ const jvalue* valuesToJvaluesHelper(cons
 }
 
 const jvalue* valuesToJvalues(const JavaRuntime& jr, const list<value>& types, const list<value>& v) {
-    const int n = length(v);
+    const size_t n = length(v);
     jvalue* a = new (gc_anew<jvalue>(n)) jvalue[n];
     valuesToJvaluesHelper(jr, a, types, v);
     return a;

Modified: tuscany/sca-cpp/trunk/modules/json/json-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/json/json-test.cpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/json/json-test.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/json/json-test.cpp Sun Nov 14 09:27:28 2010
@@ -35,7 +35,7 @@ bool testJSEval() {
     JSONContext cx;
     const string script("(function testJSON(n){ return JSON.parse(JSON.stringify(n)) })(5)");
     jsval rval;
-    assert(JS_EvaluateScript(cx, cx.getGlobal(), c_str(script), length(script), "testJSON.js", 1, &rval));
+    assert(JS_EvaluateScript(cx, cx.getGlobal(), c_str(script), (uintN)length(script), "testJSON.js", 1, &rval));
     const string r(JS_GetStringBytes(JS_ValueToString(cx, rval)));
     assert(r == "5");
     return true;

Modified: tuscany/sca-cpp/trunk/modules/json/json.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/json/json.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/json/json.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/json/json.hpp Sun Nov 14 09:27:28 2010
@@ -217,7 +217,7 @@ failable<bool> consume(JSONParser* parse
     if (isNil(ilist))
         return true;
     JSString* jstr = JS_NewStringCopyZ(cx, c_str(car(ilist)));
-    if(!JS_ConsumeJSONText(cx, parser, JS_GetStringChars(jstr), JS_GetStringLength(jstr)))
+    if(!JS_ConsumeJSONText(cx, parser, JS_GetStringChars(jstr), (uint32)JS_GetStringLength(jstr)))
         return mkfailure<bool>("JS_ConsumeJSONText failed");
     return consume(parser, cdr(ilist), cx);
 }

Modified: tuscany/sca-cpp/trunk/modules/python/eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/eval.hpp?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/python/eval.hpp Sun Nov 14 09:27:28 2010
@@ -215,7 +215,7 @@ PyObject* valueToPyObject(const value& v
  * Convert a python tuple to a list of values.
  */
 
-const list<value> pyTupleToValuesHelper(PyObject* o, const int i, const int size) {
+const list<value> pyTupleToValuesHelper(PyObject* o, const size_t i, const size_t size) {
     if (i == size)
         return list<value>();
     return cons(pyObjectToValue(PyTuple_GetItem(o, i)), pyTupleToValuesHelper(o, i + 1, size));

Modified: tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image (original)
+++ tuscany/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image Sun Nov 14 09:27:28 2010
@@ -17,7 +17,7 @@
 
 # Install a complete distribution, the required system tools and libraries,
 # the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server
-# 9.10 image.
+# 10.10 64-bit image.
 
 # Display commands as they are executed
 set -x
@@ -33,47 +33,58 @@ sudo chown $u /mnt/tuscany
 sudo chgrp $g /mnt/tuscany
 cd /mnt/tuscany
 
-# Install system tools and libraries
+# Install core dev tools
 sudo apt-get -y install wget git-core autoconf automake libtool g++
 if [ "$?" != "0" ]; then
     exit $?
 fi
-# Uncomment to install GCC 4.5
-#wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-gcc-4.5
-#chmod +x ./ubuntu-gcc-4.5
-#./ubuntu-gcc-4.5
-#if [ "$?" != "0" ]; then
-#    exit $?
-#fi
-sudo apt-get -y install libssl-dev
+# Required by Apache HTTP server
+sudo apt-get -y install libssl-dev libpcre3-dev
 if [ "$?" != "0" ]; then
     exit $?
 fi
-sudo apt-get -y install python-dev
+# Required by Memcached
+sudo apt-get -y install libevent-dev
 if [ "$?" != "0" ]; then
     exit $?
 fi
-sudo apt-get -y install libpcre3-dev
-if [ "$?" != "0" ]; then
-    exit $?
-fi
-sudo apt-get -y install libevent-dev
+# Required by TraceMonkey
+sudo apt-get -y install autoconf2.13 zip
 if [ "$?" != "0" ]; then
     exit $?
 fi
+# Required by Apache Axis2/C
 sudo apt-get -y install pkg-config
 if [ "$?" != "0" ]; then
     exit $?
 fi
+# Required by Apache Qpid/C++
 sudo apt-get -y install libboost-dev libboost-program-options-dev libboost-filesystem-dev uuid-dev
 if [ "$?" != "0" ]; then
     exit $?
 fi
+# Required by Apache Vysper
 sudo apt-get -y install openjdk-6-jdk
 if [ "$?" != "0" ]; then
     exit $?
 fi
-sudo apt-get -y install bison flex
+# Require by HTML Tidy
+sudo apt-get -y install cvs
+if [ "$?" != "0" ]; then
+    exit $?
+fi
+# Required by PostgreSQL
+sudo apt-get -y install libreadline-dev
+if [ "$?" != "0" ]; then
+    exit $?
+fi
+# Required by Apache Thrift
+sudo apt-get -y install bison flex python-dev
+if [ "$?" != "0" ]; then
+    exit $?
+fi
+# Required by Facebook Scribe
+sudo apt-get -y install gawk
 if [ "$?" != "0" ]; then
     exit $?
 fi

Modified: tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image (original)
+++ tuscany/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image Sun Nov 14 09:27:28 2010
@@ -17,7 +17,7 @@
 
 # Install a complete distribution, the required system tools and libraries,
 # the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu
-# Server 9.10 image.
+# Server 10.10 64-bit image.
 
 # Display commands as they are executed
 set -x

Modified: tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all?rev=1034963&r1=1034962&r2=1034963&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all (original)
+++ tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all Sun Nov 14 09:27:28 2010
@@ -17,7 +17,7 @@
 
 # Install a complete distribution, the required system tools and libraries, the
 # runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server
-# 9.10 system.
+# 10.10 64-bit system.
 
 # Display commands as they are executed
 set -x
@@ -31,23 +31,28 @@ if [ "$?" != "0" ]; then
     exit $?
 fi
 
-# Uncomment to install GCC 4.5
-#wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-gcc-4.5
-#chmod +x ./ubuntu-gcc-4.5
-#./ubuntu-gcc-4.5
-#if [ "$?" != "0" ]; then
-#    exit $?
-#fi
+# Build Libexpat
+wget http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
+mv download expat-2.0.1.tar.gz
+tar xzf expat-2.0.1.tar.gz
+cd expat-2.0.1
+./configure --prefix=$build/expat-2.0.1-bin
+make
+make install
+if [ "$?" != "0" ]; then
+    exit $?
+fi
+cd $build
 
 # Build Apache HTTP server
-sudo apt-get -y install libssl-dev
+sudo apt-get -y install libssl-dev libpcre3-dev
 if [ "$?" != "0" ]; then
     exit $?
 fi
 wget http://archive.apache.org/dist/httpd/httpd-2.3.8.tar.gz
 tar xzf httpd-2.3.8.tar.gz
 cd httpd-2.3.8
-./configure --enable-ssl --enable-proxy --enable-usertrack --enable-mods-shared=most --with-included-apr --with-mpm=prefork --prefix=$build/httpd-2.3.8-bin
+./configure --enable-ssl --enable-proxy --enable-usertrack --enable-mods-shared=most --with-included-apr --with-expat=$build/expat-2.0.1-bin --with-mpm=prefork --prefix=$build/httpd-2.3.8-bin
 make
 make install
 if [ "$?" != "0" ]; then
@@ -124,8 +129,8 @@ fi
 cd $build
 
 # Install Google AppEngine SDK
-wget http://googleappengine.googlecode.com/files/google_appengine_1.3.7.zip
-unzip google_appengine_1.3.7.zip
+wget http://googleappengine.googlecode.com/files/google_appengine_1.3.8.zip
+unzip google_appengine_1.3.8.zip
 
 # Build Apache Axis2/C
 sudo apt-get -y install pkg-config
@@ -156,8 +161,6 @@ sudo apt-get -y install libboost-dev lib
 if [ "$?" != "0" ]; then
     exit $?
 fi
-sudo -s ln -s /usr/lib/libboost_program_options-mt.so /usr/lib/libboost_program_options.so
-sudo -s ln -s /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_filesystem.so
 wget http://www.apache.org/dist/qpid/0.6/qpid-cpp-0.6.tar.gz
 tar xzf qpid-cpp-0.6.tar.gz
 cd qpidc-0.6
@@ -169,19 +172,6 @@ if [ "$?" != "0" ]; then
 fi
 cd $build
 
-# Build Libexpat
-wget http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
-mv download expat-2.0.1.tar.gz
-tar xzf expat-2.0.1.tar.gz
-cd expat-2.0.1
-./configure --prefix=$build/expat-2.0.1-bin
-make
-make install
-if [ "$?" != "0" ]; then
-    exit $?
-fi
-cd $build
-
 # Build Libstrophe
 git clone git://github.com/jsdelfino/libstrophe.git
 cd libstrophe
@@ -234,7 +224,6 @@ fi
 cd $build
 
 # Build Mod_auth_openid
-sudo apt-get -y install libpcre3-dev
 git clone git://github.com/jsdelfino/mod_auth_openid.git
 cd mod_auth_openid
 ./autogen.sh
@@ -304,6 +293,10 @@ cp cpp/lib/libfb303.so $build/thrift-0.2
 cd $build
 
 # Build Facebook Scribe
+sudo apt-get -y install gawk
+if [ "$?" != "0" ]; then
+    exit $?
+fi
 wget http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz
 tar xzf scribe-2.2.tar.gz
 cd scribe
@@ -328,10 +321,6 @@ fi
 cd $build
 
 # Build Tuscany SCA
-sudo apt-get -y install
-if [ "$?" != "0" ]; then
-    exit $?
-fi
 git clone git://git.apache.org/tuscany-sca-cpp.git
 cd tuscany-sca-cpp
 cp etc/git-exclude .git/info/exclude