Problem 1:
First, the library will not even compile (with gcc 4.x) without source
code modifications:
The first error is:
../../talk/base/stringutils.h:272: error: extra qualification
‘talk_base::Traits::’ on member ‘empty_str’
Solution:
This can easily be fixed by making the source change to ‘talk/base/
stringutils.h’:
From (will be found at line no. 272 in version 0.4 of libjingle, as already gven in the error message):
inline static const char* Traits::empty_str() { return “”; }
To:
inline static const char* empty_str() { return “”; }
Other errors can be corrected by applying a similar change to:
talk/base/base64.h
(i.e. change Base64::Base64Table to Base64Table and Base64::DecodeTable[] to DecodeTable[] in line nos. 26 & 27)
talk/xmpp/xmppclient.h
(i.e. change XmppClient::GetStateName to GetStateName in line no. 141)
talk/p2p/base/sessionmanager.h
(i.e. change SessionManager::CreateErrorMessage to CreateErrorMessage in line no. 159)
Problem 2:
Second, the pcp example will not correctly run giving the error (on
the file ‘receiver’):
File transfer started.
Get temp failed
File transfer failed
session.cc(377): state_ == STATE_RECEIVEDINITIATE @ ChooseTransport
Aborted (core dumped)
Solution:
This error is caused because a temporary path is attempting to be
generated, but fails because the function incorrectly does not return
the result code ‘true’. The file that must be modified is ‘talk/base/
unixfilesystem.cc’:
simply add the line:
return true;
to the end of the function UnixFilesystem::GetTemporaryFolderI
resulting in:
bool UnixFilesystem::GetTemporaryFolderI(Pathname &pathname, bool
create,
const std::string *append) {
pathname.SetPathname(“/tmp”);
if (append) {
pathname.AppendFolder(*append);
if (create)
CreateFolder(pathname);
}
return true; //Insert this here at line no. 114
}
Compiling libjingle in Ubuntu. If you want to know how to compile libjingle in Ubuntu then there is a very good post here at http://shruta.net/2006/02/15/building-googles-libjingle-in-ubuntu-linux-510/. You will also get direct links to download some of the required source packages (including iLBC, which I could find nowhere else). Since the internet is so volatile, I will enumerate the important steps from there to here.
You will need to install packages. Use the following command.
sudo apt-get install libexpat1-dev libglib2.0-dev libogg-dev libssl-dev libasound2-dev libspeex-dev openssl
libspeex-dev and openssl packages can be omitted.
Now download the source of ortp, speex, iLBC and libjingle from the gentleman, Krishkavi’s website. Url: http://shruta.net/download/libjingle. I would recommend that you download libjingle from the official url, i.e. http://code.google.com/p/libjingle/downloads/list. After this extract the contents of the files into their respective folders as
tar zxvf ortp-0.7.1.tar.gz
tar zxvf speex-1.0.5.tar.gz
tar zxvf ilbc-rfc3951.tar.gz
tar zxvf libjingle-0.4.0.tar.gz
After this compile them one-by-one as
cd ortp-0.7.1
./configure
make
sudo make install
cd ../speex-1.0.5
./configure
make
sudo make install
cd ../ilbc-rfc3951
./configure
make
sudo make install
cd ../libjingle-0.4.0
./configure --with-ilbc=/usr/local --with-speex=/usr/local
make
sudo make installThey will all install in /usr/bin/lib and /usr/bin/local.
